@gientech/modual 2.2.16 → 2.2.18
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.md +761 -800
- package/assets/{GientechStreamReader-Cw7qAuh1.js → GientechStreamReader-BAakXMV9.js} +2 -2
- package/assets/{LeftOutlined-e0IEJaBy.js → LeftOutlined-DbVWaJal.js} +1 -1
- package/assets/{circle-plus-D-3IlJj0.js → circle-plus-Bqwlq2UM.js} +1 -1
- package/assets/database.svg +11 -11
- package/assets/database_add.svg +53 -53
- package/assets/database_connect.svg +66 -66
- package/assets/database_upload.svg +29 -29
- package/assets/databse.svg +6 -6
- package/assets/defaultWeLogo.svg +14 -14
- package/assets/graph.svg +4 -0
- package/assets/index-B6dVYi-P.js +2177 -0
- package/assets/{index-BtIbpTbT.js → index-BB-K4Uv2.js} +1 -1
- package/assets/{index-CJSVtVuI.js → index-BbQ5_tfg.js} +20 -20
- package/assets/{index-D3P9OTJx.js → index-CQChY5LV.js} +1 -1
- package/assets/{index-BL0njpis.js → index-CaKTISxy.js} +8 -8
- package/assets/{index-DfjY9fMd.js → index-DCnYE71u.js} +18 -18
- package/assets/{index-DhiJUMaM.js → index-DIaywdNt.js} +1 -1
- package/assets/{index-BmxlskIi.js → index-DiTGnLML.js} +1 -1
- package/assets/{index-MhFum9cd.js → index-Ds13bhV-.js} +57 -57
- package/assets/{index-BzdLAhNN.js → index-O8MDfMV6.js} +1 -1
- package/assets/{index-B1tZE4X5.js → index-zCzB-56N.js} +1 -1
- package/assets/knowledge.svg +4 -0
- package/assets/mysql.svg +14 -14
- package/assets/{plus-CmPO6ys9.js → plus-B4_cWXV7.js} +1 -1
- package/assets/{search-DH1utHsY.js → search-B5sYxJby.js} +1 -1
- package/assets/sensitive.svg +5 -0
- package/assets/{style-DolEdtxM.js → style-lplyebrk.js} +7 -7
- package/assets/style4.css +1 -1
- package/assets/style5.css +1 -1
- package/assets/style6.css +1 -1
- package/assets/style7.css +1 -0
- package/assets/{triangle-alert-BjbZI8PD.js → triangle-alert-DMLBtHZo.js} +1 -1
- package/assets/{x-BUKpZUhr.js → x-BHe7G4Ln.js} +1 -1
- package/assistantConfig.d.ts +32 -4
- package/assistantConfig.js +20 -20
- package/chat.d.ts +9 -0
- package/chat.js +1 -1
- package/chatCompare.d.ts +9 -0
- package/chatCompare.js +1 -1
- package/database.d.ts +9 -0
- package/database.js +2 -2
- package/databaseId.d.ts +9 -0
- package/databaseId.js +1 -1
- package/databaseTable.d.ts +9 -0
- package/databaseTable.js +2 -2
- package/index.d.ts +9 -0
- package/index.js +1 -1
- package/modelManage.d.ts +9 -0
- package/modelManage.js +2 -2
- package/package.json +6 -16
- package/sensitive.d.ts +161 -6
- package/sensitive.js +6 -6
- package/sensitiveWords.d.ts +161 -6
- package/sensitiveWords.js +1 -1
- package/streamFilesReader.d.ts +60 -2
- package/streamFilesReader.js +1 -1
- package/worker/pdf.worker.min.js +21 -21
- package/assets/_commonjsHelpers-_d1bhYXs.js +0 -1
- package/assets/iconAi.svg +0 -9
- package/assets/lib_enter-e1LoilHd-DrO8w6Nj.js +0 -2177
- package/assets/prism-bash-zSjFhtUz-cl4oq_rS.js +0 -1
- package/assets/prism-c-CXS5tkeN-BI05wwL9.js +0 -1
- package/assets/prism-cpp-DTm5qrps-DEcnTKnd.js +0 -1
- package/assets/prism-css-3Jya3wSQ-B-W7RKWG.js +0 -1
- package/assets/prism-diff-Apx1lkH_-b-nTbU2H.js +0 -3
- package/assets/prism-go-CHuRSSd--CyY0RbE6.js +0 -1
- package/assets/prism-java-l04-K_JR-DTIQeGI0.js +0 -1
- package/assets/prism-javascript-CLux6jF8-2LMHe_9g.js +0 -1
- package/assets/prism-json-iVb7He6L-xwnKirkR.js +0 -1
- package/assets/prism-jsx-yfun9EDN-BfrbuX8i.js +0 -1
- package/assets/prism-kotlin-QHMLy1lI-BxfM_G_h.js +0 -1
- package/assets/prism-markdown-tjNeCMi3-mpwv5EuF.js +0 -1
- package/assets/prism-markup-BNGj0Tvm-LX0ylPSt.js +0 -1
- package/assets/prism-php-Cq3Hq1Wv-BQ6y6LDZ.js +0 -1
- package/assets/prism-python-CP37PFZv-BvLoHz-u.js +0 -1
- package/assets/prism-ruby-DcAmdHPZ-CavK5dyy.js +0 -1
- package/assets/prism-rust-CuWIv8B8-D_BYGjS-.js +0 -1
- package/assets/prism-sql-8Y2-THrf-AgAyy5H_.js +0 -1
- package/assets/prism-swift-CeDyTyXT--kriB360.js +0 -1
- package/assets/prism-tsx-D_jjxt3I-DTNho6I-.js +0 -1
- package/assets/prism-typescript-DSWPRTnC-CeVC8Yup.js +0 -1
- package/assets/prism-yaml-DwdKlmeG-Dm3L3oXv.js +0 -1
- package/init.d.ts +0 -1
- package/init.js +0 -1
- package/prism-setup.d.ts +0 -1
- package/prism-setup.js +0 -9
- package/src/examples/ConversationAssistantPage/index.d.ts +0 -1
- package/src/examples/LoginPage/index.d.ts +0 -2
- package/src/examples/chat/components/DrawerGraphPreview.d.ts +0 -5
- package/src/examples/chat/index.d.ts +0 -1
- package/src/examples/chatCompare/index.d.ts +0 -2
- package/src/examples/gientechStreamFilesReader/index.d.ts +0 -5
- package/src/examples/headlessChat/index.d.ts +0 -1
- package/src/examples/knowledgebaseDetails/index.d.ts +0 -1
- package/src/examples/ragDatabaseDataPage/index.d.ts +0 -1
- package/src/examples/ragDatabaseIdPage/index.d.ts +0 -1
- package/src/examples/ragDatabasePage/index.d.ts +0 -2
- package/src/examples/ragModelManagePage/index.d.ts +0 -1
- package/src/examples/ragSearchPage/index.d.ts +0 -1
- package/src/examples/ragSensitiveWordsPage/index.d.ts +0 -1
- package/src/examples/streamFiles/index.d.ts +0 -3
- package/src/examples/utils/demo_setting_pannel.d.ts +0 -1
- package/src/init.d.ts +0 -0
- package/src/lib_enter.d.ts +0 -14
- package/src/main.d.ts +0 -1
- package/src/modules/assistantConfig/components/Database.d.ts +0 -2
- package/src/modules/assistantConfig/components/Graph.d.ts +0 -2
- package/src/modules/assistantConfig/components/Knowledge.d.ts +0 -3
- package/src/modules/assistantConfig/components/NotFoundContent.d.ts +0 -2
- package/src/modules/assistantConfig/components/Paragraph.d.ts +0 -8
- package/src/modules/assistantConfig/components/ParamsItem.d.ts +0 -2
- package/src/modules/assistantConfig/components/ResourceBinderItem.d.ts +0 -11
- package/src/modules/assistantConfig/components/SearchableSelector.d.ts +0 -44
- package/src/modules/assistantConfig/components/Sensitive.d.ts +0 -2
- package/src/modules/assistantConfig/components/SliderInput.d.ts +0 -14
- package/src/modules/assistantConfig/constants.d.ts +0 -70
- package/src/modules/assistantConfig/index.d.ts +0 -19
- package/src/modules/assistantConfig/server.d.ts +0 -20
- package/src/modules/chat/AllFiles.d.ts +0 -1
- package/src/modules/chat/Conversations/Item.d.ts +0 -11
- package/src/modules/chat/Conversations/List.d.ts +0 -20
- package/src/modules/chat/Conversations/groupByTime.d.ts +0 -17
- package/src/modules/chat/Conversations/index.d.ts +0 -20
- package/src/modules/chat/ReferenceBar.d.ts +0 -9
- package/src/modules/chat/constants.d.ts +0 -17
- package/src/modules/chat/i18n.d.ts +0 -44
- package/src/modules/chat/index.d.ts +0 -70
- package/src/modules/chat/referenceCom/DeleteModal.d.ts +0 -1
- package/src/modules/chat/referenceCom/DrawerContent.d.ts +0 -15
- package/src/modules/chat/referenceCom/DrawerDatabase.d.ts +0 -2
- package/src/modules/chat/referenceCom/DrawerGraphPreview.d.ts +0 -6
- package/src/modules/chat/referenceCom/DrawerPreview.d.ts +0 -6
- package/src/modules/chat/referenceCom/DrawerTitle.d.ts +0 -5
- package/src/modules/chat/referenceCom/RenameModal.d.ts +0 -1
- package/src/modules/chat/referenceCom/TagCom.d.ts +0 -2
- package/src/modules/chat/types.d.ts +0 -14
- package/src/modules/chat/utils/index.d.ts +0 -54
- package/src/modules/chatCompare/UseChatCompareHooks.d.ts +0 -11
- package/src/modules/chatCompare/components/AichatCompareUseController.d.ts +0 -46
- package/src/modules/chatCompare/components/AssistantSelector.d.ts +0 -12
- package/src/modules/chatCompare/components/ChatInputer.d.ts +0 -2
- package/src/modules/chatCompare/components/ChatInstance.d.ts +0 -2
- package/src/modules/chatCompare/components/ChatItem.d.ts +0 -21
- package/src/modules/chatCompare/components/Sender/FileCardCommon.d.ts +0 -19
- package/src/modules/chatCompare/components/Sender/FileUpload.d.ts +0 -13
- package/src/modules/chatCompare/components/Sender/FilesDisplay.d.ts +0 -16
- package/src/modules/chatCompare/components/Sender/VoiceInput.d.ts +0 -6
- package/src/modules/chatCompare/components/Sender/contexts/BadgeContext.d.ts +0 -10
- package/src/modules/chatCompare/components/Sender/fileIcon.d.ts +0 -13
- package/src/modules/chatCompare/components/Sender/index.d.ts +0 -58
- package/src/modules/chatCompare/components/UseChatInstanceHooks.d.ts +0 -8
- package/src/modules/chatCompare/components/UseScrollHooks.d.ts +0 -6
- package/src/modules/chatCompare/components/components/AllFiles.d.ts +0 -1
- package/src/modules/chatCompare/components/components/DeleteModal.d.ts +0 -1
- package/src/modules/chatCompare/components/components/DrawerContent.d.ts +0 -15
- package/src/modules/chatCompare/components/components/DrawerDatabase.d.ts +0 -2
- package/src/modules/chatCompare/components/components/DrawerGraphPreview.d.ts +0 -6
- package/src/modules/chatCompare/components/components/DrawerPreview.d.ts +0 -6
- package/src/modules/chatCompare/components/components/DrawerTitle.d.ts +0 -5
- package/src/modules/chatCompare/components/components/DrawerVideo.d.ts +0 -2
- package/src/modules/chatCompare/components/components/ReferenceBar.d.ts +0 -10
- package/src/modules/chatCompare/components/components/RenameModal.d.ts +0 -1
- package/src/modules/chatCompare/components/components/TagCom.d.ts +0 -2
- package/src/modules/chatCompare/components/defaultStyleSet.d.ts +0 -94
- package/src/modules/chatCompare/components/server.d.ts +0 -59
- package/src/modules/chatCompare/components/serverFn.d.ts +0 -52
- package/src/modules/chatCompare/components/useFileManager.d.ts +0 -37
- package/src/modules/chatCompare/components/utils.d.ts +0 -8
- package/src/modules/chatCompare/data.d.ts +0 -290
- package/src/modules/chatCompare/index.d.ts +0 -9
- package/src/modules/chatCompare/utils/AiChat.types.d.ts +0 -111
- package/src/modules/chatCompare/utils/constants.d.ts +0 -22
- package/src/modules/chatCompare/utils/fileUploadValidator.d.ts +0 -27
- package/src/modules/chatCompare/utils/index.d.ts +0 -1
- package/src/modules/database/CreateModal.d.ts +0 -11
- package/src/modules/database/index.d.ts +0 -27
- package/src/modules/database/server.d.ts +0 -16
- package/src/modules/databaseId/CustomCom.d.ts +0 -32
- package/src/modules/databaseId/EditConfig.d.ts +0 -10
- package/src/modules/databaseId/UploadDrawer.d.ts +0 -13
- package/src/modules/databaseId/i18n.d.ts +0 -94
- package/src/modules/databaseId/index.d.ts +0 -27
- package/src/modules/databaseId/server.d.ts +0 -22
- package/src/modules/databaseTable/EditRowDrawer.d.ts +0 -8
- package/src/modules/databaseTable/index.d.ts +0 -31
- package/src/modules/databaseTable/server.d.ts +0 -17
- package/src/modules/headlessChat/ReferenceBar.d.ts +0 -8
- package/src/modules/headlessChat/constants.d.ts +0 -16
- package/src/modules/headlessChat/index.d.ts +0 -37
- package/src/modules/headlessChat/referenceCom/DeleteModal.d.ts +0 -1
- package/src/modules/headlessChat/referenceCom/DrawerContent.d.ts +0 -15
- package/src/modules/headlessChat/referenceCom/DrawerDatabase.d.ts +0 -2
- package/src/modules/headlessChat/referenceCom/DrawerGraphPreview.d.ts +0 -6
- package/src/modules/headlessChat/referenceCom/DrawerPreview.d.ts +0 -6
- package/src/modules/headlessChat/referenceCom/DrawerTitle.d.ts +0 -5
- package/src/modules/headlessChat/referenceCom/RenameModal.d.ts +0 -1
- package/src/modules/headlessChat/referenceCom/TagCom.d.ts +0 -2
- package/src/modules/headlessChat/types.d.ts +0 -21
- package/src/modules/headlessChat/utils/index.d.ts +0 -54
- package/src/modules/knowledgeBase/index.d.ts +0 -18
- package/src/modules/knowledgeBase/server.d.ts +0 -16
- package/src/modules/knowledgebaseDetails/KnowledgeBaseDetails.d.ts +0 -32
- package/src/modules/knowledgebaseDetails/components/AddFileContent.d.ts +0 -10
- package/src/modules/knowledgebaseDetails/components/BatchOption.d.ts +0 -52
- package/src/modules/knowledgebaseDetails/components/BreadcrumbTruncated.d.ts +0 -33
- package/src/modules/knowledgebaseDetails/components/Card.d.ts +0 -20
- package/src/modules/knowledgebaseDetails/components/ContentDuplicate.d.ts +0 -10
- package/src/modules/knowledgebaseDetails/components/CreateForm.d.ts +0 -14
- package/src/modules/knowledgebaseDetails/components/DownloadBtn.d.ts +0 -10
- package/src/modules/knowledgebaseDetails/components/DuplicateCheck.d.ts +0 -2
- package/src/modules/knowledgebaseDetails/components/Empty.d.ts +0 -6
- package/src/modules/knowledgebaseDetails/components/FaqExtractionMoreDropdown.d.ts +0 -22
- package/src/modules/knowledgebaseDetails/components/FaqFolderItem.d.ts +0 -14
- package/src/modules/knowledgebaseDetails/components/FaqManagementMoreDropdown.d.ts +0 -26
- package/src/modules/knowledgebaseDetails/components/FaqQaItem.d.ts +0 -14
- package/src/modules/knowledgebaseDetails/components/FileFolderTransferContent .d.ts +0 -12
- package/src/modules/knowledgebaseDetails/components/FileViewCom.d.ts +0 -2
- package/src/modules/knowledgebaseDetails/components/KnowledgeBaseCard.d.ts +0 -20
- package/src/modules/knowledgebaseDetails/components/KnowledgeBaseSummaryCard.d.ts +0 -17
- package/src/modules/knowledgebaseDetails/components/LabelCom.d.ts +0 -6
- package/src/modules/knowledgebaseDetails/components/ModifyReviseDate.d.ts +0 -7
- package/src/modules/knowledgebaseDetails/components/NavBar.d.ts +0 -22
- package/src/modules/knowledgebaseDetails/components/SearchableSelector.d.ts +0 -22
- package/src/modules/knowledgebaseDetails/components/SynLogModal.d.ts +0 -5
- package/src/modules/knowledgebaseDetails/components/TagDrawerContent.d.ts +0 -2
- package/src/modules/knowledgebaseDetails/components/TagsInputer.d.ts +0 -7
- package/src/modules/knowledgebaseDetails/components/TitleCom.d.ts +0 -7
- package/src/modules/knowledgebaseDetails/components/TransferContent.d.ts +0 -11
- package/src/modules/knowledgebaseDetails/components/UploadBox.d.ts +0 -34
- package/src/modules/knowledgebaseDetails/components/fileManagementParts.d.ts +0 -161
- package/src/modules/knowledgebaseDetails/components/index.d.ts +0 -7
- package/src/modules/knowledgebaseDetails/components/nameDuplicate.d.ts +0 -2
- package/src/modules/knowledgebaseDetails/consts/knowledgebase.d.ts +0 -105
- package/src/modules/knowledgebaseDetails/index.d.ts +0 -2
- package/src/modules/knowledgebaseDetails/modules/ConfigModule.d.ts +0 -8
- package/src/modules/knowledgebaseDetails/modules/FaqModule.d.ts +0 -7
- package/src/modules/knowledgebaseDetails/modules/KnowledgeParseModule.d.ts +0 -12
- package/src/modules/knowledgebaseDetails/modules/RetrievalTestModule.d.ts +0 -8
- package/src/modules/knowledgebaseDetails/modules/UploadManagementModule.d.ts +0 -10
- package/src/modules/knowledgebaseDetails/modules/types.d.ts +0 -36
- package/src/modules/knowledgebaseDetails/servers/analysis.d.ts +0 -1
- package/src/modules/knowledgebaseDetails/servers/index.d.ts +0 -250
- package/src/modules/knowledgebaseDetails/servers/service.d.ts +0 -63
- package/src/modules/login/components/Login/LoginBox/index.d.ts +0 -18
- package/src/modules/login/components/Login/RegisterBox/index.d.ts +0 -15
- package/src/modules/login/components/Login/index.d.ts +0 -17
- package/src/modules/login/i18n.d.ts +0 -60
- package/src/modules/login/index.d.ts +0 -10
- package/src/modules/login/useServices.d.ts +0 -9
- package/src/modules/login/utils.d.ts +0 -2
- package/src/modules/modelManage/ConfigDrawer.d.ts +0 -17
- package/src/modules/modelManage/ReplaceModal.d.ts +0 -8
- package/src/modules/modelManage/const.d.ts +0 -35
- package/src/modules/modelManage/i18n.d.ts +0 -115
- package/src/modules/modelManage/index.d.ts +0 -19
- package/src/modules/modelManage/server.d.ts +0 -19
- package/src/modules/nodegraph/index.d.ts +0 -1
- package/src/modules/search/components/AssisSelect.d.ts +0 -14
- package/src/modules/search/components/Editor/ChatViewEditor.d.ts +0 -2
- package/src/modules/search/components/Editor/constant.d.ts +0 -6
- package/src/modules/search/components/Editor/index.d.ts +0 -15
- package/src/modules/search/components/Editor/plugins/autofomatRules.d.ts +0 -10
- package/src/modules/search/components/Editor/plugins/convertImgPlugins.d.ts +0 -3
- package/src/modules/search/components/Editor/plugins/createIndexes.d.ts +0 -3
- package/src/modules/search/components/Editor/plugins/displayer.d.ts +0 -22
- package/src/modules/search/components/Editor/plugins/imageClick.d.ts +0 -3
- package/src/modules/search/components/Editor/plugins/myplugin.d.ts +0 -4
- package/src/modules/search/components/Editor/ui/avatar.d.ts +0 -3
- package/src/modules/search/components/Editor/ui/blockquote-element.d.ts +0 -1
- package/src/modules/search/components/Editor/ui/button.d.ts +0 -6
- package/src/modules/search/components/Editor/ui/calendar.d.ts +0 -8
- package/src/modules/search/components/Editor/ui/caption.d.ts +0 -3
- package/src/modules/search/components/Editor/ui/checkbox.d.ts +0 -1
- package/src/modules/search/components/Editor/ui/code-block-combobox.d.ts +0 -3
- package/src/modules/search/components/Editor/ui/code-block-element.d.ts +0 -1
- package/src/modules/search/components/Editor/ui/code-leaf.d.ts +0 -1
- package/src/modules/search/components/Editor/ui/code-line-element.d.ts +0 -1
- package/src/modules/search/components/Editor/ui/code-syntax-leaf.d.ts +0 -1
- package/src/modules/search/components/Editor/ui/column-element.d.ts +0 -1
- package/src/modules/search/components/Editor/ui/column-group-element.d.ts +0 -3
- package/src/modules/search/components/Editor/ui/command.d.ts +0 -10
- package/src/modules/search/components/Editor/ui/comment-avatar.d.ts +0 -3
- package/src/modules/search/components/Editor/ui/comment-create-form.d.ts +0 -1
- package/src/modules/search/components/Editor/ui/comment-item.d.ts +0 -5
- package/src/modules/search/components/Editor/ui/comment-leaf.d.ts +0 -3
- package/src/modules/search/components/Editor/ui/comment-more-dropdown.d.ts +0 -1
- package/src/modules/search/components/Editor/ui/comment-reply-items.d.ts +0 -1
- package/src/modules/search/components/Editor/ui/comment-resolve-button.d.ts +0 -1
- package/src/modules/search/components/Editor/ui/comment-value.d.ts +0 -1
- package/src/modules/search/components/Editor/ui/comments-popover.d.ts +0 -5
- package/src/modules/search/components/Editor/ui/date-element.d.ts +0 -1
- package/src/modules/search/components/Editor/ui/dialog.d.ts +0 -10
- package/src/modules/search/components/Editor/ui/draggable.d.ts +0 -39
- package/src/modules/search/components/Editor/ui/dropdown-menu.d.ts +0 -19
- package/src/modules/search/components/Editor/ui/emoji-input-element.d.ts +0 -1
- package/src/modules/search/components/Editor/ui/excalidraw-element.d.ts +0 -1
- package/src/modules/search/components/Editor/ui/fixed-toolbar-buttons.d.ts +0 -1
- package/src/modules/search/components/Editor/ui/fixed-toolbar.d.ts +0 -1
- package/src/modules/search/components/Editor/ui/floating-toolbar-buttons.d.ts +0 -1
- package/src/modules/search/components/Editor/ui/floating-toolbar.d.ts +0 -1
- package/src/modules/search/components/Editor/ui/heading-element.d.ts +0 -1
- package/src/modules/search/components/Editor/ui/highlight-leaf.d.ts +0 -1
- package/src/modules/search/components/Editor/ui/hr-element.d.ts +0 -1
- package/src/modules/search/components/Editor/ui/icons.d.ts +0 -82
- package/src/modules/search/components/Editor/ui/image-element.d.ts +0 -1
- package/src/modules/search/components/Editor/ui/inline-combobox.d.ts +0 -27
- package/src/modules/search/components/Editor/ui/input.d.ts +0 -5
- package/src/modules/search/components/Editor/ui/insert-dropdown-menu.d.ts +0 -2
- package/src/modules/search/components/Editor/ui/kbd-leaf.d.ts +0 -1
- package/src/modules/search/components/Editor/ui/link-element.d.ts +0 -1
- package/src/modules/search/components/Editor/ui/link-floating-toolbar.d.ts +0 -5
- package/src/modules/search/components/Editor/ui/list-element.d.ts +0 -1
- package/src/modules/search/components/Editor/ui/mark-toolbar-button.d.ts +0 -1
- package/src/modules/search/components/Editor/ui/media-embed-element.d.ts +0 -1
- package/src/modules/search/components/Editor/ui/media-popover.d.ts +0 -7
- package/src/modules/search/components/Editor/ui/mention-element.d.ts +0 -1
- package/src/modules/search/components/Editor/ui/mention-input-element.d.ts +0 -5
- package/src/modules/search/components/Editor/ui/mode-dropdown-menu.d.ts +0 -2
- package/src/modules/search/components/Editor/ui/more-dropdown-menu.d.ts +0 -2
- package/src/modules/search/components/Editor/ui/paragraph-element.d.ts +0 -1
- package/src/modules/search/components/Editor/ui/placeholder.d.ts +0 -5
- package/src/modules/search/components/Editor/ui/popover.d.ts +0 -5
- package/src/modules/search/components/Editor/ui/resizable.d.ts +0 -5
- package/src/modules/search/components/Editor/ui/separator.d.ts +0 -1
- package/src/modules/search/components/Editor/ui/table-cell-element.d.ts +0 -2
- package/src/modules/search/components/Editor/ui/table-element.d.ts +0 -3
- package/src/modules/search/components/Editor/ui/table-row-element.d.ts +0 -1
- package/src/modules/search/components/Editor/ui/tableValue.d.ts +0 -3
- package/src/modules/search/components/Editor/ui/todo-list-element.d.ts +0 -1
- package/src/modules/search/components/Editor/ui/toggle-element.d.ts +0 -1
- package/src/modules/search/components/Editor/ui/toolbar.d.ts +0 -21
- package/src/modules/search/components/Editor/ui/tooltip.d.ts +0 -12
- package/src/modules/search/components/Editor/ui/turn-into-dropdown-menu.d.ts +0 -2
- package/src/modules/search/components/Editor/ui/with-draggables.d.ts +0 -6
- package/src/modules/search/components/FileList.d.ts +0 -11
- package/src/modules/search/components/ImageGroupView/index.d.ts +0 -2
- package/src/modules/search/components/ResultContent.d.ts +0 -14
- package/src/modules/search/components/SearchInput.d.ts +0 -22
- package/src/modules/search/components/SearchLanding.d.ts +0 -2
- package/src/modules/search/components/SearchView.d.ts +0 -2
- package/src/modules/search/components/SimpleEditor.d.ts +0 -10
- package/src/modules/search/components/SimpleFileList.d.ts +0 -11
- package/src/modules/search/index.d.ts +0 -3
- package/src/modules/search/servers/apis.d.ts +0 -22
- package/src/modules/search/servers/index.d.ts +0 -50
- package/src/modules/search/type.d.ts +0 -20
- package/src/modules/search/utils.d.ts +0 -4
- package/src/modules/sensitive/i18n.d.ts +0 -103
- package/src/modules/sensitive/index.d.ts +0 -26
- package/src/modules/sensitive/sensitiveEditor.d.ts +0 -28
- package/src/modules/sensitive/server.d.ts +0 -26
- package/src/modules/sensitiveId/AutoTag.d.ts +0 -10
- package/src/modules/sensitiveId/UploadModal.d.ts +0 -16
- package/src/modules/sensitiveId/VirtualWrap.d.ts +0 -18
- package/src/modules/sensitiveId/index.d.ts +0 -13
- package/src/modules/sensitiveId/server.d.ts +0 -12
- package/src/modules/streamFilesReader/GientechStreamReader.d.ts +0 -45
- package/src/modules/streamFilesReader/components/Header/Toolbar.d.ts +0 -1
- package/src/modules/streamFilesReader/components/Header/index.d.ts +0 -32
- package/src/modules/streamFilesReader/index.d.ts +0 -2
- package/src/prism-setup.d.ts +0 -0
- package/src/utils/commonFn.d.ts +0 -4
- package/src/utils/decryptApiKey.d.ts +0 -9
- package/src/utils/gientechCommon/components/AppError.d.ts +0 -4
- package/src/utils/gientechCommon/components/AppLoading.d.ts +0 -4
- package/src/utils/gientechCommon/components/DeleteModal.d.ts +0 -1
- package/src/utils/gientechCommon/components/DisplayError.d.ts +0 -1
- package/src/utils/gientechCommon/components/DisplayLoading.d.ts +0 -1
- package/src/utils/gientechCommon/components/FeedBackModal.d.ts +0 -2
- package/src/utils/gientechCommon/components/FileCardCommon.d.ts +0 -19
- package/src/utils/gientechCommon/components/FileManager/index.d.ts +0 -21
- package/src/utils/gientechCommon/components/Messages/GientechNewChatWelcome.d.ts +0 -11
- package/src/utils/gientechCommon/components/Messages/ReferenceCard.d.ts +0 -17
- package/src/utils/gientechCommon/components/Messages/RetriveItem.d.ts +0 -28
- package/src/utils/gientechCommon/components/Messages/WebRetriveItem.d.ts +0 -3
- package/src/utils/gientechCommon/components/Messages/defaultStyleSet.d.ts +0 -94
- package/src/utils/gientechCommon/components/RenameModal.d.ts +0 -1
- package/src/utils/gientechCommon/configs/commonConfig.d.ts +0 -2
- package/src/utils/gientechCommon/configs/senderConfig.d.ts +0 -1
- package/src/utils/gientechCommon/configs/stylesConfig.d.ts +0 -88
- package/src/utils/gientechCommon/hooks/AichatUseController.d.ts +0 -47
- package/src/utils/gientechCommon/hooks/useFileDisplayTools.d.ts +0 -17
- package/src/utils/gientechCommon/hooks/useFileManager.d.ts +0 -35
- package/src/utils/gientechCommon/slate/converters/deserializers.d.ts +0 -5
- package/src/utils/gientechCommon/slate/converters/mockData.d.ts +0 -72
- package/src/utils/gientechCommon/slate/converters/slateConverters.d.ts +0 -66
- package/src/utils/gientechCommon/slate/richElements/index.d.ts +0 -4
- package/src/utils/gientechCommon/utils/fileUtils.d.ts +0 -32
- package/src/utils/gientechCommon/utils/index.d.ts +0 -59
- package/src/utils/gientechCommon/utils/request.d.ts +0 -2
- package/src/utils/gientechCommon/utils/serverFn.d.ts +0 -52
- package/src/utils/index.d.ts +0 -24
- package/src/utils/testconfigs/demologin/index.d.ts +0 -1
- package/src/utils/testconfigs/index.d.ts +0 -57
|
@@ -1,2177 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./prism-typescript-DSWPRTnC-CeVC8Yup.js","./index-CJSVtVuI.js","./index-DfjY9fMd.js","./_commonjsHelpers-_d1bhYXs.js","./index-BzdLAhNN.js","./LeftOutlined-e0IEJaBy.js","./index-BL0njpis.js","./prism-python-CP37PFZv-BvLoHz-u.js","./prism-java-l04-K_JR-DTIQeGI0.js","./prism-cpp-DTm5qrps-DEcnTKnd.js","./prism-rust-CuWIv8B8-D_BYGjS-.js","./prism-php-Cq3Hq1Wv-BQ6y6LDZ.js","./prism-ruby-DcAmdHPZ-CavK5dyy.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import*as N from"react";import He,{useState as St,useCallback as Bt,useImperativeHandle as Ag,useContext as go,useRef as Ht,useEffect as Jt,useMemo as ht,forwardRef as Za,createElement as Wi,createContext as vo,useLayoutEffect as Bg,useReducer as Fg,Component as Ng,memo as Tg}from"react";import r0,{unstable_batchedUpdates as Og,createPortal as $g}from"react-dom";import{R as t1,b as ko}from"./index-CJSVtVuI.js";import{b2 as Xo,a$ as Mg,ax as r1,a5 as xn,U as Ke,O as lo,ay as n1,A as Xt,ba as o1,L as Vr,j as vt,V as _e,v as a1,X as Rg,K as Dn,Q as Et,b7 as ta,_ as Ft,aC as Pg,l as Vi,I as tn,a as U0,m as Ui,aN as gn,bR as zg,aX as _g,i as Ig,aW as i1,s as pt,au as jg,C as Ja,ao as X0,a1 as s1,n as Xi,u as Lg,af as Hg,a_ as qg,W as fo,am as ho,b4 as Xc,b6 as l1,bS as G0,bs as Y0,b8 as Kg,bT as Gc,bU as Z0,bV as Yc,bW as Zc,N as Gi,bX as u1,at as J0,ai as Yi,bY as Wg,aR as Vg,aS as Ug,aT as Xg,aU as Kt,aV as Gg,bZ as Yg,aZ as Zg,r as Q0,q as Jg,a7 as Qg,ap as e4,o as Jc,b1 as t4,b0 as r4,ae as c1,b_ as n4,b$ as o4,H as Qc,z as d1,bo as ed,T as n0,c0 as a4,aF as i4,B as s4,aJ as l4,y as u4,E as c4,aG as d4,g as fs}from"./index-DfjY9fMd.js";import{S as f1,P as h1}from"./index-BzdLAhNN.js";import{D as p1,M as f4,O as h4}from"./index-BL0njpis.js";import{a as o0,R as a0}from"./LeftOutlined-e0IEJaBy.js";function i0(e){return e!=null&&e===e.window}const p4=e=>{var t,r;if(typeof window>"u")return 0;let n=0;return i0(e)?n=e.pageYOffset:e instanceof Document?n=e.documentElement.scrollTop:(e instanceof HTMLElement||e)&&(n=e.scrollTop),e&&!i0(e)&&typeof n!="number"&&(n=(r=((t=e.ownerDocument)!==null&&t!==void 0?t:e).documentElement)===null||r===void 0?void 0:r.scrollTop),n};function m4(e,t,r,n){const o=r-t;return e/=n/2,e<1?o/2*e*e*e+t:o/2*((e-=2)*e*e+2)+t}function g4(e,t={}){const{getContainer:r=()=>window,callback:n,duration:o=450}=t,i=r(),c=p4(i),u=Date.now(),f=()=>{const p=Date.now()-u,v=m4(p>o?o:p,c,e,o);i0(i)?i.scrollTo(window.pageXOffset,v):i instanceof Document||i.constructor.name==="HTMLDocument"?i.documentElement.scrollTop=v:i.scrollTop=v,p<o?Xo(f):typeof n=="function"&&n()};Xo(f)}const v4=e=>{const[t,r]=St(null);return[Bt((o,i,c)=>{const u=t??o,f=Math.min(u||0,o),d=Math.max(u||0,o),p=i.slice(f,d+1).map(e),v=p.some(x=>!c.has(x)),g=[];return p.forEach(x=>{v?(c.has(x)||g.push(x),c.add(x)):(c.delete(x),g.push(x))}),r(v?d:null),g},[t]),r]};function b4(e,t){return e._antProxy=e._antProxy||{},Object.keys(t).forEach(r=>{if(!(r in e._antProxy)){const n=e[r];e._antProxy[r]=n,e[r]=t[r]}}),e}const y4=(e,t)=>Ag(e,()=>{const r=t(),{nativeElement:n}=r;return typeof Proxy<"u"?new Proxy(n,{get(o,i){return r[i]?r[i]:Reflect.get(o,i)}}):b4(n,r)}),x4=e=>{const t=N.useRef(e),[,r]=Mg();return[()=>t.current,n=>{t.current=n,r()}]};var m1=function(t){if(r1()&&window.document.documentElement){var r=Array.isArray(t)?t:[t],n=window.document.documentElement;return r.some(function(o){return o in n.style})}return!1},w4=function(t,r){if(!m1(t))return!1;var n=document.createElement("div"),o=n.style[t];return n.style[t]=r,n.style[t]!==o};function C4(e,t){return!Array.isArray(e)&&t!==void 0?w4(e,t):m1(e)}function sn(e,t){return e[t]}var D4=["children"];function g1(e,t){return"".concat(e,"-").concat(t)}function k4(e){return e&&e.type&&e.type.isTreeNode}function Qa(e,t){return e??t}function ra(e){var t=e||{},r=t.title,n=t._title,o=t.key,i=t.children,c=r||"title";return{title:c,_title:n||[c],key:o||"key",children:i||"children"}}function v1(e){function t(r){var n=o1(r);return n.map(function(o){if(!k4(o))return lo(!o,"Tree/TreeNode can only accept TreeNode as children."),null;var i=o.key,c=o.props,u=c.children,f=Vr(c,D4),d=Ke({key:i},f),p=t(u);return p.length&&(d.children=p),d}).filter(function(o){return o})}return t(e)}function ul(e,t,r){var n=ra(r),o=n._title,i=n.key,c=n.children,u=new Set(t===!0?[]:t),f=[];function d(p){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return p.map(function(g,x){for(var w=g1(v?v.pos:"0",x),C=Qa(g[i],w),m,A=0;A<o.length;A+=1){var S=o[A];if(g[S]!==void 0){m=g[S];break}}var D=Object.assign(n1(g,[].concat(Xt(o),[i,c])),{title:m,key:C,parent:v,pos:w,children:null,data:g,isStart:[].concat(Xt(v?v.isStart:[]),[x===0]),isEnd:[].concat(Xt(v?v.isEnd:[]),[x===p.length-1])});return f.push(D),t===!0||u.has(C)?D.children=d(g[c]||[],D):D.children=[],D})}return d(e),f}function E4(e,t,r){var n={};xn(r)==="object"?n=r:n={externalGetKey:r},n=n||{};var o=n,i=o.childrenPropName,c=o.externalGetKey,u=o.fieldNames,f=ra(u),d=f.key,p=f.children,v=i||p,g;c?typeof c=="string"?g=function(C){return C[c]}:typeof c=="function"&&(g=function(C){return c(C)}):g=function(C,m){return Qa(C[d],m)};function x(w,C,m,A){var S=w?w[v]:e,D=w?g1(m.pos,C):"0",$=w?[].concat(Xt(A),[w]):[];if(w){var F=g(w,D),B={node:w,index:C,pos:D,key:F,parentPos:m.node?m.pos:null,level:m.level+1,nodes:$};t(B)}S&&S.forEach(function(R,I){x(R,I,{node:w,pos:D,level:m?m.level+1:-1},$)})}x(null)}function eu(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.initWrapper,n=t.processEntity,o=t.onProcessFinished,i=t.externalGetKey,c=t.childrenPropName,u=t.fieldNames,f=arguments.length>2?arguments[2]:void 0,d=i||f,p={},v={},g={posEntities:p,keyEntities:v};return r&&(g=r(g)||g),E4(e,function(x){var w=x.node,C=x.index,m=x.pos,A=x.key,S=x.parentPos,D=x.level,$=x.nodes,F={node:w,nodes:$,index:C,key:A,pos:m,level:D},B=Qa(A,m);p[m]=F,v[B]=F,F.parent=p[S],F.parent&&(F.parent.children=F.parent.children||[],F.parent.children.push(F)),n&&n(F,g)},{externalGetKey:d,childrenPropName:c,fieldNames:u}),o&&o(g),g}function Na(e,t){var r=t.expandedKeys,n=t.selectedKeys,o=t.loadedKeys,i=t.loadingKeys,c=t.checkedKeys,u=t.halfCheckedKeys,f=t.dragOverNodeKey,d=t.dropPosition,p=t.keyEntities,v=sn(p,e),g={eventKey:e,expanded:r.indexOf(e)!==-1,selected:n.indexOf(e)!==-1,loaded:o.indexOf(e)!==-1,loading:i.indexOf(e)!==-1,checked:c.indexOf(e)!==-1,halfChecked:u.indexOf(e)!==-1,pos:String(v?v.pos:""),dragOver:f===e&&d===0,dragOverGapTop:f===e&&d===-1,dragOverGapBottom:f===e&&d===1};return g}function Rr(e){var t=e.data,r=e.expanded,n=e.selected,o=e.checked,i=e.loaded,c=e.loading,u=e.halfChecked,f=e.dragOver,d=e.dragOverGapTop,p=e.dragOverGapBottom,v=e.pos,g=e.active,x=e.eventKey,w=Ke(Ke({},t),{},{expanded:r,selected:n,checked:o,loaded:i,loading:c,halfChecked:u,dragOver:f,dragOverGapTop:d,dragOverGapBottom:p,pos:v,active:g,key:x});return"props"in w||Object.defineProperty(w,"props",{get:function(){return lo(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),e}}),w}function b1(e,t){var r=new Set;return e.forEach(function(n){t.has(n)||r.add(n)}),r}function S4(e){var t=e||{},r=t.disabled,n=t.disableCheckbox,o=t.checkable;return!!(r||n)||o===!1}function A4(e,t,r,n){for(var o=new Set(e),i=new Set,c=0;c<=r;c+=1){var u=t.get(c)||new Set;u.forEach(function(v){var g=v.key,x=v.node,w=v.children,C=w===void 0?[]:w;o.has(g)&&!n(x)&&C.filter(function(m){return!n(m.node)}).forEach(function(m){o.add(m.key)})})}for(var f=new Set,d=r;d>=0;d-=1){var p=t.get(d)||new Set;p.forEach(function(v){var g=v.parent,x=v.node;if(!(n(x)||!v.parent||f.has(v.parent.key))){if(n(v.parent.node)){f.add(g.key);return}var w=!0,C=!1;(g.children||[]).filter(function(m){return!n(m.node)}).forEach(function(m){var A=m.key,S=o.has(A);w&&!S&&(w=!1),!C&&(S||i.has(A))&&(C=!0)}),w&&o.add(g.key),C&&i.add(g.key),f.add(g.key)}})}return{checkedKeys:Array.from(o),halfCheckedKeys:Array.from(b1(i,o))}}function B4(e,t,r,n,o){for(var i=new Set(e),c=new Set(t),u=0;u<=n;u+=1){var f=r.get(u)||new Set;f.forEach(function(g){var x=g.key,w=g.node,C=g.children,m=C===void 0?[]:C;!i.has(x)&&!c.has(x)&&!o(w)&&m.filter(function(A){return!o(A.node)}).forEach(function(A){i.delete(A.key)})})}c=new Set;for(var d=new Set,p=n;p>=0;p-=1){var v=r.get(p)||new Set;v.forEach(function(g){var x=g.parent,w=g.node;if(!(o(w)||!g.parent||d.has(g.parent.key))){if(o(g.parent.node)){d.add(x.key);return}var C=!0,m=!1;(x.children||[]).filter(function(A){return!o(A.node)}).forEach(function(A){var S=A.key,D=i.has(S);C&&!D&&(C=!1),!m&&(D||c.has(S))&&(m=!0)}),C||i.delete(x.key),m&&c.add(x.key),d.add(x.key)}})}return{checkedKeys:Array.from(i),halfCheckedKeys:Array.from(b1(c,i))}}function Go(e,t,r,n){var o=[],i;n?i=n:i=S4;var c=new Set(e.filter(function(p){var v=!!sn(r,p);return v||o.push(p),v})),u=new Map,f=0;Object.keys(r).forEach(function(p){var v=r[p],g=v.level,x=u.get(g);x||(x=new Set,u.set(g,x)),x.add(v),f=Math.max(f,g)}),lo(!o.length,"Tree missing follow keys: ".concat(o.slice(0,100).map(function(p){return"'".concat(p,"'")}).join(", ")));var d;return t===!0?d=A4(c,u,f,i):d=B4(c,t.halfCheckedKeys,u,f,i),d}function y1(){var e=document.documentElement.clientWidth,t=window.innerHeight||document.documentElement.clientHeight;return{width:e,height:t}}function F4(e){var t=e.getBoundingClientRect(),r=document.documentElement;return{left:t.left+(window.pageXOffset||r.scrollLeft)-(r.clientLeft||document.body.clientLeft||0),top:t.top+(window.pageYOffset||r.scrollTop)-(r.clientTop||document.body.clientTop||0)}}function uo(e,t,r,n){var o=r0.unstable_batchedUpdates?function(c){r0.unstable_batchedUpdates(r,c)}:r;return e!=null&&e.addEventListener&&e.addEventListener(t,o,n),{remove:function(){e!=null&&e.removeEventListener&&e.removeEventListener(t,o,n)}}}var ei=N.createContext(null),N4=function(t){var r=t.visible,n=t.maskTransitionName,o=t.getContainer,i=t.prefixCls,c=t.rootClassName,u=t.icons,f=t.countRender,d=t.showSwitch,p=t.showProgress,v=t.current,g=t.transform,x=t.count,w=t.scale,C=t.minScale,m=t.maxScale,A=t.closeIcon,S=t.onActive,D=t.onClose,$=t.onZoomIn,F=t.onZoomOut,B=t.onRotateRight,R=t.onRotateLeft,I=t.onFlipX,T=t.onFlipY,W=t.onReset,H=t.toolbarRender,Z=t.zIndex,Y=t.image,j=go(ei),K=u.rotateLeft,U=u.rotateRight,G=u.zoomIn,J=u.zoomOut,z=u.close,ie=u.left,ge=u.right,xe=u.flipX,Ae=u.flipY,Fe="".concat(i,"-operations-operation");N.useEffect(function(){var Te=function(We){We.keyCode===Dn.ESC&&D()};return r&&window.addEventListener("keydown",Te),function(){window.removeEventListener("keydown",Te)}},[r]);var be=function(Ie,We){Ie.preventDefault(),Ie.stopPropagation(),S(We)},X=N.useCallback(function(Te){var Ie=Te.type,We=Te.disabled,ut=Te.onClick,ot=Te.icon;return N.createElement("div",{key:Ie,className:vt(Fe,"".concat(i,"-operations-operation-").concat(Ie),_e({},"".concat(i,"-operations-operation-disabled"),!!We)),onClick:ut},ot)},[Fe,i]),fe=d?X({icon:ie,onClick:function(Ie){return be(Ie,-1)},type:"prev",disabled:v===0}):void 0,ce=d?X({icon:ge,onClick:function(Ie){return be(Ie,1)},type:"next",disabled:v===x-1}):void 0,se=X({icon:Ae,onClick:T,type:"flipY"}),oe=X({icon:xe,onClick:I,type:"flipX"}),he=X({icon:K,onClick:R,type:"rotateLeft"}),we=X({icon:U,onClick:B,type:"rotateRight"}),Ce=X({icon:J,onClick:F,type:"zoomOut",disabled:w<=C}),ke=X({icon:G,onClick:$,type:"zoomIn",disabled:w===m}),Se=N.createElement("div",{className:"".concat(i,"-operations")},se,oe,he,we,Ce,ke);return N.createElement(a1,{visible:r,motionName:n},function(Te){var Ie=Te.className,We=Te.style;return N.createElement(Rg,{open:!0,getContainer:o??document.body},N.createElement("div",{className:vt("".concat(i,"-operations-wrapper"),Ie,c),style:Ke(Ke({},We),{},{zIndex:Z})},A===null?null:N.createElement("button",{className:"".concat(i,"-close"),onClick:D},A||z),d&&N.createElement(N.Fragment,null,N.createElement("div",{className:vt("".concat(i,"-switch-left"),_e({},"".concat(i,"-switch-left-disabled"),v===0)),onClick:function(ot){return be(ot,-1)}},ie),N.createElement("div",{className:vt("".concat(i,"-switch-right"),_e({},"".concat(i,"-switch-right-disabled"),v===x-1)),onClick:function(ot){return be(ot,1)}},ge)),N.createElement("div",{className:"".concat(i,"-footer")},p&&N.createElement("div",{className:"".concat(i,"-progress")},f?f(v+1,x):N.createElement("bdi",null,"".concat(v+1," / ").concat(x))),H?H(Se,Ke(Ke({icons:{prevIcon:fe,nextIcon:ce,flipYIcon:se,flipXIcon:oe,rotateLeftIcon:he,rotateRightIcon:we,zoomOutIcon:Ce,zoomInIcon:ke},actions:{onActive:S,onFlipY:T,onFlipX:I,onRotateLeft:R,onRotateRight:B,onZoomOut:F,onZoomIn:$,onReset:W,onClose:D},transform:g},j?{current:v,total:x}:{}),{},{image:Y})):Se)))})},bi={x:0,y:0,rotate:0,scale:1,flipX:!1,flipY:!1};function T4(e,t,r,n){var o=Ht(null),i=Ht([]),c=St(bi),u=Et(c,2),f=u[0],d=u[1],p=function(w){d(bi),ta(bi,f)||n==null||n({transform:bi,action:w})},v=function(w,C){o.current===null&&(i.current=[],o.current=Xo(function(){d(function(m){var A=m;return i.current.forEach(function(S){A=Ke(Ke({},A),S)}),o.current=null,n==null||n({transform:A,action:C}),A})})),i.current.push(Ke(Ke({},f),w))},g=function(w,C,m,A,S){var D=e.current,$=D.width,F=D.height,B=D.offsetWidth,R=D.offsetHeight,I=D.offsetLeft,T=D.offsetTop,W=w,H=f.scale*w;H>r?(H=r,W=r/f.scale):H<t&&(H=S?H:t,W=H/f.scale);var Z=m??innerWidth/2,Y=A??innerHeight/2,j=W-1,K=j*$*.5,U=j*F*.5,G=j*(Z-f.x-I),J=j*(Y-f.y-T),z=f.x-(G-K),ie=f.y-(J-U);if(w<1&&H===1){var ge=B*H,xe=R*H,Ae=y1(),Fe=Ae.width,be=Ae.height;ge<=Fe&&xe<=be&&(z=0,ie=0)}v({x:z,y:ie,scale:H},C)};return{transform:f,resetTransform:p,updateTransform:v,dispatchZoomChange:g}}function td(e,t,r,n){var o=t+r,i=(r-n)/2;if(r>n){if(t>0)return _e({},e,i);if(t<0&&o<n)return _e({},e,-i)}else if(t<0||o>n)return _e({},e,t<0?i:-i);return{}}function x1(e,t,r,n){var o=y1(),i=o.width,c=o.height,u=null;return e<=i&&t<=c?u={x:0,y:0}:(e>i||t>c)&&(u=Ke(Ke({},td("x",r,e,i)),td("y",n,t,c))),u}var qo=1,O4=1;function $4(e,t,r,n,o,i,c){var u=o.rotate,f=o.scale,d=o.x,p=o.y,v=St(!1),g=Et(v,2),x=g[0],w=g[1],C=Ht({diffX:0,diffY:0,transformX:0,transformY:0}),m=function(F){!t||F.button!==0||(F.preventDefault(),F.stopPropagation(),C.current={diffX:F.pageX-d,diffY:F.pageY-p,transformX:d,transformY:p},w(!0))},A=function(F){r&&x&&i({x:F.pageX-C.current.diffX,y:F.pageY-C.current.diffY},"move")},S=function(){if(r&&x){w(!1);var F=C.current,B=F.transformX,R=F.transformY,I=d!==B&&p!==R;if(!I)return;var T=e.current.offsetWidth*f,W=e.current.offsetHeight*f,H=e.current.getBoundingClientRect(),Z=H.left,Y=H.top,j=u%180!==0,K=x1(j?W:T,j?T:W,Z,Y);K&&i(Ke({},K),"dragRebound")}},D=function(F){if(!(!r||F.deltaY==0)){var B=Math.abs(F.deltaY/100),R=Math.min(B,O4),I=qo+R*n;F.deltaY>0&&(I=qo/I),c(I,"wheel",F.clientX,F.clientY)}};return Jt(function(){var $,F,B,R;if(t){B=uo(window,"mouseup",S,!1),R=uo(window,"mousemove",A,!1);try{window.top!==window.self&&($=uo(window.top,"mouseup",S,!1),F=uo(window.top,"mousemove",A,!1))}catch{}}return function(){var I,T,W,H;(I=B)===null||I===void 0||I.remove(),(T=R)===null||T===void 0||T.remove(),(W=$)===null||W===void 0||W.remove(),(H=F)===null||H===void 0||H.remove()}},[r,x,d,p,u,t]),{isMoving:x,onMouseDown:m,onMouseMove:A,onMouseUp:S,onWheel:D}}function M4(e){return new Promise(function(t){if(!e){t(!1);return}var r=document.createElement("img");r.onerror=function(){return t(!1)},r.onload=function(){return t(!0)},r.src=e})}function w1(e){var t=e.src,r=e.isCustomPlaceholder,n=e.fallback,o=St(r?"loading":"normal"),i=Et(o,2),c=i[0],u=i[1],f=Ht(!1),d=c==="error";Jt(function(){var x=!0;return M4(t).then(function(w){!w&&x&&u("error")}),function(){x=!1}},[t]),Jt(function(){r&&!f.current?u("loading"):d&&u("normal")},[t]);var p=function(){u("normal")},v=function(w){f.current=!1,c==="loading"&&w!==null&&w!==void 0&&w.complete&&(w.naturalWidth||w.naturalHeight)&&(f.current=!0,p())},g=d&&n?{src:n}:{onLoad:p,src:t};return[v,g,c]}function Zi(e,t){var r=e.x-t.x,n=e.y-t.y;return Math.hypot(r,n)}function R4(e,t,r,n){var o=Zi(e,r),i=Zi(t,n);if(o===0&&i===0)return[e.x,e.y];var c=o/(o+i),u=e.x+c*(t.x-e.x),f=e.y+c*(t.y-e.y);return[u,f]}function P4(e,t,r,n,o,i,c){var u=o.rotate,f=o.scale,d=o.x,p=o.y,v=St(!1),g=Et(v,2),x=g[0],w=g[1],C=Ht({point1:{x:0,y:0},point2:{x:0,y:0},eventType:"none"}),m=function(F){C.current=Ke(Ke({},C.current),F)},A=function(F){if(t){F.stopPropagation(),w(!0);var B=F.touches,R=B===void 0?[]:B;R.length>1?m({point1:{x:R[0].clientX,y:R[0].clientY},point2:{x:R[1].clientX,y:R[1].clientY},eventType:"touchZoom"}):m({point1:{x:R[0].clientX-d,y:R[0].clientY-p},eventType:"move"})}},S=function(F){var B=F.touches,R=B===void 0?[]:B,I=C.current,T=I.point1,W=I.point2,H=I.eventType;if(R.length>1&&H==="touchZoom"){var Z={x:R[0].clientX,y:R[0].clientY},Y={x:R[1].clientX,y:R[1].clientY},j=R4(T,W,Z,Y),K=Et(j,2),U=K[0],G=K[1],J=Zi(Z,Y)/Zi(T,W);c(J,"touchZoom",U,G,!0),m({point1:Z,point2:Y,eventType:"touchZoom"})}else H==="move"&&(i({x:R[0].clientX-T.x,y:R[0].clientY-T.y},"move"),m({eventType:"move"}))},D=function(){if(r){if(x&&w(!1),m({eventType:"none"}),n>f)return i({x:0,y:0,scale:n},"touchZoom");var F=e.current.offsetWidth*f,B=e.current.offsetHeight*f,R=e.current.getBoundingClientRect(),I=R.left,T=R.top,W=u%180!==0,H=x1(W?B:F,W?F:B,I,T);H&&i(Ke({},H),"dragRebound")}};return Jt(function(){var $;return r&&t&&($=uo(window,"touchmove",function(F){return F.preventDefault()},{passive:!1})),function(){var F;(F=$)===null||F===void 0||F.remove()}},[r,t]),{isTouching:x,onTouchStart:A,onTouchMove:S,onTouchEnd:D}}var z4=["fallback","src","imgRef"],_4=["prefixCls","src","alt","imageInfo","fallback","movable","onClose","visible","icons","rootClassName","closeIcon","getContainer","current","count","countRender","scaleStep","minScale","maxScale","transitionName","maskTransitionName","imageRender","imgCommonProps","toolbarRender","onTransform","onChange"],I4=function(t){var r=t.fallback,n=t.src,o=t.imgRef,i=Vr(t,z4),c=w1({src:n,fallback:r}),u=Et(c,2),f=u[0],d=u[1];return He.createElement("img",Ft({ref:function(v){o.current=v,f(v)}},i,d))},C1=function(t){var r=t.prefixCls,n=t.src,o=t.alt,i=t.imageInfo,c=t.fallback,u=t.movable,f=u===void 0?!0:u,d=t.onClose,p=t.visible,v=t.icons,g=v===void 0?{}:v,x=t.rootClassName,w=t.closeIcon,C=t.getContainer,m=t.current,A=m===void 0?0:m,S=t.count,D=S===void 0?1:S,$=t.countRender,F=t.scaleStep,B=F===void 0?.5:F,R=t.minScale,I=R===void 0?1:R,T=t.maxScale,W=T===void 0?50:T,H=t.transitionName,Z=H===void 0?"zoom":H,Y=t.maskTransitionName,j=Y===void 0?"fade":Y,K=t.imageRender,U=t.imgCommonProps,G=t.toolbarRender,J=t.onTransform,z=t.onChange,ie=Vr(t,_4),ge=Ht(),xe=go(ei),Ae=xe&&D>1,Fe=xe&&D>=1,be=St(!0),X=Et(be,2),fe=X[0],ce=X[1],se=T4(ge,I,W,J),oe=se.transform,he=se.resetTransform,we=se.updateTransform,Ce=se.dispatchZoomChange,ke=$4(ge,f,p,B,oe,we,Ce),Se=ke.isMoving,Te=ke.onMouseDown,Ie=ke.onWheel,We=P4(ge,f,p,I,oe,we,Ce),ut=We.isTouching,ot=We.onTouchStart,Oe=We.onTouchMove,je=We.onTouchEnd,Ve=oe.rotate,ft=oe.scale,tt=vt(_e({},"".concat(r,"-moving"),Se));Jt(function(){fe||ce(!0)},[fe]);var nt=function(){he("close")},Tt=function(){Ce(qo+B,"zoomIn")},bt=function(){Ce(qo/(qo+B),"zoomOut")},At=function(){we({rotate:Ve+90},"rotateRight")},yt=function(){we({rotate:Ve-90},"rotateLeft")},Me=function(){we({flipX:!oe.flipX},"flipX")},ue=function(){we({flipY:!oe.flipY},"flipY")},mt=function(){he("reset")},zt=function(Gt){var pr=A+Gt;!Number.isInteger(pr)||pr<0||pr>D-1||(ce(!1),he(Gt<0?"prev":"next"),z==null||z(pr,A))},Wt=function(Gt){!p||!Ae||(Gt.keyCode===Dn.LEFT?zt(-1):Gt.keyCode===Dn.RIGHT&&zt(1))},Ot=function(Gt){p&&(ft!==1?we({x:0,y:0,scale:1},"doubleClick"):Ce(qo+B,"doubleClick",Gt.clientX,Gt.clientY))};Jt(function(){var _t=uo(window,"keydown",Wt,!1);return function(){_t.remove()}},[p,Ae,A]);var ir=He.createElement(I4,Ft({},U,{width:t.width,height:t.height,imgRef:ge,className:"".concat(r,"-img"),alt:o,style:{transform:"translate3d(".concat(oe.x,"px, ").concat(oe.y,"px, 0) scale3d(").concat(oe.flipX?"-":"").concat(ft,", ").concat(oe.flipY?"-":"").concat(ft,", 1) rotate(").concat(Ve,"deg)"),transitionDuration:(!fe||ut)&&"0s"},fallback:c,src:n,onWheel:Ie,onMouseDown:Te,onDoubleClick:Ot,onTouchStart:ot,onTouchMove:Oe,onTouchEnd:je,onTouchCancel:je})),Ct=Ke({url:n,alt:o},i);return He.createElement(He.Fragment,null,He.createElement(Pg,Ft({transitionName:Z,maskTransitionName:j,closable:!1,keyboard:!0,prefixCls:r,onClose:d,visible:p,classNames:{wrapper:tt},rootClassName:x,getContainer:C},ie,{afterClose:nt}),He.createElement("div",{className:"".concat(r,"-img-wrapper")},K?K(ir,Ke({transform:oe,image:Ct},xe?{current:A}:{})):ir)),He.createElement(N4,{visible:p,transform:oe,maskTransitionName:j,closeIcon:w,getContainer:C,prefixCls:r,rootClassName:x,icons:g,countRender:$,showSwitch:Ae,showProgress:Fe,current:A,count:D,scale:ft,minScale:I,maxScale:W,toolbarRender:G,onActive:zt,onZoomIn:Tt,onZoomOut:bt,onRotateRight:At,onRotateLeft:yt,onFlipX:Me,onFlipY:ue,onClose:d,onReset:mt,zIndex:ie.zIndex!==void 0?ie.zIndex+1:void 0,image:Ct}))},s0=["crossOrigin","decoding","draggable","loading","referrerPolicy","sizes","srcSet","useMap","alt"];function j4(e){var t=N.useState({}),r=Et(t,2),n=r[0],o=r[1],i=N.useCallback(function(u,f){return o(function(d){return Ke(Ke({},d),{},_e({},u,f))}),function(){o(function(d){var p=Ke({},d);return delete p[u],p})}},[]),c=N.useMemo(function(){return e?e.map(function(u){if(typeof u=="string")return{data:{src:u}};var f={};return Object.keys(u).forEach(function(d){["src"].concat(Xt(s0)).includes(d)&&(f[d]=u[d])}),{data:f}}):Object.keys(n).reduce(function(u,f){var d=n[f],p=d.canPreview,v=d.data;return p&&u.push({data:v,id:f}),u},[])},[e,n]);return[c,i,!!e]}var L4=["visible","onVisibleChange","getContainer","current","movable","minScale","maxScale","countRender","closeIcon","onChange","onTransform","toolbarRender","imageRender"],H4=["src"],q4=function(t){var r,n=t.previewPrefixCls,o=n===void 0?"rc-image-preview":n,i=t.children,c=t.icons,u=c===void 0?{}:c,f=t.items,d=t.preview,p=t.fallback,v=xn(d)==="object"?d:{},g=v.visible,x=v.onVisibleChange,w=v.getContainer,C=v.current,m=v.movable,A=v.minScale,S=v.maxScale,D=v.countRender,$=v.closeIcon,F=v.onChange,B=v.onTransform,R=v.toolbarRender,I=v.imageRender,T=Vr(v,L4),W=j4(f),H=Et(W,3),Z=H[0],Y=H[1],j=H[2],K=Vi(0,{value:C}),U=Et(K,2),G=U[0],J=U[1],z=St(!1),ie=Et(z,2),ge=ie[0],xe=ie[1],Ae=((r=Z[G])===null||r===void 0?void 0:r.data)||{},Fe=Ae.src,be=Vr(Ae,H4),X=Vi(!!g,{value:g,onChange:function(ut,ot){x==null||x(ut,ot,G)}}),fe=Et(X,2),ce=fe[0],se=fe[1],oe=St(null),he=Et(oe,2),we=he[0],Ce=he[1],ke=N.useCallback(function(We,ut,ot,Oe){var je=j?Z.findIndex(function(Ve){return Ve.data.src===ut}):Z.findIndex(function(Ve){return Ve.id===We});J(je<0?0:je),se(!0),Ce({x:ot,y:Oe}),xe(!0)},[Z,j]);N.useEffect(function(){ce?ge||J(0):xe(!1)},[ce]);var Se=function(ut,ot){J(ut),F==null||F(ut,ot)},Te=function(){se(!1),Ce(null)},Ie=N.useMemo(function(){return{register:Y,onPreview:ke}},[Y,ke]);return N.createElement(ei.Provider,{value:Ie},i,N.createElement(C1,Ft({"aria-hidden":!ce,movable:m,visible:ce,prefixCls:o,closeIcon:$,onClose:Te,mousePosition:we,imgCommonProps:be,src:Fe,fallback:p,icons:u,minScale:A,maxScale:S,getContainer:w,current:G,count:Z.length,countRender:D,onTransform:B,toolbarRender:R,imageRender:I,onChange:Se},T)))},rd=0;function K4(e,t){var r=N.useState(function(){return rd+=1,String(rd)}),n=Et(r,1),o=n[0],i=N.useContext(ei),c={data:t,canPreview:e};return N.useEffect(function(){if(i)return i.register(o,c)},[]),N.useEffect(function(){i&&i.register(o,c)},[e,t]),o}var W4=["src","alt","onPreviewClose","prefixCls","previewPrefixCls","placeholder","fallback","width","height","style","preview","className","onClick","onError","wrapperClassName","wrapperStyle","rootClassName"],V4=["src","visible","onVisibleChange","getContainer","mask","maskClassName","movable","icons","scaleStep","minScale","maxScale","imageRender","toolbarRender"],tu=function(t){var r=t.src,n=t.alt,o=t.onPreviewClose,i=t.prefixCls,c=i===void 0?"rc-image":i,u=t.previewPrefixCls,f=u===void 0?"".concat(c,"-preview"):u,d=t.placeholder,p=t.fallback,v=t.width,g=t.height,x=t.style,w=t.preview,C=w===void 0?!0:w,m=t.className,A=t.onClick,S=t.onError,D=t.wrapperClassName,$=t.wrapperStyle,F=t.rootClassName,B=Vr(t,W4),R=d&&d!==!0,I=xn(C)==="object"?C:{},T=I.src,W=I.visible,H=W===void 0?void 0:W,Z=I.onVisibleChange,Y=Z===void 0?o:Z,j=I.getContainer,K=j===void 0?void 0:j,U=I.mask,G=I.maskClassName,J=I.movable,z=I.icons,ie=I.scaleStep,ge=I.minScale,xe=I.maxScale,Ae=I.imageRender,Fe=I.toolbarRender,be=Vr(I,V4),X=T??r,fe=Vi(!!H,{value:H,onChange:Y}),ce=Et(fe,2),se=ce[0],oe=ce[1],he=w1({src:r,isCustomPlaceholder:R,fallback:p}),we=Et(he,3),Ce=we[0],ke=we[1],Se=we[2],Te=St(null),Ie=Et(Te,2),We=Ie[0],ut=Ie[1],ot=go(ei),Oe=!!C,je=function(){oe(!1),ut(null)},Ve=vt(c,D,F,_e({},"".concat(c,"-error"),Se==="error")),ft=ht(function(){var bt={};return s0.forEach(function(At){t[At]!==void 0&&(bt[At]=t[At])}),bt},s0.map(function(bt){return t[bt]})),tt=ht(function(){return Ke(Ke({},ft),{},{src:X})},[X,ft]),nt=K4(Oe,tt),Tt=function(At){var yt=F4(At.target),Me=yt.left,ue=yt.top;ot?ot.onPreview(nt,X,Me,ue):(ut({x:Me,y:ue}),oe(!0)),A==null||A(At)};return N.createElement(N.Fragment,null,N.createElement("div",Ft({},B,{className:Ve,onClick:Oe?Tt:A,style:Ke({width:v,height:g},$)}),N.createElement("img",Ft({},ft,{className:vt("".concat(c,"-img"),_e({},"".concat(c,"-img-placeholder"),d===!0),m),style:Ke({height:g},x),ref:Ce},ke,{width:v,height:g,onError:S})),Se==="loading"&&N.createElement("div",{"aria-hidden":"true",className:"".concat(c,"-placeholder")},d),U&&Oe&&N.createElement("div",{className:vt("".concat(c,"-mask"),G),style:{display:(x==null?void 0:x.display)==="none"?"none":void 0}},U)),!ot&&Oe&&N.createElement(C1,Ft({"aria-hidden":!se,visible:se,prefixCls:f,onClose:je,mousePosition:We,src:X,alt:n,imageInfo:{width:v,height:g},fallback:p,getContainer:K,icons:z,movable:J,scaleStep:ie,minScale:ge,maxScale:xe,rootClassName:F,imageRender:Ae,imgCommonProps:ft,toolbarRender:Fe},be)))};tu.PreviewGroup=q4;var U4={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M672 418H144c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H188V494h440v326z"}},{tag:"path",attrs:{d:"M819.3 328.5c-78.8-100.7-196-153.6-314.6-154.2l-.2-64c0-6.5-7.6-10.1-12.6-6.1l-128 101c-4 3.1-3.9 9.1 0 12.3L492 318.6c5.1 4 12.7.4 12.6-6.1v-63.9c12.9.1 25.9.9 38.8 2.5 42.1 5.2 82.1 18.2 119 38.7 38.1 21.2 71.2 49.7 98.4 84.3 27.1 34.7 46.7 73.7 58.1 115.8a325.95 325.95 0 016.5 140.9h74.9c14.8-103.6-11.3-213-81-302.3z"}}]},name:"rotate-left",theme:"outlined"},X4=function(t,r){return N.createElement(tn,Ft({},t,{ref:r,icon:U4}))},G4=N.forwardRef(X4),Y4={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M480.5 251.2c13-1.6 25.9-2.4 38.8-2.5v63.9c0 6.5 7.5 10.1 12.6 6.1L660 217.6c4-3.2 4-9.2 0-12.3l-128-101c-5.1-4-12.6-.4-12.6 6.1l-.2 64c-118.6.5-235.8 53.4-314.6 154.2A399.75 399.75 0 00123.5 631h74.9c-.9-5.3-1.7-10.7-2.4-16.1-5.1-42.1-2.1-84.1 8.9-124.8 11.4-42.2 31-81.1 58.1-115.8 27.2-34.7 60.3-63.2 98.4-84.3 37-20.6 76.9-33.6 119.1-38.8z"}},{tag:"path",attrs:{d:"M880 418H352c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H396V494h440v326z"}}]},name:"rotate-right",theme:"outlined"},Z4=function(t,r){return N.createElement(tn,Ft({},t,{ref:r,icon:Y4}))},J4=N.forwardRef(Z4),Q4={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M847.9 592H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h605.2L612.9 851c-4.1 5.2-.4 13 6.3 13h72.5c4.9 0 9.5-2.2 12.6-6.1l168.8-214.1c16.5-21 1.6-51.8-25.2-51.8zM872 356H266.8l144.3-183c4.1-5.2.4-13-6.3-13h-72.5c-4.9 0-9.5 2.2-12.6 6.1L150.9 380.2c-16.5 21-1.6 51.8 25.1 51.8h696c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"swap",theme:"outlined"},e2=function(t,r){return N.createElement(tn,Ft({},t,{ref:r,icon:Q4}))},nd=N.forwardRef(e2),t2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M637 443H519V309c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v134H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h118v134c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V519h118c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"}}]},name:"zoom-in",theme:"outlined"},r2=function(t,r){return N.createElement(tn,Ft({},t,{ref:r,icon:t2}))},n2=N.forwardRef(r2),o2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M637 443H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h312c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"}}]},name:"zoom-out",theme:"outlined"},a2=function(t,r){return N.createElement(tn,Ft({},t,{ref:r,icon:o2}))},i2=N.forwardRef(a2);const l0=e=>({position:e||"absolute",inset:0}),s2=e=>{const{iconCls:t,motionDurationSlow:r,paddingXXS:n,marginXXS:o,prefixCls:i,colorTextLightSolid:c}=e;return{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",color:c,background:new gn("#000").setA(.5).toRgbString(),cursor:"pointer",opacity:0,transition:`opacity ${r}`,[`.${i}-mask-info`]:Object.assign(Object.assign({},i1),{padding:`0 ${pt(n)}`,[t]:{marginInlineEnd:o,svg:{verticalAlign:"baseline"}}})}},l2=e=>{const{previewCls:t,modalMaskBg:r,paddingSM:n,marginXL:o,margin:i,paddingLG:c,previewOperationColorDisabled:u,previewOperationHoverColor:f,motionDurationSlow:d,iconCls:p,colorTextLightSolid:v}=e,g=new gn(r).setA(.1),x=g.clone().setA(.2);return{[`${t}-footer`]:{position:"fixed",bottom:o,left:{_skip_check_:!0,value:"50%"},display:"flex",flexDirection:"column",alignItems:"center",color:e.previewOperationColor,transform:"translateX(-50%)"},[`${t}-progress`]:{marginBottom:i},[`${t}-close`]:{position:"fixed",top:o,right:{_skip_check_:!0,value:o},display:"flex",color:v,backgroundColor:g.toRgbString(),borderRadius:"50%",padding:n,outline:0,border:0,cursor:"pointer",transition:`all ${d}`,"&:hover":{backgroundColor:x.toRgbString()},[`& > ${p}`]:{fontSize:e.previewOperationSize}},[`${t}-operations`]:{display:"flex",alignItems:"center",padding:`0 ${pt(c)}`,backgroundColor:g.toRgbString(),borderRadius:100,"&-operation":{marginInlineStart:n,padding:n,cursor:"pointer",transition:`all ${d}`,userSelect:"none",[`&:not(${t}-operations-operation-disabled):hover > ${p}`]:{color:f},"&-disabled":{color:u,cursor:"not-allowed"},"&:first-of-type":{marginInlineStart:0},[`& > ${p}`]:{fontSize:e.previewOperationSize}}}}},u2=e=>{const{modalMaskBg:t,iconCls:r,previewOperationColorDisabled:n,previewCls:o,zIndexPopup:i,motionDurationSlow:c}=e,u=new gn(t).setA(.1),f=u.clone().setA(.2);return{[`${o}-switch-left, ${o}-switch-right`]:{position:"fixed",insetBlockStart:"50%",zIndex:e.calc(i).add(1).equal(),display:"flex",alignItems:"center",justifyContent:"center",width:e.imagePreviewSwitchSize,height:e.imagePreviewSwitchSize,marginTop:e.calc(e.imagePreviewSwitchSize).mul(-1).div(2).equal(),color:e.previewOperationColor,background:u.toRgbString(),borderRadius:"50%",transform:"translateY(-50%)",cursor:"pointer",transition:`all ${c}`,userSelect:"none","&:hover":{background:f.toRgbString()},"&-disabled":{"&, &:hover":{color:n,background:"transparent",cursor:"not-allowed",[`> ${r}`]:{cursor:"not-allowed"}}},[`> ${r}`]:{fontSize:e.previewOperationSize}},[`${o}-switch-left`]:{insetInlineStart:e.marginSM},[`${o}-switch-right`]:{insetInlineEnd:e.marginSM}}},c2=e=>{const{motionEaseOut:t,previewCls:r,motionDurationSlow:n,componentCls:o}=e;return[{[`${o}-preview-root`]:{[r]:{height:"100%",textAlign:"center",pointerEvents:"none"},[`${r}-body`]:Object.assign(Object.assign({},l0()),{overflow:"hidden"}),[`${r}-img`]:{maxWidth:"100%",maxHeight:"70%",verticalAlign:"middle",transform:"scale3d(1, 1, 1)",cursor:"grab",transition:`transform ${n} ${t} 0s`,userSelect:"none","&-wrapper":Object.assign(Object.assign({},l0()),{transition:`transform ${n} ${t} 0s`,display:"flex",justifyContent:"center",alignItems:"center","& > *":{pointerEvents:"auto"},"&::before":{display:"inline-block",width:1,height:"50%",marginInlineEnd:-1,content:'""'}})},[`${r}-moving`]:{[`${r}-preview-img`]:{cursor:"grabbing","&-wrapper":{transitionDuration:"0s"}}}}},{[`${o}-preview-root`]:{[`${r}-wrap`]:{zIndex:e.zIndexPopup}}},{[`${o}-preview-operations-wrapper`]:{position:"fixed",zIndex:e.calc(e.zIndexPopup).add(1).equal()},"&":[l2(e),u2(e)]}]},d2=e=>{const{componentCls:t}=e;return{[t]:{position:"relative",display:"inline-block",[`${t}-img`]:{width:"100%",height:"auto",verticalAlign:"middle"},[`${t}-img-placeholder`]:{backgroundColor:e.colorBgContainerDisabled,backgroundImage:"url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTQuNSAyLjVoLTEzQS41LjUgMCAwIDAgMSAzdjEwYS41LjUgMCAwIDAgLjUuNWgxM2EuNS41IDAgMCAwIC41LS41VjNhLjUuNSAwIDAgMC0uNS0uNXpNNS4yODEgNC43NWExIDEgMCAwIDEgMCAyIDEgMSAwIDAgMSAwLTJ6bTguMDMgNi44M2EuMTI3LjEyNyAwIDAgMS0uMDgxLjAzSDIuNzY5YS4xMjUuMTI1IDAgMCAxLS4wOTYtLjIwN2wyLjY2MS0zLjE1NmEuMTI2LjEyNiAwIDAgMSAuMTc3LS4wMTZsLjAxNi4wMTZMNy4wOCAxMC4wOWwyLjQ3LTIuOTNhLjEyNi4xMjYgMCAwIDEgLjE3Ny0uMDE2bC4wMTUuMDE2IDMuNTg4IDQuMjQ0YS4xMjcuMTI3IDAgMCAxLS4wMi4xNzV6IiBmaWxsPSIjOEM4QzhDIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=')",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundSize:"30%"},[`${t}-mask`]:Object.assign({},s2(e)),[`${t}-mask:hover`]:{opacity:1},[`${t}-placeholder`]:Object.assign({},l0())}}},f2=e=>{const{previewCls:t}=e;return{[`${t}-root`]:Ig(e,"zoom"),"&":_g(e,!0)}},h2=e=>({zIndexPopup:e.zIndexPopupBase+80,previewOperationColor:new gn(e.colorTextLightSolid).setA(.65).toRgbString(),previewOperationHoverColor:new gn(e.colorTextLightSolid).setA(.85).toRgbString(),previewOperationColorDisabled:new gn(e.colorTextLightSolid).setA(.25).toRgbString(),previewOperationSize:e.fontSizeIcon*1.5}),D1=U0("Image",e=>{const t=`${e.componentCls}-preview`,r=Ui(e,{previewCls:t,modalMaskBg:new gn("#000").setA(.45).toRgbString(),imagePreviewSwitchSize:e.controlHeightLG});return[d2(r),c2(r),zg(Ui(r,{componentCls:t})),f2(r)]},h2);var p2=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const k1={rotateLeft:N.createElement(G4,null),rotateRight:N.createElement(J4,null),zoomIn:N.createElement(n2,null),zoomOut:N.createElement(i2,null),close:N.createElement(jg,null),left:N.createElement(a0,null),right:N.createElement(o0,null),flipX:N.createElement(nd,null),flipY:N.createElement(nd,{rotate:90})},m2=e=>{var{previewPrefixCls:t,preview:r}=e,n=p2(e,["previewPrefixCls","preview"]);const{getPrefixCls:o,direction:i}=N.useContext(Ja),c=o("image",t),u=`${c}-preview`,f=o(),d=X0(c),[p,v,g]=D1(c,d),[x]=s1("ImagePreview",typeof r=="object"?r.zIndex:void 0),w=N.useMemo(()=>Object.assign(Object.assign({},k1),{left:i==="rtl"?N.createElement(o0,null):N.createElement(a0,null),right:i==="rtl"?N.createElement(a0,null):N.createElement(o0,null)}),[i]),C=N.useMemo(()=>{var m;if(r===!1)return r;const A=typeof r=="object"?r:{},S=vt(v,g,d,(m=A.rootClassName)!==null&&m!==void 0?m:"");return Object.assign(Object.assign({},A),{transitionName:Xi(f,"zoom",A.transitionName),maskTransitionName:Xi(f,"fade",A.maskTransitionName),rootClassName:S,zIndex:x})},[r,f,x,v,g,d]);return p(N.createElement(tu.PreviewGroup,Object.assign({preview:C,previewPrefixCls:u,icons:w},n)))};var od=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const E1=e=>{const{prefixCls:t,preview:r,className:n,rootClassName:o,style:i,fallback:c}=e,u=od(e,["prefixCls","preview","className","rootClassName","style","fallback"]),{getPrefixCls:f,getPopupContainer:d,className:p,style:v,preview:g,fallback:x}=Lg("image"),[w]=Hg("Image"),C=f("image",t),m=f(),A=X0(C),[S,D,$]=D1(C,A),F=vt(o,D,$,A),B=vt(n,D,p),[R]=s1("ImagePreview",typeof r=="object"?r.zIndex:void 0),I=N.useMemo(()=>{if(r===!1)return r;const H=typeof r=="object"?r:{},{getContainer:Z,closeIcon:Y,rootClassName:j,destroyOnClose:K,destroyOnHidden:U}=H,G=od(H,["getContainer","closeIcon","rootClassName","destroyOnClose","destroyOnHidden"]);return Object.assign(Object.assign({mask:N.createElement("div",{className:`${C}-mask-info`},N.createElement(qg,null),w==null?void 0:w.preview),icons:k1},G),{destroyOnClose:U??K,rootClassName:vt(F,j),getContainer:Z??d,transitionName:Xi(m,"zoom",H.transitionName),maskTransitionName:Xi(m,"fade",H.maskTransitionName),zIndex:R,closeIcon:Y??(g==null?void 0:g.closeIcon)})},[r,w,g==null?void 0:g.closeIcon]),T=Object.assign(Object.assign({},v),i),W=c??x;return S(N.createElement(tu,Object.assign({prefixCls:C,preview:I,rootClassName:F,className:B,style:T,fallback:W},u)))};E1.PreviewGroup=m2;var ao={},ti="rc-table-internal-hook";function ru(e){var t=N.createContext(void 0),r=function(o){var i=o.value,c=o.children,u=N.useRef(i);u.current=i;var f=N.useState(function(){return{getValue:function(){return u.current},listeners:new Set}}),d=Et(f,1),p=d[0];return fo(function(){Og(function(){p.listeners.forEach(function(v){v(i)})})},[i]),N.createElement(t.Provider,{value:p},c)};return{Context:t,Provider:r,defaultValue:e}}function qr(e,t){var r=ho(typeof t=="function"?t:function(v){if(t===void 0)return v;if(!Array.isArray(t))return v[t];var g={};return t.forEach(function(x){g[x]=v[x]}),g}),n=N.useContext(e==null?void 0:e.Context),o=n||{},i=o.listeners,c=o.getValue,u=N.useRef();u.current=r(n?c():e==null?void 0:e.defaultValue);var f=N.useState({}),d=Et(f,2),p=d[1];return fo(function(){if(!n)return;function v(g){var x=r(g);ta(u.current,x,!0)||p({})}return i.add(v),function(){i.delete(v)}},[n]),u.current}function g2(){var e=N.createContext(null);function t(){return N.useContext(e)}function r(o,i){var c=Xc(o),u=function(d,p){var v=c?{ref:p}:{},g=N.useRef(0),x=N.useRef(d),w=t();return w!==null?N.createElement(o,Ft({},d,v)):((!i||i(x.current,d))&&(g.current+=1),x.current=d,N.createElement(e.Provider,{value:g.current},N.createElement(o,Ft({},d,v))))};return c?N.forwardRef(u):u}function n(o,i){var c=Xc(o),u=function(d,p){var v=c?{ref:p}:{};return t(),N.createElement(o,Ft({},d,v))};return c?N.memo(N.forwardRef(u),i):N.memo(u,i)}return{makeImmutable:r,responseImmutable:n,useImmutableMark:t}}var nu=g2(),S1=nu.makeImmutable,ca=nu.responseImmutable,v2=nu.useImmutableMark,Xr=ru(),A1=N.createContext({renderWithProps:!1}),b2="RC_TABLE_KEY";function y2(e){return e==null?[]:Array.isArray(e)?e:[e]}function hs(e){var t=[],r={};return e.forEach(function(n){for(var o=n||{},i=o.key,c=o.dataIndex,u=i||y2(c).join("-")||b2;r[u];)u="".concat(u,"_next");r[u]=!0,t.push(u)}),t}function u0(e){return e!=null}function x2(e){return typeof e=="number"&&!Number.isNaN(e)}function w2(e){return e&&xn(e)==="object"&&!Array.isArray(e)&&!N.isValidElement(e)}function C2(e,t,r,n,o,i){var c=N.useContext(A1),u=v2(),f=l1(function(){if(u0(n))return[n];var d=t==null||t===""?[]:Array.isArray(t)?t:[t],p=G0(e,d),v=p,g=void 0;if(o){var x=o(p,e,r);w2(x)?(v=x.children,g=x.props,c.renderWithProps=!0):v=x}return[v,g]},[u,e,n,t,o,r],function(d,p){if(i){var v=Et(d,2),g=v[1],x=Et(p,2),w=x[1];return i(w,g)}return c.renderWithProps?!0:!ta(d,p,!0)});return f}function D2(e,t,r,n){var o=e+t-1;return e<=n&&o>=r}function k2(e,t){return qr(Xr,function(r){var n=D2(e,t||1,r.hoverStartRow,r.hoverEndRow);return[n,r.onHover]})}var E2=function(t){var r=t.ellipsis,n=t.rowType,o=t.children,i,c=r===!0?{showTitle:!0}:r;return c&&(c.showTitle||n==="header")&&(typeof o=="string"||typeof o=="number"?i=o.toString():N.isValidElement(o)&&typeof o.props.children=="string"&&(i=o.props.children)),i};function S2(e){var t,r,n,o,i,c,u,f,d=e.component,p=e.children,v=e.ellipsis,g=e.scope,x=e.prefixCls,w=e.className,C=e.align,m=e.record,A=e.render,S=e.dataIndex,D=e.renderIndex,$=e.shouldCellUpdate,F=e.index,B=e.rowType,R=e.colSpan,I=e.rowSpan,T=e.fixLeft,W=e.fixRight,H=e.firstFixLeft,Z=e.lastFixLeft,Y=e.firstFixRight,j=e.lastFixRight,K=e.appendNode,U=e.additionalProps,G=U===void 0?{}:U,J=e.isSticky,z="".concat(x,"-cell"),ie=qr(Xr,["supportSticky","allColumnsFixedLeft","rowHoverable"]),ge=ie.supportSticky,xe=ie.allColumnsFixedLeft,Ae=ie.rowHoverable,Fe=C2(m,S,D,p,A,$),be=Et(Fe,2),X=be[0],fe=be[1],ce={},se=typeof T=="number"&&ge,oe=typeof W=="number"&≥se&&(ce.position="sticky",ce.left=T),oe&&(ce.position="sticky",ce.right=W);var he=(t=(r=(n=fe==null?void 0:fe.colSpan)!==null&&n!==void 0?n:G.colSpan)!==null&&r!==void 0?r:R)!==null&&t!==void 0?t:1,we=(o=(i=(c=fe==null?void 0:fe.rowSpan)!==null&&c!==void 0?c:G.rowSpan)!==null&&i!==void 0?i:I)!==null&&o!==void 0?o:1,Ce=k2(F,we),ke=Et(Ce,2),Se=ke[0],Te=ke[1],Ie=ho(function(ft){var tt;m&&Te(F,F+we-1),G==null||(tt=G.onMouseEnter)===null||tt===void 0||tt.call(G,ft)}),We=ho(function(ft){var tt;m&&Te(-1,-1),G==null||(tt=G.onMouseLeave)===null||tt===void 0||tt.call(G,ft)});if(he===0||we===0)return null;var ut=(u=G.title)!==null&&u!==void 0?u:E2({rowType:B,ellipsis:v,children:X}),ot=vt(z,w,(f={},_e(_e(_e(_e(_e(_e(_e(_e(_e(_e(f,"".concat(z,"-fix-left"),se&&ge),"".concat(z,"-fix-left-first"),H&&ge),"".concat(z,"-fix-left-last"),Z&&ge),"".concat(z,"-fix-left-all"),Z&&xe&&ge),"".concat(z,"-fix-right"),oe&&ge),"".concat(z,"-fix-right-first"),Y&&ge),"".concat(z,"-fix-right-last"),j&&ge),"".concat(z,"-ellipsis"),v),"".concat(z,"-with-append"),K),"".concat(z,"-fix-sticky"),(se||oe)&&J&&ge),_e(f,"".concat(z,"-row-hover"),!fe&&Se)),G.className,fe==null?void 0:fe.className),Oe={};C&&(Oe.textAlign=C);var je=Ke(Ke(Ke(Ke({},fe==null?void 0:fe.style),ce),Oe),G.style),Ve=X;return xn(Ve)==="object"&&!Array.isArray(Ve)&&!N.isValidElement(Ve)&&(Ve=null),v&&(Z||Y)&&(Ve=N.createElement("span",{className:"".concat(z,"-content")},Ve)),N.createElement(d,Ft({},fe,G,{className:ot,style:je,title:ut,scope:g,onMouseEnter:Ae?Ie:void 0,onMouseLeave:Ae?We:void 0,colSpan:he!==1?he:null,rowSpan:we!==1?we:null}),K,Ve)}const da=N.memo(S2);function ou(e,t,r,n,o){var i=r[e]||{},c=r[t]||{},u,f;i.fixed==="left"?u=n.left[o==="rtl"?t:e]:c.fixed==="right"&&(f=n.right[o==="rtl"?e:t]);var d=!1,p=!1,v=!1,g=!1,x=r[t+1],w=r[e-1],C=x&&!x.fixed||w&&!w.fixed||r.every(function($){return $.fixed==="left"});if(o==="rtl"){if(u!==void 0){var m=w&&w.fixed==="left";g=!m&&C}else if(f!==void 0){var A=x&&x.fixed==="right";v=!A&&C}}else if(u!==void 0){var S=x&&x.fixed==="left";d=!S&&C}else if(f!==void 0){var D=w&&w.fixed==="right";p=!D&&C}return{fixLeft:u,fixRight:f,lastFixLeft:d,firstFixRight:p,lastFixRight:v,firstFixLeft:g,isSticky:n.isSticky}}var B1=N.createContext({});function A2(e){var t=e.className,r=e.index,n=e.children,o=e.colSpan,i=o===void 0?1:o,c=e.rowSpan,u=e.align,f=qr(Xr,["prefixCls","direction"]),d=f.prefixCls,p=f.direction,v=N.useContext(B1),g=v.scrollColumnIndex,x=v.stickyOffsets,w=v.flattenColumns,C=r+i-1,m=C+1===g?i+1:i,A=ou(r,r+m-1,w,x,p);return N.createElement(da,Ft({className:t,index:r,component:"td",prefixCls:d,record:null,dataIndex:null,align:u,colSpan:m,rowSpan:c,render:function(){return n}},A))}var B2=["children"];function F2(e){var t=e.children,r=Vr(e,B2);return N.createElement("tr",r,t)}function ps(e){var t=e.children;return t}ps.Row=F2;ps.Cell=A2;function N2(e){var t=e.children,r=e.stickyOffsets,n=e.flattenColumns,o=qr(Xr,"prefixCls"),i=n.length-1,c=n[i],u=N.useMemo(function(){return{stickyOffsets:r,flattenColumns:n,scrollColumnIndex:c!=null&&c.scrollbar?i:null}},[c,n,i,r]);return N.createElement(B1.Provider,{value:u},N.createElement("tfoot",{className:"".concat(o,"-summary")},t))}const yi=ca(N2);var F1=ps;function T2(e){return null}function O2(e){return null}function N1(e,t,r,n,o,i,c){var u=i(t,c);e.push({record:t,indent:r,index:c,rowKey:u});var f=o==null?void 0:o.has(u);if(t&&Array.isArray(t[n])&&f)for(var d=0;d<t[n].length;d+=1)N1(e,t[n][d],r+1,n,o,i,d)}function T1(e,t,r,n){var o=N.useMemo(function(){if(r!=null&&r.size){for(var i=[],c=0;c<(e==null?void 0:e.length);c+=1){var u=e[c];N1(i,u,0,t,r,n,c)}return i}return e==null?void 0:e.map(function(f,d){return{record:f,indent:0,index:d,rowKey:n(f,d)}})},[e,t,r,n]);return o}function O1(e,t,r,n){var o=qr(Xr,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),i=o.flattenColumns,c=o.expandableType,u=o.expandedKeys,f=o.childrenColumnName,d=o.onTriggerExpand,p=o.rowExpandable,v=o.onRow,g=o.expandRowByClick,x=o.rowClassName,w=c==="nest",C=c==="row"&&(!p||p(e)),m=C||w,A=u&&u.has(t),S=f&&e&&e[f],D=ho(d),$=v==null?void 0:v(e,r),F=$==null?void 0:$.onClick,B=function(W){g&&m&&d(e,W);for(var H=arguments.length,Z=new Array(H>1?H-1:0),Y=1;Y<H;Y++)Z[Y-1]=arguments[Y];F==null||F.apply(void 0,[W].concat(Z))},R;typeof x=="string"?R=x:typeof x=="function"&&(R=x(e,r,n));var I=hs(i);return Ke(Ke({},o),{},{columnsKey:I,nestExpandable:w,expanded:A,hasNestChildren:S,record:e,onTriggerExpand:D,rowSupportExpand:C,expandable:m,rowProps:Ke(Ke({},$),{},{className:vt(R,$==null?void 0:$.className),onClick:B})})}function $1(e){var t=e.prefixCls,r=e.children,n=e.component,o=e.cellComponent,i=e.className,c=e.expanded,u=e.colSpan,f=e.isEmpty,d=e.stickyOffset,p=d===void 0?0:d,v=qr(Xr,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),g=v.scrollbarSize,x=v.fixHeader,w=v.fixColumn,C=v.componentWidth,m=v.horizonScroll,A=r;return(f?m&&C:w)&&(A=N.createElement("div",{style:{width:C-p-(x&&!f?g:0),position:"sticky",left:p,overflow:"hidden"},className:"".concat(t,"-expanded-row-fixed")},A)),N.createElement(n,{className:i,style:{display:c?null:"none"}},N.createElement(da,{component:o,prefixCls:t,colSpan:u},A))}function $2(e){var t=e.prefixCls,r=e.record,n=e.onExpand,o=e.expanded,i=e.expandable,c="".concat(t,"-row-expand-icon");if(!i)return N.createElement("span",{className:vt(c,"".concat(t,"-row-spaced"))});var u=function(d){n(r,d),d.stopPropagation()};return N.createElement("span",{className:vt(c,_e(_e({},"".concat(t,"-row-expanded"),o),"".concat(t,"-row-collapsed"),!o)),onClick:u})}function M2(e,t,r){var n=[];function o(i){(i||[]).forEach(function(c,u){n.push(t(c,u)),o(c[r])})}return o(e),n}function M1(e,t,r,n){return typeof e=="string"?e:typeof e=="function"?e(t,r,n):""}function R1(e,t,r,n,o){var i,c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:[],u=arguments.length>6&&arguments[6]!==void 0?arguments[6]:0,f=e.record,d=e.prefixCls,p=e.columnsKey,v=e.fixedInfoList,g=e.expandIconColumnIndex,x=e.nestExpandable,w=e.indentSize,C=e.expandIcon,m=e.expanded,A=e.hasNestChildren,S=e.onTriggerExpand,D=e.expandable,$=e.expandedKeys,F=p[r],B=v[r],R;r===(g||0)&&x&&(R=N.createElement(N.Fragment,null,N.createElement("span",{style:{paddingLeft:"".concat(w*n,"px")},className:"".concat(d,"-row-indent indent-level-").concat(n)}),C({prefixCls:d,expanded:m,expandable:A,record:f,onExpand:S})));var I=((i=t.onCell)===null||i===void 0?void 0:i.call(t,f,o))||{};if(u){var T=I.rowSpan,W=T===void 0?1:T;if(D&&W&&r<u){for(var H=W,Z=o;Z<o+W;Z+=1){var Y=c[Z];$.has(Y)&&(H+=1)}I.rowSpan=H}}return{key:F,fixedInfo:B,appendCellNode:R,additionalCellProps:I}}function R2(e){var t=e.className,r=e.style,n=e.record,o=e.index,i=e.renderIndex,c=e.rowKey,u=e.rowKeys,f=e.indent,d=f===void 0?0:f,p=e.rowComponent,v=e.cellComponent,g=e.scopeCellComponent,x=e.expandedRowInfo,w=O1(n,c,o,d),C=w.prefixCls,m=w.flattenColumns,A=w.expandedRowClassName,S=w.expandedRowRender,D=w.rowProps,$=w.expanded,F=w.rowSupportExpand,B=N.useRef(!1);B.current||(B.current=$);var R=M1(A,n,o,d),I=N.createElement(p,Ft({},D,{"data-row-key":c,className:vt(t,"".concat(C,"-row"),"".concat(C,"-row-level-").concat(d),D==null?void 0:D.className,_e({},R,d>=1)),style:Ke(Ke({},r),D==null?void 0:D.style)}),m.map(function(H,Z){var Y=H.render,j=H.dataIndex,K=H.className,U=R1(w,H,Z,d,o,u,x==null?void 0:x.offset),G=U.key,J=U.fixedInfo,z=U.appendCellNode,ie=U.additionalCellProps;return N.createElement(da,Ft({className:K,ellipsis:H.ellipsis,align:H.align,scope:H.rowScope,component:H.rowScope?g:v,prefixCls:C,key:G,record:n,index:o,renderIndex:i,dataIndex:j,render:Y,shouldCellUpdate:H.shouldCellUpdate},J,{appendNode:z,additionalProps:ie}))})),T;if(F&&(B.current||$)){var W=S(n,o,d+1,$);T=N.createElement($1,{expanded:$,className:vt("".concat(C,"-expanded-row"),"".concat(C,"-expanded-row-level-").concat(d+1),R),prefixCls:C,component:p,cellComponent:v,colSpan:x?x.colSpan:m.length,stickyOffset:x==null?void 0:x.sticky,isEmpty:!1},W)}return N.createElement(N.Fragment,null,I,T)}const P2=ca(R2);function z2(e){var t=e.columnKey,r=e.onColumnResize,n=e.prefixCls,o=e.title,i=N.useRef();return fo(function(){i.current&&r(t,i.current.offsetWidth)},[]),N.createElement(Y0,{data:t},N.createElement("th",{ref:i,className:"".concat(n,"-measure-cell")},N.createElement("div",{className:"".concat(n,"-measure-cell-content")},o||"\xA0")))}function _2(e){var t=e.prefixCls,r=e.columnsKey,n=e.onColumnResize,o=e.columns,i=N.useRef(null),c=qr(Xr,["measureRowRender"]),u=c.measureRowRender,f=N.createElement("tr",{"aria-hidden":"true",className:"".concat(t,"-measure-row"),ref:i,tabIndex:-1},N.createElement(Y0.Collection,{onBatchResize:function(p){Kg(i.current)&&p.forEach(function(v){var g=v.data,x=v.size;n(g,x.offsetWidth)})}},r.map(function(d){var p=o.find(function(x){return x.key===d}),v=p==null?void 0:p.title,g=N.isValidElement(v)?N.cloneElement(v,{ref:null}):v;return N.createElement(z2,{prefixCls:t,key:d,columnKey:d,onColumnResize:n,title:g})})));return u?u(f):f}function I2(e){var t=e.data,r=e.measureColumnWidth,n=qr(Xr,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode","expandedRowOffset","fixedInfoList","colWidths"]),o=n.prefixCls,i=n.getComponent,c=n.onColumnResize,u=n.flattenColumns,f=n.getRowKey,d=n.expandedKeys,p=n.childrenColumnName,v=n.emptyNode,g=n.expandedRowOffset,x=g===void 0?0:g,w=n.colWidths,C=T1(t,p,d,f),m=N.useMemo(function(){return C.map(function(T){return T.rowKey})},[C]),A=N.useRef({renderWithProps:!1}),S=N.useMemo(function(){for(var T=u.length-x,W=0,H=0;H<x;H+=1)W+=w[H]||0;return{offset:x,colSpan:T,sticky:W}},[u.length,x,w]),D=i(["body","wrapper"],"tbody"),$=i(["body","row"],"tr"),F=i(["body","cell"],"td"),B=i(["body","cell"],"th"),R;t.length?R=C.map(function(T,W){var H=T.record,Z=T.indent,Y=T.index,j=T.rowKey;return N.createElement(P2,{key:j,rowKey:j,rowKeys:m,record:H,index:W,renderIndex:Y,rowComponent:$,cellComponent:F,scopeCellComponent:B,indent:Z,expandedRowInfo:S})}):R=N.createElement($1,{expanded:!0,className:"".concat(o,"-placeholder"),prefixCls:o,component:$,cellComponent:F,colSpan:u.length,isEmpty:!0},v);var I=hs(u);return N.createElement(A1.Provider,{value:A.current},N.createElement(D,{className:"".concat(o,"-tbody")},r&&N.createElement(_2,{prefixCls:o,columnsKey:I,onColumnResize:c,columns:u}),R))}const j2=ca(I2);var L2=["expandable"],Ta="RC_TABLE_INTERNAL_COL_DEFINE";function H2(e){var t=e.expandable,r=Vr(e,L2),n;return"expandable"in e?n=Ke(Ke({},r),t):n=r,n.showExpandColumn===!1&&(n.expandIconColumnIndex=-1),n}var q2=["columnType"];function P1(e){for(var t=e.colWidths,r=e.columns,n=e.columCount,o=qr(Xr,["tableLayout"]),i=o.tableLayout,c=[],u=n||r.length,f=!1,d=u-1;d>=0;d-=1){var p=t[d],v=r&&r[d],g=void 0,x=void 0;if(v&&(g=v[Ta],i==="auto"&&(x=v.minWidth)),p||x||g||f){var w=g||{};w.columnType;var C=Vr(w,q2);c.unshift(N.createElement("col",Ft({key:d,style:{width:p,minWidth:x}},C))),f=!0}}return c.length>0?N.createElement("colgroup",null,c):null}var K2=["className","noData","columns","flattenColumns","colWidths","colGroup","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","scrollX","tableLayout","onScroll","children"];function W2(e,t){return ht(function(){for(var r=[],n=0;n<t;n+=1){var o=e[n];if(o!==void 0)r[n]=o;else return null}return r},[e.join("_"),t])}var V2=N.forwardRef(function(e,t){var r=e.className,n=e.noData,o=e.columns,i=e.flattenColumns,c=e.colWidths,u=e.colGroup,f=e.columCount,d=e.stickyOffsets,p=e.direction,v=e.fixHeader,g=e.stickyTopOffset,x=e.stickyBottomOffset,w=e.stickyClassName,C=e.scrollX,m=e.tableLayout,A=m===void 0?"fixed":m,S=e.onScroll,D=e.children,$=Vr(e,K2),F=qr(Xr,["prefixCls","scrollbarSize","isSticky","getComponent"]),B=F.prefixCls,R=F.scrollbarSize,I=F.isSticky,T=F.getComponent,W=T(["header","table"],"table"),H=I&&!v?0:R,Z=N.useRef(null),Y=N.useCallback(function(ge){Gc(t,ge),Gc(Z,ge)},[]);N.useEffect(function(){function ge(Ae){var Fe=Ae,be=Fe.currentTarget,X=Fe.deltaX;X&&(S({currentTarget:be,scrollLeft:be.scrollLeft+X}),Ae.preventDefault())}var xe=Z.current;return xe==null||xe.addEventListener("wheel",ge,{passive:!1}),function(){xe==null||xe.removeEventListener("wheel",ge)}},[]);var j=i[i.length-1],K={fixed:j?j.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(B,"-cell-scrollbar")}}},U=ht(function(){return H?[].concat(Xt(o),[K]):o},[H,o]),G=ht(function(){return H?[].concat(Xt(i),[K]):i},[H,i]),J=ht(function(){var ge=d.right,xe=d.left;return Ke(Ke({},d),{},{left:p==="rtl"?[].concat(Xt(xe.map(function(Ae){return Ae+H})),[0]):xe,right:p==="rtl"?ge:[].concat(Xt(ge.map(function(Ae){return Ae+H})),[0]),isSticky:I})},[H,d,I]),z=W2(c,f),ie=ht(function(){var ge=!z||!z.length||z.every(function(xe){return!xe});return n||ge},[n,z]);return N.createElement("div",{style:Ke({overflow:"hidden"},I?{top:g,bottom:x}:{}),ref:Y,className:vt(r,_e({},w,!!w))},N.createElement(W,{style:{tableLayout:A,minWidth:"100%",width:C}},ie?u:N.createElement(P1,{colWidths:[].concat(Xt(z),[H]),columCount:f+1,columns:G}),D(Ke(Ke({},$),{},{stickyOffsets:J,columns:U,flattenColumns:G}))))});const ad=N.memo(V2);var U2=function(t){var r=t.cells,n=t.stickyOffsets,o=t.flattenColumns,i=t.rowComponent,c=t.cellComponent,u=t.onHeaderRow,f=t.index,d=qr(Xr,["prefixCls","direction"]),p=d.prefixCls,v=d.direction,g;u&&(g=u(r.map(function(w){return w.column}),f));var x=hs(r.map(function(w){return w.column}));return N.createElement(i,g,r.map(function(w,C){var m=w.column,A=ou(w.colStart,w.colEnd,o,n,v),S;return m&&m.onHeaderCell&&(S=w.column.onHeaderCell(m)),N.createElement(da,Ft({},w,{scope:m.title?w.colSpan>1?"colgroup":"col":null,ellipsis:m.ellipsis,align:m.align,component:c,prefixCls:p,key:x[C]},A,{additionalProps:S,rowType:"header"}))}))};function X2(e){var t=[];function r(c,u){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;t[f]=t[f]||[];var d=u,p=c.filter(Boolean).map(function(v){var g={key:v.key,className:v.className||"",children:v.title,column:v,colStart:d},x=1,w=v.children;return w&&w.length>0&&(x=r(w,d,f+1).reduce(function(C,m){return C+m},0),g.hasSubColumns=!0),"colSpan"in v&&(x=v.colSpan),"rowSpan"in v&&(g.rowSpan=v.rowSpan),g.colSpan=x,g.colEnd=g.colStart+x-1,t[f].push(g),d+=x,x});return p}r(e,0);for(var n=t.length,o=function(u){t[u].forEach(function(f){!("rowSpan"in f)&&!f.hasSubColumns&&(f.rowSpan=n-u)})},i=0;i<n;i+=1)o(i);return t}var G2=function(t){var r=t.stickyOffsets,n=t.columns,o=t.flattenColumns,i=t.onHeaderRow,c=qr(Xr,["prefixCls","getComponent"]),u=c.prefixCls,f=c.getComponent,d=N.useMemo(function(){return X2(n)},[n]),p=f(["header","wrapper"],"thead"),v=f(["header","row"],"tr"),g=f(["header","cell"],"th");return N.createElement(p,{className:"".concat(u,"-thead")},d.map(function(x,w){var C=N.createElement(U2,{key:w,flattenColumns:o,cells:x,stickyOffsets:r,rowComponent:v,cellComponent:g,onHeaderRow:i,index:w});return C}))};const id=ca(G2);function sd(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof t=="number"?t:t.endsWith("%")?e*parseFloat(t)/100:null}function Y2(e,t,r){return N.useMemo(function(){if(t&&t>0){var n=0,o=0;e.forEach(function(g){var x=sd(t,g.width);x?n+=x:o+=1});var i=Math.max(t,r),c=Math.max(i-n,o),u=o,f=c/o,d=0,p=e.map(function(g){var x=Ke({},g),w=sd(t,x.width);if(w)x.width=w;else{var C=Math.floor(f);x.width=u===1?c:C,c-=C,u-=1}return d+=x.width,x});if(d<i){var v=i/d;c=i,p.forEach(function(g,x){var w=Math.floor(g.width*v);g.width=x===p.length-1?c:w,c-=w})}return[p,Math.max(d,i)]}return[e,t]},[e,t,r])}var Z2=["children"],J2=["fixed"];function au(e){return o1(e).filter(function(t){return N.isValidElement(t)}).map(function(t){var r=t.key,n=t.props,o=n.children,i=Vr(n,Z2),c=Ke({key:r},i);return o&&(c.children=au(o)),c})}function z1(e){return e.filter(function(t){return t&&xn(t)==="object"&&!t.hidden}).map(function(t){var r=t.children;return r&&r.length>0?Ke(Ke({},t),{},{children:z1(r)}):t})}function c0(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return e.filter(function(r){return r&&xn(r)==="object"}).reduce(function(r,n,o){var i=n.fixed,c=i===!0?"left":i,u="".concat(t,"-").concat(o),f=n.children;return f&&f.length>0?[].concat(Xt(r),Xt(c0(f,u).map(function(d){var p;return Ke(Ke({},d),{},{fixed:(p=d.fixed)!==null&&p!==void 0?p:c})}))):[].concat(Xt(r),[Ke(Ke({key:u},n),{},{fixed:c})])},[])}function Q2(e){return e.map(function(t){var r=t.fixed,n=Vr(t,J2),o=r;return r==="left"?o="right":r==="right"&&(o="left"),Ke({fixed:o},n)})}function e3(e,t){var r=e.prefixCls,n=e.columns,o=e.children,i=e.expandable,c=e.expandedKeys,u=e.columnTitle,f=e.getRowKey,d=e.onTriggerExpand,p=e.expandIcon,v=e.rowExpandable,g=e.expandIconColumnIndex,x=e.expandedRowOffset,w=x===void 0?0:x,C=e.direction,m=e.expandRowByClick,A=e.columnWidth,S=e.fixed,D=e.scrollWidth,$=e.clientWidth,F=N.useMemo(function(){var j=n||au(o)||[];return z1(j.slice())},[n,o]),B=N.useMemo(function(){if(i){var j=F.slice();if(!j.includes(ao)){var K=g||0,U=K===0&&S==="right"?F.length:K;U>=0&&j.splice(U,0,ao)}var G=j.indexOf(ao);j=j.filter(function(ge,xe){return ge!==ao||xe===G});var J=F[G],z;S?z=S:z=J?J.fixed:null;var ie=_e(_e(_e(_e(_e(_e({},Ta,{className:"".concat(r,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),"title",u),"fixed",z),"className","".concat(r,"-row-expand-icon-cell")),"width",A),"render",function(xe,Ae,Fe){var be=f(Ae,Fe),X=c.has(be),fe=v?v(Ae):!0,ce=p({prefixCls:r,expanded:X,expandable:fe,record:Ae,onExpand:d});return m?N.createElement("span",{onClick:function(oe){return oe.stopPropagation()}},ce):ce});return j.map(function(ge,xe){var Ae=ge===ao?ie:ge;return xe<w?Ke(Ke({},Ae),{},{fixed:Ae.fixed||"left"}):Ae})}return F.filter(function(ge){return ge!==ao})},[i,F,f,c,p,C,w]),R=N.useMemo(function(){var j=B;return t&&(j=t(j)),j.length||(j=[{render:function(){return null}}]),j},[t,B,C]),I=N.useMemo(function(){return C==="rtl"?Q2(c0(R)):c0(R)},[R,C,D]),T=N.useMemo(function(){for(var j=-1,K=I.length-1;K>=0;K-=1){var U=I[K].fixed;if(U==="left"||U===!0){j=K;break}}if(j>=0)for(var G=0;G<=j;G+=1){var J=I[G].fixed;if(J!=="left"&&J!==!0)return!0}var z=I.findIndex(function(xe){var Ae=xe.fixed;return Ae==="right"});if(z>=0)for(var ie=z;ie<I.length;ie+=1){var ge=I[ie].fixed;if(ge!=="right")return!0}return!1},[I]),W=Y2(I,D,$),H=Et(W,2),Z=H[0],Y=H[1];return[R,Z,Y,T]}function t3(e,t,r){var n=H2(e),o=n.expandIcon,i=n.expandedRowKeys,c=n.defaultExpandedRowKeys,u=n.defaultExpandAllRows,f=n.expandedRowRender,d=n.onExpand,p=n.onExpandedRowsChange,v=n.childrenColumnName,g=o||$2,x=v||"children",w=N.useMemo(function(){return f?"row":e.expandable&&e.internalHooks===ti&&e.expandable.__PARENT_RENDER_ICON__||t.some(function(F){return F&&xn(F)==="object"&&F[x]})?"nest":!1},[!!f,t]),C=N.useState(function(){return c||(u?M2(t,r,x):[])}),m=Et(C,2),A=m[0],S=m[1],D=N.useMemo(function(){return new Set(i||A||[])},[i,A]),$=N.useCallback(function(F){var B=r(F,t.indexOf(F)),R,I=D.has(B);I?(D.delete(B),R=Xt(D)):R=[].concat(Xt(D),[B]),S(R),d&&d(!I,F),p&&p(R)},[r,D,t,d,p]);return[n,w,D,g,x,$]}function r3(e,t,r){var n=e.map(function(o,i){return ou(i,i,e,t,r)});return l1(function(){return n},[n],function(o,i){return!ta(o,i)})}function n3(e){var t=Ht(e),r=St({}),n=Et(r,2),o=n[1],i=Ht(null),c=Ht([]);function u(f){c.current.push(f);var d=Promise.resolve();i.current=d,d.then(function(){if(i.current===d){var p=c.current,v=t.current;c.current=[],p.forEach(function(g){t.current=g(t.current)}),i.current=null,v!==t.current&&o({})}})}return Jt(function(){return function(){i.current=null}},[]),[t.current,u]}function o3(e){var t=Ht(null),r=Ht();function n(){window.clearTimeout(r.current)}function o(c){t.current=c,n(),r.current=window.setTimeout(function(){t.current=null,r.current=void 0},100)}function i(){return t.current}return Jt(function(){return n},[]),[o,i]}function a3(){var e=N.useState(-1),t=Et(e,2),r=t[0],n=t[1],o=N.useState(-1),i=Et(o,2),c=i[0],u=i[1],f=N.useCallback(function(d,p){n(d),u(p)},[]);return[r,c,f]}var ld=r1()?window:null;function i3(e,t){var r=xn(e)==="object"?e:{},n=r.offsetHeader,o=n===void 0?0:n,i=r.offsetSummary,c=i===void 0?0:i,u=r.offsetScroll,f=u===void 0?0:u,d=r.getContainer,p=d===void 0?function(){return ld}:d,v=p()||ld,g=!!e;return N.useMemo(function(){return{isSticky:g,stickyClassName:g?"".concat(t,"-sticky-holder"):"",offsetHeader:o,offsetSummary:c,offsetScroll:f,container:v}},[g,f,o,c,t,v])}function s3(e,t,r){var n=ht(function(){var o=t.length,i=function(d,p,v){for(var g=[],x=0,w=d;w!==p;w+=v)g.push(x),t[w].fixed&&(x+=e[w]||0);return g},c=i(0,o,1),u=i(o-1,-1,-1).reverse();return r==="rtl"?{left:u,right:c}:{left:c,right:u}},[e,t,r]);return n}function ud(e){var t=e.className,r=e.children;return N.createElement("div",{className:t},r)}function cd(e){var t=Z0(e),r=t.getBoundingClientRect(),n=document.documentElement;return{left:r.left+(window.pageXOffset||n.scrollLeft)-(n.clientLeft||document.body.clientLeft||0),top:r.top+(window.pageYOffset||n.scrollTop)-(n.clientTop||document.body.clientTop||0)}}var l3=function(t,r){var n,o,i=t.scrollBodyRef,c=t.onScroll,u=t.offsetScroll,f=t.container,d=t.direction,p=qr(Xr,"prefixCls"),v=((n=i.current)===null||n===void 0?void 0:n.scrollWidth)||0,g=((o=i.current)===null||o===void 0?void 0:o.clientWidth)||0,x=v&&g*(g/v),w=N.useRef(),C=n3({scrollLeft:0,isHiddenScrollBar:!0}),m=Et(C,2),A=m[0],S=m[1],D=N.useRef({delta:0,x:0}),$=N.useState(!1),F=Et($,2),B=F[0],R=F[1],I=N.useRef(null);N.useEffect(function(){return function(){Xo.cancel(I.current)}},[]);var T=function(){R(!1)},W=function(K){K.persist(),D.current.delta=K.pageX-A.scrollLeft,D.current.x=0,R(!0),K.preventDefault()},H=function(K){var U,G=K||((U=window)===null||U===void 0?void 0:U.event),J=G.buttons;if(!B||J===0){B&&R(!1);return}var z=D.current.x+K.pageX-D.current.x-D.current.delta,ie=d==="rtl";z=Math.max(ie?x-g:0,Math.min(ie?0:g-x,z));var ge=!ie||Math.abs(z)+Math.abs(x)<g;ge&&(c({scrollLeft:z/g*(v+2)}),D.current.x=K.pageX)},Z=function(){Xo.cancel(I.current),I.current=Xo(function(){if(i.current){var K=cd(i.current).top,U=K+i.current.offsetHeight,G=f===window?document.documentElement.scrollTop+window.innerHeight:cd(f).top+f.clientHeight;S(function(J){return Ke(Ke({},J),{},{isHiddenScrollBar:U-Yc()<=G||K>=G-u})})}})},Y=function(K){S(function(U){return Ke(Ke({},U),{},{scrollLeft:v?K/v*g:0})})};return N.useImperativeHandle(r,function(){return{setScrollLeft:Y,checkScrollBarVisible:Z}}),N.useEffect(function(){var j=uo(document.body,"mouseup",T,!1),K=uo(document.body,"mousemove",H,!1);return Z(),function(){j.remove(),K.remove()}},[x,B]),N.useEffect(function(){if(i.current){for(var j=[],K=Z0(i.current);K;)j.push(K),K=K.parentElement;return j.forEach(function(U){return U.addEventListener("scroll",Z,!1)}),window.addEventListener("resize",Z,!1),window.addEventListener("scroll",Z,!1),f.addEventListener("scroll",Z,!1),function(){j.forEach(function(U){return U.removeEventListener("scroll",Z)}),window.removeEventListener("resize",Z),window.removeEventListener("scroll",Z),f.removeEventListener("scroll",Z)}}},[f]),N.useEffect(function(){A.isHiddenScrollBar||S(function(j){var K=i.current;return K?Ke(Ke({},j),{},{scrollLeft:K.scrollLeft/K.scrollWidth*K.clientWidth}):j})},[A.isHiddenScrollBar]),v<=g||!x||A.isHiddenScrollBar?null:N.createElement("div",{style:{height:Yc(),width:g,bottom:u},className:"".concat(p,"-sticky-scroll")},N.createElement("div",{onMouseDown:W,ref:w,className:vt("".concat(p,"-sticky-scroll-bar"),_e({},"".concat(p,"-sticky-scroll-bar-active"),B)),style:{width:"".concat(x,"px"),transform:"translate3d(".concat(A.scrollLeft,"px, 0, 0)")}}))};const u3=N.forwardRef(l3);var _1="rc-table",c3=[],d3={};function f3(){return"No Data"}function h3(e,t){var r=Ke({rowKey:"key",prefixCls:_1,emptyText:f3},e),n=r.prefixCls,o=r.className,i=r.rowClassName,c=r.style,u=r.data,f=r.rowKey,d=r.scroll,p=r.tableLayout,v=r.direction,g=r.title,x=r.footer,w=r.summary,C=r.caption,m=r.id,A=r.showHeader,S=r.components,D=r.emptyText,$=r.onRow,F=r.onHeaderRow,B=r.measureRowRender,R=r.onScroll,I=r.internalHooks,T=r.transformColumns,W=r.internalRefs,H=r.tailor,Z=r.getContainerWidth,Y=r.sticky,j=r.rowHoverable,K=j===void 0?!0:j,U=u||c3,G=!!U.length,J=I===ti,z=N.useCallback(function(kt,jt){return G0(S,kt)||jt},[S]),ie=N.useMemo(function(){return typeof f=="function"?f:function(kt){var jt=kt&&kt[f];return jt}},[f]),ge=z(["body"]),xe=a3(),Ae=Et(xe,3),Fe=Ae[0],be=Ae[1],X=Ae[2],fe=t3(r,U,ie),ce=Et(fe,6),se=ce[0],oe=ce[1],he=ce[2],we=ce[3],Ce=ce[4],ke=ce[5],Se=d==null?void 0:d.x,Te=N.useState(0),Ie=Et(Te,2),We=Ie[0],ut=Ie[1],ot=e3(Ke(Ke(Ke({},r),se),{},{expandable:!!se.expandedRowRender,columnTitle:se.columnTitle,expandedKeys:he,getRowKey:ie,onTriggerExpand:ke,expandIcon:we,expandIconColumnIndex:se.expandIconColumnIndex,direction:v,scrollWidth:J&&H&&typeof Se=="number"?Se:null,clientWidth:We}),J?T:null),Oe=Et(ot,4),je=Oe[0],Ve=Oe[1],ft=Oe[2],tt=Oe[3],nt=ft??Se,Tt=N.useMemo(function(){return{columns:je,flattenColumns:Ve}},[je,Ve]),bt=N.useRef(),At=N.useRef(),yt=N.useRef(),Me=N.useRef();N.useImperativeHandle(t,function(){return{nativeElement:bt.current,scrollTo:function(jt){var zr;if(yt.current instanceof HTMLElement){var Gr=jt.index,Tr=jt.top,wn=jt.key;if(x2(Tr)){var et;(et=yt.current)===null||et===void 0||et.scrollTo({top:Tr})}else{var Yr,Bn=wn??ie(U[Gr]);(Yr=yt.current.querySelector('[data-row-key="'.concat(Bn,'"]')))===null||Yr===void 0||Yr.scrollIntoView()}}else(zr=yt.current)!==null&&zr!==void 0&&zr.scrollTo&&yt.current.scrollTo(jt)}}});var ue=N.useRef(),mt=N.useState(!1),zt=Et(mt,2),Wt=zt[0],Ot=zt[1],ir=N.useState(!1),Ct=Et(ir,2),_t=Ct[0],Gt=Ct[1],pr=N.useState(new Map),Dt=Et(pr,2),Fr=Dt[0],br=Dt[1],or=hs(Ve),tr=or.map(function(kt){return Fr.get(kt)}),mr=N.useMemo(function(){return tr},[tr.join("_")]),Ir=s3(mr,Ve,v),Mr=d&&u0(d.y),cr=d&&u0(nt)||!!se.fixed,Vt=cr&&Ve.some(function(kt){var jt=kt.fixed;return jt}),y=N.useRef(),k=i3(Y,n),ze=k.isSticky,M=k.offsetHeader,Q=k.offsetSummary,Yt=k.offsetScroll,at=k.stickyClassName,gt=k.container,xt=N.useMemo(function(){return w==null?void 0:w(U)},[w,U]),Re=(Mr||ze)&&N.isValidElement(xt)&&xt.type===ps&&xt.props.fixed,$t,sr,Nr;Mr&&(sr={overflowY:G?"scroll":"auto",maxHeight:d.y}),cr&&($t={overflowX:"auto"},Mr||(sr={overflowY:"hidden"}),Nr={width:nt===!0?"auto":nt,minWidth:"100%"});var ee=N.useCallback(function(kt,jt){br(function(zr){if(zr.get(kt)!==jt){var Gr=new Map(zr);return Gr.set(kt,jt),Gr}return zr})},[]),yr=o3(),ne=Et(yr,2),Jn=ne[0],_n=ne[1];function ae(kt,jt){jt&&(typeof jt=="function"?jt(kt):jt.scrollLeft!==kt&&(jt.scrollLeft=kt,jt.scrollLeft!==kt&&setTimeout(function(){jt.scrollLeft=kt},0)))}var Be=ho(function(kt){var jt=kt.currentTarget,zr=kt.scrollLeft,Gr=v==="rtl",Tr=typeof zr=="number"?zr:jt.scrollLeft,wn=jt||d3;if(!_n()||_n()===wn){var et;Jn(wn),ae(Tr,At.current),ae(Tr,yt.current),ae(Tr,ue.current),ae(Tr,(et=y.current)===null||et===void 0?void 0:et.setScrollLeft)}var Yr=jt||At.current;if(Yr){var Bn=J&&H&&typeof nt=="number"?nt:Yr.scrollWidth,xr=Yr.clientWidth;if(Bn===xr){Ot(!1),Gt(!1);return}Gr?(Ot(-Tr<Bn-xr),Gt(-Tr>0)):(Ot(Tr>0),Gt(Tr<Bn-xr))}}),Pe=ho(function(kt){Be(kt),R==null||R(kt)}),Ue=function(){if(cr&&yt.current){var jt;Be({currentTarget:Z0(yt.current),scrollLeft:(jt=yt.current)===null||jt===void 0?void 0:jt.scrollLeft})}else Ot(!1),Gt(!1)},De=function(jt){var zr,Gr=jt.width;(zr=y.current)===null||zr===void 0||zr.checkScrollBarVisible();var Tr=bt.current?bt.current.offsetWidth:Gr;J&&Z&&bt.current&&(Tr=Z(bt.current,Tr)||Tr),Tr!==We&&(Ue(),ut(Tr))},Ze=N.useRef(!1);N.useEffect(function(){Ze.current&&Ue()},[cr,u,je.length]),N.useEffect(function(){Ze.current=!0},[]);var Xe=N.useState(0),st=Et(Xe,2),le=st[0],ye=st[1],ve=N.useState(!0),Je=Et(ve,2),it=Je[0],Ut=Je[1];fo(function(){(!H||!J)&&(yt.current instanceof Element?ye(Zc(yt.current).width):ye(Zc(Me.current).width)),Ut(C4("position","sticky"))},[]),N.useEffect(function(){J&&W&&(W.body.current=yt.current)});var Rt=N.useCallback(function(kt){return N.createElement(N.Fragment,null,N.createElement(id,kt),Re==="top"&&N.createElement(yi,kt,xt))},[Re,xt]),lt=N.useCallback(function(kt){return N.createElement(yi,kt,xt)},[xt]),wt=z(["table"],"table"),Kr=N.useMemo(function(){return p||(Vt?nt==="max-content"?"auto":"fixed":Mr||ze||Ve.some(function(kt){var jt=kt.ellipsis;return jt})?"fixed":"auto")},[Mr,Vt,Ve,p,ze]),An,In={colWidths:mr,columCount:Ve.length,stickyOffsets:Ir,onHeaderRow:F,fixHeader:Mr,scroll:d},ga=N.useMemo(function(){return G?null:typeof D=="function"?D():D},[G,D]),ii=N.createElement(j2,{data:U,measureColumnWidth:Mr||cr||ze}),Po=N.createElement(P1,{colWidths:Ve.map(function(kt){var jt=kt.width;return jt}),columns:Ve}),si=C!=null?N.createElement("caption",{className:"".concat(n,"-caption")},C):void 0,Ns=Gi(r,{data:!0}),yo=Gi(r,{aria:!0});if(Mr||ze){var zo;typeof ge=="function"?(zo=ge(U,{scrollbarSize:le,ref:yt,onScroll:Be}),In.colWidths=Ve.map(function(kt,jt){var zr=kt.width,Gr=jt===Ve.length-1?zr-le:zr;return typeof Gr=="number"&&!Number.isNaN(Gr)?Gr:0})):zo=N.createElement("div",{style:Ke(Ke({},$t),sr),onScroll:Pe,ref:yt,className:vt("".concat(n,"-body"))},N.createElement(wt,Ft({style:Ke(Ke({},Nr),{},{tableLayout:Kr})},yo),si,Po,ii,!Re&&xt&&N.createElement(yi,{stickyOffsets:Ir,flattenColumns:Ve},xt)));var va=Ke(Ke(Ke({noData:!U.length},In),Tt),{},{direction:v,stickyClassName:at,scrollX:nt,tableLayout:Kr,onScroll:Be});An=N.createElement(N.Fragment,null,A!==!1&&N.createElement(ad,Ft({},va,{stickyTopOffset:M,className:"".concat(n,"-header"),ref:At,colGroup:Po}),Rt),zo,Re&&Re!=="top"&&N.createElement(ad,Ft({},va,{stickyBottomOffset:Q,className:"".concat(n,"-summary"),ref:ue,colGroup:Po}),lt),ze&&yt.current&&yt.current instanceof Element&&N.createElement(u3,{ref:y,offsetScroll:Yt,scrollBodyRef:yt,onScroll:Be,container:gt,direction:v}))}else An=N.createElement("div",{style:Ke(Ke({},$t),sr),className:vt("".concat(n,"-content")),onScroll:Be,ref:yt},N.createElement(wt,Ft({style:Ke(Ke({},Nr),{},{tableLayout:Kr})},yo),si,Po,A!==!1&&N.createElement(id,Ft({},In,Tt)),ii,xt&&N.createElement(yi,{stickyOffsets:Ir,flattenColumns:Ve},xt)));var me=N.createElement("div",Ft({className:vt(n,o,_e(_e(_e(_e(_e(_e(_e(_e(_e(_e({},"".concat(n,"-rtl"),v==="rtl"),"".concat(n,"-ping-left"),Wt),"".concat(n,"-ping-right"),_t),"".concat(n,"-layout-fixed"),p==="fixed"),"".concat(n,"-fixed-header"),Mr),"".concat(n,"-fixed-column"),Vt),"".concat(n,"-fixed-column-gapped"),Vt&&tt),"".concat(n,"-scroll-horizontal"),cr),"".concat(n,"-has-fix-left"),Ve[0]&&Ve[0].fixed),"".concat(n,"-has-fix-right"),Ve[Ve.length-1]&&Ve[Ve.length-1].fixed==="right")),style:c,id:m,ref:bt},Ns),g&&N.createElement(ud,{className:"".concat(n,"-title")},g(U)),N.createElement("div",{ref:Me,className:"".concat(n,"-container")},An),x&&N.createElement(ud,{className:"".concat(n,"-footer")},x(U)));cr&&(me=N.createElement(Y0,{onResize:De},me));var gr=r3(Ve,Ir,v),jn=N.useMemo(function(){return{scrollX:nt,prefixCls:n,getComponent:z,scrollbarSize:le,direction:v,fixedInfoList:gr,isSticky:ze,supportSticky:it,componentWidth:We,fixHeader:Mr,fixColumn:Vt,horizonScroll:cr,tableLayout:Kr,rowClassName:i,expandedRowClassName:se.expandedRowClassName,expandIcon:we,expandableType:oe,expandRowByClick:se.expandRowByClick,expandedRowRender:se.expandedRowRender,expandedRowOffset:se.expandedRowOffset,onTriggerExpand:ke,expandIconColumnIndex:se.expandIconColumnIndex,indentSize:se.indentSize,allColumnsFixedLeft:Ve.every(function(kt){return kt.fixed==="left"}),emptyNode:ga,columns:je,flattenColumns:Ve,onColumnResize:ee,colWidths:mr,hoverStartRow:Fe,hoverEndRow:be,onHover:X,rowExpandable:se.rowExpandable,onRow:$,getRowKey:ie,expandedKeys:he,childrenColumnName:Ce,rowHoverable:K,measureRowRender:B}},[nt,n,z,le,v,gr,ze,it,We,Mr,Vt,cr,Kr,i,se.expandedRowClassName,we,oe,se.expandRowByClick,se.expandedRowRender,se.expandedRowOffset,ke,se.expandIconColumnIndex,se.indentSize,ga,je,Ve,ee,mr,Fe,be,X,se.rowExpandable,$,ie,he,Ce,K,B]);return N.createElement(Xr.Provider,{value:jn},me)}var p3=N.forwardRef(h3);function I1(e){return S1(p3,e)}var fa=I1();fa.EXPAND_COLUMN=ao;fa.INTERNAL_HOOKS=ti;fa.Column=T2;fa.ColumnGroup=O2;fa.Summary=F1;var iu=ru(null),j1=ru(null);function m3(e,t,r){var n=t||1;return r[e+n]-(r[e]||0)}function g3(e){var t=e.rowInfo,r=e.column,n=e.colIndex,o=e.indent,i=e.index,c=e.component,u=e.renderIndex,f=e.record,d=e.style,p=e.className,v=e.inverse,g=e.getHeight,x=r.render,w=r.dataIndex,C=r.className,m=r.width,A=qr(j1,["columnsOffset"]),S=A.columnsOffset,D=R1(t,r,n,o,i),$=D.key,F=D.fixedInfo,B=D.appendCellNode,R=D.additionalCellProps,I=R.style,T=R.colSpan,W=T===void 0?1:T,H=R.rowSpan,Z=H===void 0?1:H,Y=n-1,j=m3(Y,W,S),K=W>1?m-j:0,U=Ke(Ke(Ke({},I),d),{},{flex:"0 0 ".concat(j,"px"),width:"".concat(j,"px"),marginRight:K,pointerEvents:"auto"}),G=N.useMemo(function(){return v?Z<=1:W===0||Z===0||Z>1},[Z,W,v]);G?U.visibility="hidden":v&&(U.height=g==null?void 0:g(Z));var J=G?function(){return null}:x,z={};return(Z===0||W===0)&&(z.rowSpan=1,z.colSpan=1),N.createElement(da,Ft({className:vt(C,p),ellipsis:r.ellipsis,align:r.align,scope:r.rowScope,component:c,prefixCls:t.prefixCls,key:$,record:f,index:i,renderIndex:u,dataIndex:w,render:J,shouldCellUpdate:r.shouldCellUpdate},F,{appendNode:B,additionalProps:Ke(Ke({},R),{},{style:U},z)}))}var v3=["data","index","className","rowKey","style","extra","getHeight"],b3=N.forwardRef(function(e,t){var r=e.data,n=e.index,o=e.className,i=e.rowKey,c=e.style,u=e.extra,f=e.getHeight,d=Vr(e,v3),p=r.record,v=r.indent,g=r.index,x=qr(Xr,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),w=x.scrollX,C=x.flattenColumns,m=x.prefixCls,A=x.fixColumn,S=x.componentWidth,D=qr(iu,["getComponent"]),$=D.getComponent,F=O1(p,i,n,v),B=$(["body","row"],"div"),R=$(["body","cell"],"div"),I=F.rowSupportExpand,T=F.expanded,W=F.rowProps,H=F.expandedRowRender,Z=F.expandedRowClassName,Y;if(I&&T){var j=H(p,n,v+1,T),K=M1(Z,p,n,v),U={};A&&(U={style:_e({},"--virtual-width","".concat(S,"px"))});var G="".concat(m,"-expanded-row-cell");Y=N.createElement(B,{className:vt("".concat(m,"-expanded-row"),"".concat(m,"-expanded-row-level-").concat(v+1),K)},N.createElement(da,{component:R,prefixCls:m,className:vt(G,_e({},"".concat(G,"-fixed"),A)),additionalProps:U},j))}var J=Ke(Ke({},c),{},{width:w});u&&(J.position="absolute",J.pointerEvents="none");var z=N.createElement(B,Ft({},W,d,{"data-row-key":i,ref:I?null:t,className:vt(o,"".concat(m,"-row"),W==null?void 0:W.className,_e({},"".concat(m,"-row-extra"),u)),style:Ke(Ke({},J),W==null?void 0:W.style)}),C.map(function(ie,ge){return N.createElement(g3,{key:ge,component:R,rowInfo:F,column:ie,colIndex:ge,indent:v,index:n,renderIndex:g,record:p,inverse:u,getHeight:f})}));return I?N.createElement("div",{ref:t},z,Y):z}),dd=ca(b3),y3=N.forwardRef(function(e,t){var r=e.data,n=e.onScroll,o=qr(Xr,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),i=o.flattenColumns,c=o.onColumnResize,u=o.getRowKey,f=o.expandedKeys,d=o.prefixCls,p=o.childrenColumnName,v=o.scrollX,g=o.direction,x=qr(iu),w=x.sticky,C=x.scrollY,m=x.listItemHeight,A=x.getComponent,S=x.onScroll,D=N.useRef(),$=T1(r,p,f,u),F=N.useMemo(function(){var Y=0;return i.map(function(j){var K=j.width,U=j.minWidth,G=j.key,J=Math.max(K||0,U||0);return Y+=J,[G,J,Y]})},[i]),B=N.useMemo(function(){return F.map(function(Y){return Y[2]})},[F]);N.useEffect(function(){F.forEach(function(Y){var j=Et(Y,2),K=j[0],U=j[1];c(K,U)})},[F]),N.useImperativeHandle(t,function(){var Y,j={scrollTo:function(U){var G;(G=D.current)===null||G===void 0||G.scrollTo(U)},nativeElement:(Y=D.current)===null||Y===void 0?void 0:Y.nativeElement};return Object.defineProperty(j,"scrollLeft",{get:function(){var U;return((U=D.current)===null||U===void 0?void 0:U.getScrollInfo().x)||0},set:function(U){var G;(G=D.current)===null||G===void 0||G.scrollTo({left:U})}}),Object.defineProperty(j,"scrollTop",{get:function(){var U;return((U=D.current)===null||U===void 0?void 0:U.getScrollInfo().y)||0},set:function(U){var G;(G=D.current)===null||G===void 0||G.scrollTo({top:U})}}),j});var R=function(j,K){var U,G=(U=$[K])===null||U===void 0?void 0:U.record,J=j.onCell;if(J){var z,ie=J(G,K);return(z=ie==null?void 0:ie.rowSpan)!==null&&z!==void 0?z:1}return 1},I=function(j){var K=j.start,U=j.end,G=j.getSize,J=j.offsetY;if(U<0)return null;for(var z=i.filter(function(he){return R(he,K)===0}),ie=K,ge=function(we){if(z=z.filter(function(Ce){return R(Ce,we)===0}),!z.length)return ie=we,1},xe=K;xe>=0&&!ge(xe);xe-=1);for(var Ae=i.filter(function(he){return R(he,U)!==1}),Fe=U,be=function(we){if(Ae=Ae.filter(function(Ce){return R(Ce,we)!==1}),!Ae.length)return Fe=Math.max(we-1,U),1},X=U;X<$.length&&!be(X);X+=1);for(var fe=[],ce=function(we){var Ce=$[we];if(!Ce)return 1;i.some(function(ke){return R(ke,we)>1})&&fe.push(we)},se=ie;se<=Fe;se+=1)ce(se);var oe=fe.map(function(he){var we=$[he],Ce=u(we.record,he),ke=function(Ie){var We=he+Ie-1,ut=u($[We].record,We),ot=G(Ce,ut);return ot.bottom-ot.top},Se=G(Ce);return N.createElement(dd,{key:he,data:we,rowKey:Ce,index:he,style:{top:-J+Se.top},extra:!0,getHeight:ke})});return oe},T=N.useMemo(function(){return{columnsOffset:B}},[B]),W="".concat(d,"-tbody"),H=A(["body","wrapper"]),Z={};return w&&(Z.position="sticky",Z.bottom=0,xn(w)==="object"&&w.offsetScroll&&(Z.bottom=w.offsetScroll)),N.createElement(j1.Provider,{value:T},N.createElement(u1,{fullHeight:!1,ref:D,prefixCls:"".concat(W,"-virtual"),styles:{horizontalScrollBar:Z},className:W,height:C,itemHeight:m||24,data:$,itemKey:function(j){return u(j.record)},component:H,scrollWidth:v,direction:g,onVirtualScroll:function(j){var K,U=j.x;n({currentTarget:(K=D.current)===null||K===void 0?void 0:K.nativeElement,scrollLeft:U})},onScroll:S,extraRender:I},function(Y,j,K){var U=u(Y.record,j);return N.createElement(dd,{data:Y,rowKey:U,index:j,style:K.style})}))}),x3=ca(y3),w3=function(t,r){var n=r.ref,o=r.onScroll;return N.createElement(x3,{ref:n,data:t,onScroll:o})};function C3(e,t){var r=e.data,n=e.columns,o=e.scroll,i=e.sticky,c=e.prefixCls,u=c===void 0?_1:c,f=e.className,d=e.listItemHeight,p=e.components,v=e.onScroll,g=o||{},x=g.x,w=g.y;typeof x!="number"&&(x=1),typeof w!="number"&&(w=500);var C=ho(function(S,D){return G0(p,S)||D}),m=ho(v),A=N.useMemo(function(){return{sticky:i,scrollY:w,listItemHeight:d,getComponent:C,onScroll:m}},[i,w,d,C,m]);return N.createElement(iu.Provider,{value:A},N.createElement(fa,Ft({},e,{className:vt(f,"".concat(u,"-virtual")),scroll:Ke(Ke({},o),{},{x}),components:Ke(Ke({},p),{},{body:r!=null&&r.length?w3:void 0}),columns:n,internalHooks:ti,tailor:!0,ref:t})))}var D3=N.forwardRef(C3);function L1(e){return S1(D3,e)}L1();const k3=e=>null,E3=e=>null;var su=N.createContext(null),S3=N.createContext({}),A3=function(t){for(var r=t.prefixCls,n=t.level,o=t.isStart,i=t.isEnd,c="".concat(r,"-indent-unit"),u=[],f=0;f<n;f+=1)u.push(N.createElement("span",{key:f,className:vt(c,_e(_e({},"".concat(c,"-start"),o[f]),"".concat(c,"-end"),i[f]))}));return N.createElement("span",{"aria-hidden":"true",className:"".concat(r,"-indent")},u)};const B3=N.memo(A3);var F3=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],fd="open",hd="close",N3="---",_a=function(t){var r,n,o,i=t.eventKey,c=t.className,u=t.style,f=t.dragOver,d=t.dragOverGapTop,p=t.dragOverGapBottom,v=t.isLeaf,g=t.isStart,x=t.isEnd,w=t.expanded,C=t.selected,m=t.checked,A=t.halfChecked,S=t.loading,D=t.domRef,$=t.active,F=t.data,B=t.onMouseMove,R=t.selectable,I=Vr(t,F3),T=He.useContext(su),W=He.useContext(S3),H=He.useRef(null),Z=He.useState(!1),Y=Et(Z,2),j=Y[0],K=Y[1],U=!!(T.disabled||t.disabled||(r=W.nodeDisabled)!==null&&r!==void 0&&r.call(W,F)),G=He.useMemo(function(){return!T.checkable||t.checkable===!1?!1:T.checkable},[T.checkable,t.checkable]),J=function(ue){U||T.onNodeSelect(ue,Rr(t))},z=function(ue){U||!G||t.disableCheckbox||T.onNodeCheck(ue,Rr(t),!m)},ie=He.useMemo(function(){return typeof R=="boolean"?R:T.selectable},[R,T.selectable]),ge=function(ue){T.onNodeClick(ue,Rr(t)),ie?J(ue):z(ue)},xe=function(ue){T.onNodeDoubleClick(ue,Rr(t))},Ae=function(ue){T.onNodeMouseEnter(ue,Rr(t))},Fe=function(ue){T.onNodeMouseLeave(ue,Rr(t))},be=function(ue){T.onNodeContextMenu(ue,Rr(t))},X=He.useMemo(function(){return!!(T.draggable&&(!T.draggable.nodeDraggable||T.draggable.nodeDraggable(F)))},[T.draggable,F]),fe=function(ue){ue.stopPropagation(),K(!0),T.onNodeDragStart(ue,t);try{ue.dataTransfer.setData("text/plain","")}catch{}},ce=function(ue){ue.preventDefault(),ue.stopPropagation(),T.onNodeDragEnter(ue,t)},se=function(ue){ue.preventDefault(),ue.stopPropagation(),T.onNodeDragOver(ue,t)},oe=function(ue){ue.stopPropagation(),T.onNodeDragLeave(ue,t)},he=function(ue){ue.stopPropagation(),K(!1),T.onNodeDragEnd(ue,t)},we=function(ue){ue.preventDefault(),ue.stopPropagation(),K(!1),T.onNodeDrop(ue,t)},Ce=function(ue){S||T.onNodeExpand(ue,Rr(t))},ke=He.useMemo(function(){var Me=sn(T.keyEntities,i)||{},ue=Me.children;return!!(ue||[]).length},[T.keyEntities,i]),Se=He.useMemo(function(){return v===!1?!1:v||!T.loadData&&!ke||T.loadData&&t.loaded&&!ke},[v,T.loadData,ke,t.loaded]);He.useEffect(function(){S||typeof T.loadData=="function"&&w&&!Se&&!t.loaded&&T.onNodeLoad(Rr(t))},[S,T.loadData,T.onNodeLoad,w,Se,t]);var Te=He.useMemo(function(){var Me;return(Me=T.draggable)!==null&&Me!==void 0&&Me.icon?He.createElement("span",{className:"".concat(T.prefixCls,"-draggable-icon")},T.draggable.icon):null},[T.draggable]),Ie=function(ue){var mt=t.switcherIcon||T.switcherIcon;return typeof mt=="function"?mt(Ke(Ke({},t),{},{isLeaf:ue})):mt},We=function(){if(Se){var ue=Ie(!0);return ue!==!1?He.createElement("span",{className:vt("".concat(T.prefixCls,"-switcher"),"".concat(T.prefixCls,"-switcher-noop"))},ue):null}var mt=Ie(!1);return mt!==!1?He.createElement("span",{onClick:Ce,className:vt("".concat(T.prefixCls,"-switcher"),"".concat(T.prefixCls,"-switcher_").concat(w?fd:hd))},mt):null},ut=He.useMemo(function(){if(!G)return null;var Me=typeof G!="boolean"?G:null;return He.createElement("span",{className:vt("".concat(T.prefixCls,"-checkbox"),_e(_e(_e({},"".concat(T.prefixCls,"-checkbox-checked"),m),"".concat(T.prefixCls,"-checkbox-indeterminate"),!m&&A),"".concat(T.prefixCls,"-checkbox-disabled"),U||t.disableCheckbox)),onClick:z,role:"checkbox","aria-checked":A?"mixed":m,"aria-disabled":U||t.disableCheckbox,"aria-label":"Select ".concat(typeof t.title=="string"?t.title:"tree node")},Me)},[G,m,A,U,t.disableCheckbox,t.title]),ot=He.useMemo(function(){return Se?null:w?fd:hd},[Se,w]),Oe=He.useMemo(function(){return He.createElement("span",{className:vt("".concat(T.prefixCls,"-iconEle"),"".concat(T.prefixCls,"-icon__").concat(ot||"docu"),_e({},"".concat(T.prefixCls,"-icon_loading"),S))})},[T.prefixCls,ot,S]),je=He.useMemo(function(){var Me=!!T.draggable,ue=!t.disabled&&Me&&T.dragOverNodeKey===i;return ue?T.dropIndicatorRender({dropPosition:T.dropPosition,dropLevelOffset:T.dropLevelOffset,indent:T.indent,prefixCls:T.prefixCls,direction:T.direction}):null},[T.dropPosition,T.dropLevelOffset,T.indent,T.prefixCls,T.direction,T.draggable,T.dragOverNodeKey,T.dropIndicatorRender]),Ve=He.useMemo(function(){var Me=t.title,ue=Me===void 0?N3:Me,mt="".concat(T.prefixCls,"-node-content-wrapper"),zt;if(T.showIcon){var Wt=t.icon||T.icon;zt=Wt?He.createElement("span",{className:vt("".concat(T.prefixCls,"-iconEle"),"".concat(T.prefixCls,"-icon__customize"))},typeof Wt=="function"?Wt(t):Wt):Oe}else T.loadData&&S&&(zt=Oe);var Ot;return typeof ue=="function"?Ot=ue(F):T.titleRender?Ot=T.titleRender(F):Ot=ue,He.createElement("span",{ref:H,title:typeof ue=="string"?ue:"",className:vt(mt,"".concat(mt,"-").concat(ot||"normal"),_e({},"".concat(T.prefixCls,"-node-selected"),!U&&(C||j))),onMouseEnter:Ae,onMouseLeave:Fe,onContextMenu:be,onClick:ge,onDoubleClick:xe},zt,He.createElement("span",{className:"".concat(T.prefixCls,"-title")},Ot),je)},[T.prefixCls,T.showIcon,t,T.icon,Oe,T.titleRender,F,ot,Ae,Fe,be,ge,xe]),ft=Gi(I,{aria:!0,data:!0}),tt=sn(T.keyEntities,i)||{},nt=tt.level,Tt=x[x.length-1],bt=!U&&X,At=T.draggingNodeKey===i,yt=R!==void 0?{"aria-selected":!!R}:void 0;return He.createElement("div",Ft({ref:D,role:"treeitem","aria-expanded":v?void 0:w,className:vt(c,"".concat(T.prefixCls,"-treenode"),(o={},_e(_e(_e(_e(_e(_e(_e(_e(_e(_e(o,"".concat(T.prefixCls,"-treenode-disabled"),U),"".concat(T.prefixCls,"-treenode-switcher-").concat(w?"open":"close"),!v),"".concat(T.prefixCls,"-treenode-checkbox-checked"),m),"".concat(T.prefixCls,"-treenode-checkbox-indeterminate"),A),"".concat(T.prefixCls,"-treenode-selected"),C),"".concat(T.prefixCls,"-treenode-loading"),S),"".concat(T.prefixCls,"-treenode-active"),$),"".concat(T.prefixCls,"-treenode-leaf-last"),Tt),"".concat(T.prefixCls,"-treenode-draggable"),X),"dragging",At),_e(_e(_e(_e(_e(_e(_e(o,"drop-target",T.dropTargetKey===i),"drop-container",T.dropContainerKey===i),"drag-over",!U&&f),"drag-over-gap-top",!U&&d),"drag-over-gap-bottom",!U&&p),"filter-node",(n=T.filterTreeNode)===null||n===void 0?void 0:n.call(T,Rr(t))),"".concat(T.prefixCls,"-treenode-leaf"),Se))),style:u,draggable:bt,onDragStart:bt?fe:void 0,onDragEnter:X?ce:void 0,onDragOver:X?se:void 0,onDragLeave:X?oe:void 0,onDrop:X?we:void 0,onDragEnd:X?he:void 0,onMouseMove:B},yt,ft),He.createElement(B3,{prefixCls:T.prefixCls,level:nt,isStart:g,isEnd:x}),Te,We(),ut,Ve)};_a.isTreeNode=1;function Mn(e,t){if(!e)return[];var r=e.slice(),n=r.indexOf(t);return n>=0&&r.splice(n,1),r}function Wn(e,t){var r=(e||[]).slice();return r.indexOf(t)===-1&&r.push(t),r}function lu(e){return e.split("-")}function T3(e,t){var r=[],n=sn(t,e);function o(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];i.forEach(function(c){var u=c.key,f=c.children;r.push(u),o(f)})}return o(n.children),r}function O3(e){if(e.parent){var t=lu(e.pos);return Number(t[t.length-1])===e.parent.children.length-1}return!1}function $3(e){var t=lu(e.pos);return Number(t[t.length-1])===0}function pd(e,t,r,n,o,i,c,u,f,d){var p,v=e.clientX,g=e.clientY,x=e.target.getBoundingClientRect(),w=x.top,C=x.height,m=(d==="rtl"?-1:1)*(((o==null?void 0:o.x)||0)-v),A=(m-12)/n,S=f.filter(function(U){var G;return(G=u[U])===null||G===void 0||(G=G.children)===null||G===void 0?void 0:G.length}),D=sn(u,r.eventKey);if(g<w+C/2){var $=c.findIndex(function(U){return U.key===D.key}),F=$<=0?0:$-1,B=c[F].key;D=sn(u,B)}var R=D.key,I=D,T=D.key,W=0,H=0;if(!S.includes(R))for(var Z=0;Z<A&&O3(D);Z+=1)D=D.parent,H+=1;var Y=t.data,j=D.node,K=!0;return $3(D)&&D.level===0&&g<w+C/2&&i({dragNode:Y,dropNode:j,dropPosition:-1})&&D.key===r.eventKey?W=-1:(I.children||[]).length&&S.includes(T)?i({dragNode:Y,dropNode:j,dropPosition:0})?W=0:K=!1:H===0?A>-1.5?i({dragNode:Y,dropNode:j,dropPosition:1})?W=1:K=!1:i({dragNode:Y,dropNode:j,dropPosition:0})?W=0:i({dragNode:Y,dropNode:j,dropPosition:1})?W=1:K=!1:i({dragNode:Y,dropNode:j,dropPosition:1})?W=1:K=!1,{dropPosition:W,dropLevelOffset:H,dropTargetKey:D.key,dropTargetPos:D.pos,dragOverNodeKey:T,dropContainerKey:W===0?null:((p=D.parent)===null||p===void 0?void 0:p.key)||null,dropAllowed:K}}function md(e,t){if(e){var r=t.multiple;return r?e.slice():e.length?[e[0]]:e}}function cl(e){if(!e)return null;var t;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else if(xn(e)==="object")t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0};else return lo(!1,"`checkedKeys` is not an array or an object"),null;return t}function d0(e,t){var r=new Set;function n(o){if(!r.has(o)){var i=sn(t,o);if(i){r.add(o);var c=i.parent,u=i.node;u.disabled||c&&n(c.key)}}}return(e||[]).forEach(function(o){n(o)}),Xt(r)}const no={},f0="SELECT_ALL",h0="SELECT_INVERT",p0="SELECT_NONE",gd=[],H1=(e,t,r=[])=>((t||[]).forEach(n=>{r.push(n),n&&typeof n=="object"&&e in n&&H1(e,n[e],r)}),r),M3=(e,t)=>{const{preserveSelectedRowKeys:r,selectedRowKeys:n,defaultSelectedRowKeys:o,getCheckboxProps:i,getTitleCheckboxProps:c,onChange:u,onSelect:f,onSelectAll:d,onSelectInvert:p,onSelectNone:v,onSelectMultiple:g,columnWidth:x,type:w,selections:C,fixed:m,renderCell:A,hideSelectAll:S,checkStrictly:D=!0}=t||{},{prefixCls:$,data:F,pageData:B,getRecordByKey:R,getRowKey:I,expandType:T,childrenColumnName:W,locale:H,getPopupContainer:Z}=e,Y=J0(),[j,K]=v4(we=>we),[U,G]=Vi(n||o||gd,{value:n}),J=N.useRef(new Map),z=Bt(we=>{if(r){const Ce=new Map;we.forEach(ke=>{let Se=R(ke);!Se&&J.current.has(ke)&&(Se=J.current.get(ke)),Ce.set(ke,Se)}),J.current=Ce}},[R,r]);N.useEffect(()=>{z(U)},[U]);const ie=ht(()=>H1(W,B),[W,B]),{keyEntities:ge}=ht(()=>{if(D)return{keyEntities:null};let we=F;if(r){const Ce=new Set(ie.map((Se,Te)=>I(Se,Te))),ke=Array.from(J.current).reduce((Se,[Te,Ie])=>Ce.has(Te)?Se:Se.concat(Ie),[]);we=[].concat(Xt(we),Xt(ke))}return eu(we,{externalGetKey:I,childrenPropName:W})},[F,I,D,W,r,ie]),xe=ht(()=>{const we=new Map;return ie.forEach((Ce,ke)=>{const Se=I(Ce,ke),Te=(i?i(Ce):null)||{};we.set(Se,Te)}),we},[ie,I,i]),Ae=Bt(we=>{const Ce=I(we);let ke;return xe.has(Ce)?ke=xe.get(I(we)):ke=i?i(we):void 0,!!(ke!=null&&ke.disabled)},[xe,I]),[Fe,be]=ht(()=>{if(D)return[U||[],[]];const{checkedKeys:we,halfCheckedKeys:Ce}=Go(U,!0,ge,Ae);return[we||[],Ce]},[U,D,ge,Ae]),X=ht(()=>{const we=w==="radio"?Fe.slice(0,1):Fe;return new Set(we)},[Fe,w]),fe=ht(()=>w==="radio"?new Set:new Set(be),[be,w]);N.useEffect(()=>{t||G(gd)},[!!t]);const ce=Bt((we,Ce)=>{let ke,Se;z(we),r?(ke=we,Se=we.map(Te=>J.current.get(Te))):(ke=[],Se=[],we.forEach(Te=>{const Ie=R(Te);Ie!==void 0&&(ke.push(Te),Se.push(Ie))})),G(ke),u==null||u(ke,Se,{type:Ce})},[G,R,u,r]),se=Bt((we,Ce,ke,Se)=>{if(f){const Te=ke.map(Ie=>R(Ie));f(R(we),Ce,Te,Se)}ce(ke,"single")},[f,R,ce]),oe=ht(()=>!C||S?null:(C===!0?[f0,h0,p0]:C).map(Ce=>Ce===f0?{key:"all",text:H.selectionAll,onSelect(){ce(F.map((ke,Se)=>I(ke,Se)).filter(ke=>{const Se=xe.get(ke);return!(Se!=null&&Se.disabled)||X.has(ke)}),"all")}}:Ce===h0?{key:"invert",text:H.selectInvert,onSelect(){const ke=new Set(X);B.forEach((Te,Ie)=>{const We=I(Te,Ie),ut=xe.get(We);ut!=null&&ut.disabled||(ke.has(We)?ke.delete(We):ke.add(We))});const Se=Array.from(ke);p&&(Y.deprecated(!1,"onSelectInvert","onChange"),p(Se)),ce(Se,"invert")}}:Ce===p0?{key:"none",text:H.selectNone,onSelect(){v==null||v(),ce(Array.from(X).filter(ke=>{const Se=xe.get(ke);return Se==null?void 0:Se.disabled}),"none")}}:Ce).map(Ce=>Object.assign(Object.assign({},Ce),{onSelect:(...ke)=>{var Se,Te;(Te=Ce.onSelect)===null||Te===void 0||(Se=Te).call.apply(Se,[Ce].concat(ke)),K(null)}})),[C,X,B,I,p,ce]);return[Bt(we=>{var Ce;if(!t)return we.filter(Me=>Me!==no);let ke=Xt(we);const Se=new Set(X),Te=ie.map(I).filter(Me=>!xe.get(Me).disabled),Ie=Te.every(Me=>Se.has(Me)),We=Te.some(Me=>Se.has(Me)),ut=()=>{const Me=[];Ie?Te.forEach(mt=>{Se.delete(mt),Me.push(mt)}):Te.forEach(mt=>{Se.has(mt)||(Se.add(mt),Me.push(mt))});const ue=Array.from(Se);d==null||d(!Ie,ue.map(mt=>R(mt)),Me.map(mt=>R(mt))),ce(ue,"all"),K(null)};let ot,Oe;if(w!=="radio"){let Me;if(oe){const _t={getPopupContainer:Z,items:oe.map((Gt,pr)=>{const{key:Dt,text:Fr,onSelect:br}=Gt;return{key:Dt??pr,onClick:()=>{br==null||br(Te)},label:Fr}})};Me=N.createElement("div",{className:`${$}-selection-extra`},N.createElement(p1,{menu:_t,getPopupContainer:Z},N.createElement("span",null,N.createElement(Wg,null))))}const ue=ie.map((_t,Gt)=>{const pr=I(_t,Gt),Dt=xe.get(pr)||{};return Object.assign({checked:Se.has(pr)},Dt)}).filter(({disabled:_t})=>_t),mt=!!ue.length&&ue.length===ie.length,zt=mt&&ue.every(({checked:_t})=>_t),Wt=mt&&ue.some(({checked:_t})=>_t),Ot=(c==null?void 0:c())||{},{onChange:ir,disabled:Ct}=Ot;Oe=N.createElement(Yi,Object.assign({"aria-label":Me?"Custom selection":"Select all"},Ot,{checked:mt?zt:!!ie.length&&Ie,indeterminate:mt?!zt&&Wt:!Ie&&We,onChange:_t=>{ut(),ir==null||ir(_t)},disabled:Ct??(ie.length===0||mt),skipGroup:!0})),ot=!S&&N.createElement("div",{className:`${$}-selection`},Oe,Me)}let je;w==="radio"?je=(Me,ue,mt)=>{const zt=I(ue,mt),Wt=Se.has(zt),Ot=xe.get(zt);return{node:N.createElement(t1,Object.assign({},Ot,{checked:Wt,onClick:ir=>{var Ct;ir.stopPropagation(),(Ct=Ot==null?void 0:Ot.onClick)===null||Ct===void 0||Ct.call(Ot,ir)},onChange:ir=>{var Ct;Se.has(zt)||se(zt,!0,[zt],ir.nativeEvent),(Ct=Ot==null?void 0:Ot.onChange)===null||Ct===void 0||Ct.call(Ot,ir)}})),checked:Wt}}:je=(Me,ue,mt)=>{var zt;const Wt=I(ue,mt),Ot=Se.has(Wt),ir=fe.has(Wt),Ct=xe.get(Wt);let _t;return T==="nest"?_t=ir:_t=(zt=Ct==null?void 0:Ct.indeterminate)!==null&&zt!==void 0?zt:ir,{node:N.createElement(Yi,Object.assign({},Ct,{indeterminate:_t,checked:Ot,skipGroup:!0,onClick:Gt=>{var pr;Gt.stopPropagation(),(pr=Ct==null?void 0:Ct.onClick)===null||pr===void 0||pr.call(Ct,Gt)},onChange:Gt=>{var pr;const{nativeEvent:Dt}=Gt,{shiftKey:Fr}=Dt,br=Te.indexOf(Wt),or=Fe.some(tr=>Te.includes(tr));if(Fr&&D&&or){const tr=j(br,Te,Se),mr=Array.from(Se);g==null||g(!Ot,mr.map(Ir=>R(Ir)),tr.map(Ir=>R(Ir))),ce(mr,"multiple")}else{const tr=Fe;if(D){const mr=Ot?Mn(tr,Wt):Wn(tr,Wt);se(Wt,!Ot,mr,Dt)}else{const mr=Go([].concat(Xt(tr),[Wt]),!0,ge,Ae),{checkedKeys:Ir,halfCheckedKeys:Mr}=mr;let cr=Ir;if(Ot){const Vt=new Set(Ir);Vt.delete(Wt),cr=Go(Array.from(Vt),{halfCheckedKeys:Mr},ge,Ae).checkedKeys}se(Wt,!Ot,cr,Dt)}}K(Ot?null:br),(pr=Ct==null?void 0:Ct.onChange)===null||pr===void 0||pr.call(Ct,Gt)}})),checked:Ot}};const Ve=(Me,ue,mt)=>{const{node:zt,checked:Wt}=je(Me,ue,mt);return A?A(Wt,ue,mt,zt):zt};if(!ke.includes(no))if(ke.findIndex(Me=>{var ue;return((ue=Me[Ta])===null||ue===void 0?void 0:ue.columnType)==="EXPAND_COLUMN"})===0){const[Me,...ue]=ke;ke=[Me,no].concat(Xt(ue))}else ke=[no].concat(Xt(ke));const ft=ke.indexOf(no);ke=ke.filter((Me,ue)=>Me!==no||ue===ft);const tt=ke[ft-1],nt=ke[ft+1];let Tt=m;Tt===void 0&&((nt==null?void 0:nt.fixed)!==void 0?Tt=nt.fixed:(tt==null?void 0:tt.fixed)!==void 0&&(Tt=tt.fixed)),Tt&&tt&&((Ce=tt[Ta])===null||Ce===void 0?void 0:Ce.columnType)==="EXPAND_COLUMN"&&tt.fixed===void 0&&(tt.fixed=Tt);const bt=vt(`${$}-selection-col`,{[`${$}-selection-col-with-dropdown`]:C&&w==="checkbox"}),At=()=>t!=null&&t.columnTitle?typeof t.columnTitle=="function"?t.columnTitle(Oe):t.columnTitle:ot,yt={fixed:Tt,width:x,className:`${$}-selection-column`,title:At(),render:Ve,onCell:t.onCell,align:t.align,[Ta]:{className:bt}};return ke.map(Me=>Me===no?yt:Me)},[I,ie,t,Fe,X,fe,x,oe,T,xe,g,se,Ae]),X]};function R3(e){return t=>{const{prefixCls:r,onExpand:n,record:o,expanded:i,expandable:c}=t,u=`${r}-row-expand-icon`;return N.createElement("button",{type:"button",onClick:f=>{n(o,f),f.stopPropagation()},className:vt(u,{[`${u}-spaced`]:!c,[`${u}-expanded`]:c&&i,[`${u}-collapsed`]:c&&!i}),"aria-label":i?e.collapse:e.expand,"aria-expanded":i})}}function P3(e){return(r,n)=>{const o=r.querySelector(`.${e}-container`);let i=n;if(o){const c=getComputedStyle(o),u=Number.parseInt(c.borderLeftWidth,10),f=Number.parseInt(c.borderRightWidth,10);i=n-u-f}return i}}const po=(e,t)=>"key"in e&&e.key!==void 0&&e.key!==null?e.key:e.dataIndex?Array.isArray(e.dataIndex)?e.dataIndex.join("."):e.dataIndex:t;function ha(e,t){return t?`${t}-${e}`:`${e}`}const ms=(e,t)=>typeof e=="function"?e(t):e,z3=(e,t)=>{const r=ms(e,t);return Object.prototype.toString.call(r)==="[object Object]"?"":r};var _3={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M349 838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V642H349v196zm531.1-684H143.9c-24.5 0-39.8 26.7-27.5 48l221.3 376h348.8l221.3-376c12.1-21.3-3.2-48-27.7-48z"}}]},name:"filter",theme:"filled"},I3=function(t,r){return N.createElement(tn,Ft({},t,{ref:r,icon:_3}))},j3=N.forwardRef(I3),L3=function(t){var r=t.dropPosition,n=t.dropLevelOffset,o=t.indent,i={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(r){case-1:i.top=0,i.left=-n*o;break;case 1:i.bottom=0,i.left=-n*o;break;case 0:i.bottom=0,i.left=o;break}return He.createElement("div",{style:i})};function q1(e){if(e==null)throw new TypeError("Cannot destructure "+e)}function H3(e,t){var r=N.useState(!1),n=Et(r,2),o=n[0],i=n[1];fo(function(){if(o)return e(),function(){t()}},[o]),fo(function(){return i(!0),function(){i(!1)}},[])}var q3=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],K3=N.forwardRef(function(e,t){var r=e.className,n=e.style,o=e.motion,i=e.motionNodes,c=e.motionType,u=e.onMotionStart,f=e.onMotionEnd,d=e.active,p=e.treeNodeRequiredProps,v=Vr(e,q3),g=N.useState(!0),x=Et(g,2),w=x[0],C=x[1],m=N.useContext(su),A=m.prefixCls,S=i&&c!=="hide";fo(function(){i&&S!==w&&C(S)},[i]);var D=function(){i&&u()},$=N.useRef(!1),F=function(){i&&!$.current&&($.current=!0,f())};H3(D,F);var B=function(I){S===I&&F()};return i?N.createElement(a1,Ft({ref:t,visible:w},o,{motionAppear:c==="show",onVisibleChanged:B}),function(R,I){var T=R.className,W=R.style;return N.createElement("div",{ref:I,className:vt("".concat(A,"-treenode-motion"),T),style:W},i.map(function(H){var Z=Object.assign({},(q1(H.data),H.data)),Y=H.title,j=H.key,K=H.isStart,U=H.isEnd;delete Z.children;var G=Na(j,p);return N.createElement(_a,Ft({},Z,G,{title:Y,active:d,data:H.data,key:j,isStart:K,isEnd:U}))}))}):N.createElement(_a,Ft({domRef:t,className:r,style:n},v,{active:d}))});function W3(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=e.length,n=t.length;if(Math.abs(r-n)!==1)return{add:!1,key:null};function o(i,c){var u=new Map;i.forEach(function(d){u.set(d,!0)});var f=c.filter(function(d){return!u.has(d)});return f.length===1?f[0]:null}return r<n?{add:!0,key:o(e,t)}:{add:!1,key:o(t,e)}}function vd(e,t,r){var n=e.findIndex(function(u){return u.key===r}),o=e[n+1],i=t.findIndex(function(u){return u.key===r});if(o){var c=t.findIndex(function(u){return u.key===o.key});return t.slice(i+1,c)}return t.slice(i+1)}var V3=["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","scrollWidth","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"],bd={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},U3=function(){},No="RC_TREE_MOTION_".concat(Math.random()),m0={key:No},K1={key:No,level:0,index:0,pos:"0",node:m0,nodes:[m0]},yd={parent:null,children:[],pos:K1.pos,data:m0,title:null,key:No,isStart:[],isEnd:[]};function xd(e,t,r,n){return t===!1||!r?e:e.slice(0,Math.ceil(r/n)+1)}function wd(e){var t=e.key,r=e.pos;return Qa(t,r)}function X3(e){for(var t=String(e.data.key),r=e;r.parent;)r=r.parent,t="".concat(r.data.key," > ").concat(t);return t}var G3=N.forwardRef(function(e,t){var r=e.prefixCls,n=e.data;e.selectable,e.checkable;var o=e.expandedKeys,i=e.selectedKeys,c=e.checkedKeys,u=e.loadedKeys,f=e.loadingKeys,d=e.halfCheckedKeys,p=e.keyEntities,v=e.disabled,g=e.dragging,x=e.dragOverNodeKey,w=e.dropPosition,C=e.motion,m=e.height,A=e.itemHeight,S=e.virtual,D=e.scrollWidth,$=e.focusable,F=e.activeItem,B=e.focused,R=e.tabIndex,I=e.onKeyDown,T=e.onFocus,W=e.onBlur,H=e.onActiveChange,Z=e.onListChangeStart,Y=e.onListChangeEnd,j=Vr(e,V3),K=N.useRef(null),U=N.useRef(null);N.useImperativeHandle(t,function(){return{scrollTo:function(je){K.current.scrollTo(je)},getIndentWidth:function(){return U.current.offsetWidth}}});var G=N.useState(o),J=Et(G,2),z=J[0],ie=J[1],ge=N.useState(n),xe=Et(ge,2),Ae=xe[0],Fe=xe[1],be=N.useState(n),X=Et(be,2),fe=X[0],ce=X[1],se=N.useState([]),oe=Et(se,2),he=oe[0],we=oe[1],Ce=N.useState(null),ke=Et(Ce,2),Se=ke[0],Te=ke[1],Ie=N.useRef(n);Ie.current=n;function We(){var Oe=Ie.current;Fe(Oe),ce(Oe),we([]),Te(null),Y()}fo(function(){ie(o);var Oe=W3(z,o);if(Oe.key!==null)if(Oe.add){var je=Ae.findIndex(function(bt){var At=bt.key;return At===Oe.key}),Ve=xd(vd(Ae,n,Oe.key),S,m,A),ft=Ae.slice();ft.splice(je+1,0,yd),ce(ft),we(Ve),Te("show")}else{var tt=n.findIndex(function(bt){var At=bt.key;return At===Oe.key}),nt=xd(vd(n,Ae,Oe.key),S,m,A),Tt=n.slice();Tt.splice(tt+1,0,yd),ce(Tt),we(nt),Te("hide")}else Ae!==n&&(Fe(n),ce(n))},[o,n]),N.useEffect(function(){g||We()},[g]);var ut=C?fe:n,ot={expandedKeys:o,selectedKeys:i,loadedKeys:u,loadingKeys:f,checkedKeys:c,halfCheckedKeys:d,dragOverNodeKey:x,dropPosition:w,keyEntities:p};return N.createElement(N.Fragment,null,B&&F&&N.createElement("span",{style:bd,"aria-live":"assertive"},X3(F)),N.createElement("div",null,N.createElement("input",{style:bd,disabled:$===!1||v,tabIndex:$!==!1?R:null,onKeyDown:I,onFocus:T,onBlur:W,value:"",onChange:U3,"aria-label":"for screen reader"})),N.createElement("div",{className:"".concat(r,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},N.createElement("div",{className:"".concat(r,"-indent")},N.createElement("div",{ref:U,className:"".concat(r,"-indent-unit")}))),N.createElement(u1,Ft({},j,{data:ut,itemKey:wd,height:m,fullHeight:!1,virtual:S,itemHeight:A,scrollWidth:D,prefixCls:"".concat(r,"-list"),ref:K,role:"tree",onVisibleChange:function(je){je.every(function(Ve){return wd(Ve)!==No})&&We()}}),function(Oe){var je=Oe.pos,Ve=Object.assign({},(q1(Oe.data),Oe.data)),ft=Oe.title,tt=Oe.key,nt=Oe.isStart,Tt=Oe.isEnd,bt=Qa(tt,je);delete Ve.key,delete Ve.children;var At=Na(bt,ot);return N.createElement(K3,Ft({},Ve,At,{title:ft,active:!!F&&tt===F.key,pos:je,data:Oe.data,isStart:nt,isEnd:Tt,motion:C,motionNodes:tt===No?he:null,motionType:Se,onMotionStart:Z,onMotionEnd:We,treeNodeRequiredProps:ot,onMouseMove:function(){H(null)}}))}))}),Y3=10,uu=(function(e){Vg(r,e);var t=Ug(r);function r(){var n;Xg(this,r);for(var o=arguments.length,i=new Array(o),c=0;c<o;c++)i[c]=arguments[c];return n=t.call.apply(t,[this].concat(i)),_e(Kt(n),"destroyed",!1),_e(Kt(n),"delayedDragEnterLogic",void 0),_e(Kt(n),"loadingRetryTimes",{}),_e(Kt(n),"state",{keyEntities:{},indent:null,selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null,fieldNames:ra()}),_e(Kt(n),"dragStartMousePosition",null),_e(Kt(n),"dragNodeProps",null),_e(Kt(n),"currentMouseOverDroppableNodeKey",null),_e(Kt(n),"listRef",N.createRef()),_e(Kt(n),"onNodeDragStart",function(u,f){var d=n.state,p=d.expandedKeys,v=d.keyEntities,g=n.props.onDragStart,x=f.eventKey;n.dragNodeProps=f,n.dragStartMousePosition={x:u.clientX,y:u.clientY};var w=Mn(p,x);n.setState({draggingNodeKey:x,dragChildrenKeys:T3(x,v),indent:n.listRef.current.getIndentWidth()}),n.setExpandedKeys(w),window.addEventListener("dragend",n.onWindowDragEnd),g==null||g({event:u,node:Rr(f)})}),_e(Kt(n),"onNodeDragEnter",function(u,f){var d=n.state,p=d.expandedKeys,v=d.keyEntities,g=d.dragChildrenKeys,x=d.flattenNodes,w=d.indent,C=n.props,m=C.onDragEnter,A=C.onExpand,S=C.allowDrop,D=C.direction,$=f.pos,F=f.eventKey;if(n.currentMouseOverDroppableNodeKey!==F&&(n.currentMouseOverDroppableNodeKey=F),!n.dragNodeProps){n.resetDragState();return}var B=pd(u,n.dragNodeProps,f,w,n.dragStartMousePosition,S,x,v,p,D),R=B.dropPosition,I=B.dropLevelOffset,T=B.dropTargetKey,W=B.dropContainerKey,H=B.dropTargetPos,Z=B.dropAllowed,Y=B.dragOverNodeKey;if(g.includes(T)||!Z){n.resetDragState();return}if(n.delayedDragEnterLogic||(n.delayedDragEnterLogic={}),Object.keys(n.delayedDragEnterLogic).forEach(function(j){clearTimeout(n.delayedDragEnterLogic[j])}),n.dragNodeProps.eventKey!==f.eventKey&&(u.persist(),n.delayedDragEnterLogic[$]=window.setTimeout(function(){if(n.state.draggingNodeKey!==null){var j=Xt(p),K=sn(v,f.eventKey);K&&(K.children||[]).length&&(j=Wn(p,f.eventKey)),n.props.hasOwnProperty("expandedKeys")||n.setExpandedKeys(j),A==null||A(j,{node:Rr(f),expanded:!0,nativeEvent:u.nativeEvent})}},800)),n.dragNodeProps.eventKey===T&&I===0){n.resetDragState();return}n.setState({dragOverNodeKey:Y,dropPosition:R,dropLevelOffset:I,dropTargetKey:T,dropContainerKey:W,dropTargetPos:H,dropAllowed:Z}),m==null||m({event:u,node:Rr(f),expandedKeys:p})}),_e(Kt(n),"onNodeDragOver",function(u,f){var d=n.state,p=d.dragChildrenKeys,v=d.flattenNodes,g=d.keyEntities,x=d.expandedKeys,w=d.indent,C=n.props,m=C.onDragOver,A=C.allowDrop,S=C.direction;if(n.dragNodeProps){var D=pd(u,n.dragNodeProps,f,w,n.dragStartMousePosition,A,v,g,x,S),$=D.dropPosition,F=D.dropLevelOffset,B=D.dropTargetKey,R=D.dropContainerKey,I=D.dropTargetPos,T=D.dropAllowed,W=D.dragOverNodeKey;p.includes(B)||!T||(n.dragNodeProps.eventKey===B&&F===0?n.state.dropPosition===null&&n.state.dropLevelOffset===null&&n.state.dropTargetKey===null&&n.state.dropContainerKey===null&&n.state.dropTargetPos===null&&n.state.dropAllowed===!1&&n.state.dragOverNodeKey===null||n.resetDragState():$===n.state.dropPosition&&F===n.state.dropLevelOffset&&B===n.state.dropTargetKey&&R===n.state.dropContainerKey&&I===n.state.dropTargetPos&&T===n.state.dropAllowed&&W===n.state.dragOverNodeKey||n.setState({dropPosition:$,dropLevelOffset:F,dropTargetKey:B,dropContainerKey:R,dropTargetPos:I,dropAllowed:T,dragOverNodeKey:W}),m==null||m({event:u,node:Rr(f)}))}}),_e(Kt(n),"onNodeDragLeave",function(u,f){n.currentMouseOverDroppableNodeKey===f.eventKey&&!u.currentTarget.contains(u.relatedTarget)&&(n.resetDragState(),n.currentMouseOverDroppableNodeKey=null);var d=n.props.onDragLeave;d==null||d({event:u,node:Rr(f)})}),_e(Kt(n),"onWindowDragEnd",function(u){n.onNodeDragEnd(u,null,!0),window.removeEventListener("dragend",n.onWindowDragEnd)}),_e(Kt(n),"onNodeDragEnd",function(u,f){var d=n.props.onDragEnd;n.setState({dragOverNodeKey:null}),n.cleanDragState(),d==null||d({event:u,node:Rr(f)}),n.dragNodeProps=null,window.removeEventListener("dragend",n.onWindowDragEnd)}),_e(Kt(n),"onNodeDrop",function(u,f){var d,p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,v=n.state,g=v.dragChildrenKeys,x=v.dropPosition,w=v.dropTargetKey,C=v.dropTargetPos,m=v.dropAllowed;if(m){var A=n.props.onDrop;if(n.setState({dragOverNodeKey:null}),n.cleanDragState(),w!==null){var S=Ke(Ke({},Na(w,n.getTreeNodeRequiredProps())),{},{active:((d=n.getActiveItem())===null||d===void 0?void 0:d.key)===w,data:sn(n.state.keyEntities,w).node}),D=g.includes(w);lo(!D,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var $=lu(C),F={event:u,node:Rr(S),dragNode:n.dragNodeProps?Rr(n.dragNodeProps):null,dragNodesKeys:[n.dragNodeProps.eventKey].concat(g),dropToGap:x!==0,dropPosition:x+Number($[$.length-1])};p||A==null||A(F),n.dragNodeProps=null}}}),_e(Kt(n),"cleanDragState",function(){var u=n.state.draggingNodeKey;u!==null&&n.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),n.dragStartMousePosition=null,n.currentMouseOverDroppableNodeKey=null}),_e(Kt(n),"triggerExpandActionExpand",function(u,f){var d=n.state,p=d.expandedKeys,v=d.flattenNodes,g=f.expanded,x=f.key,w=f.isLeaf;if(!(w||u.shiftKey||u.metaKey||u.ctrlKey)){var C=v.filter(function(A){return A.key===x})[0],m=Rr(Ke(Ke({},Na(x,n.getTreeNodeRequiredProps())),{},{data:C.data}));n.setExpandedKeys(g?Mn(p,x):Wn(p,x)),n.onNodeExpand(u,m)}}),_e(Kt(n),"onNodeClick",function(u,f){var d=n.props,p=d.onClick,v=d.expandAction;v==="click"&&n.triggerExpandActionExpand(u,f),p==null||p(u,f)}),_e(Kt(n),"onNodeDoubleClick",function(u,f){var d=n.props,p=d.onDoubleClick,v=d.expandAction;v==="doubleClick"&&n.triggerExpandActionExpand(u,f),p==null||p(u,f)}),_e(Kt(n),"onNodeSelect",function(u,f){var d=n.state.selectedKeys,p=n.state,v=p.keyEntities,g=p.fieldNames,x=n.props,w=x.onSelect,C=x.multiple,m=f.selected,A=f[g.key],S=!m;S?C?d=Wn(d,A):d=[A]:d=Mn(d,A);var D=d.map(function($){var F=sn(v,$);return F?F.node:null}).filter(Boolean);n.setUncontrolledState({selectedKeys:d}),w==null||w(d,{event:"select",selected:S,node:f,selectedNodes:D,nativeEvent:u.nativeEvent})}),_e(Kt(n),"onNodeCheck",function(u,f,d){var p=n.state,v=p.keyEntities,g=p.checkedKeys,x=p.halfCheckedKeys,w=n.props,C=w.checkStrictly,m=w.onCheck,A=f.key,S,D={event:"check",node:f,checked:d,nativeEvent:u.nativeEvent};if(C){var $=d?Wn(g,A):Mn(g,A),F=Mn(x,A);S={checked:$,halfChecked:F},D.checkedNodes=$.map(function(H){return sn(v,H)}).filter(Boolean).map(function(H){return H.node}),n.setUncontrolledState({checkedKeys:$})}else{var B=Go([].concat(Xt(g),[A]),!0,v),R=B.checkedKeys,I=B.halfCheckedKeys;if(!d){var T=new Set(R);T.delete(A);var W=Go(Array.from(T),{halfCheckedKeys:I},v);R=W.checkedKeys,I=W.halfCheckedKeys}S=R,D.checkedNodes=[],D.checkedNodesPositions=[],D.halfCheckedKeys=I,R.forEach(function(H){var Z=sn(v,H);if(Z){var Y=Z.node,j=Z.pos;D.checkedNodes.push(Y),D.checkedNodesPositions.push({node:Y,pos:j})}}),n.setUncontrolledState({checkedKeys:R},!1,{halfCheckedKeys:I})}m==null||m(S,D)}),_e(Kt(n),"onNodeLoad",function(u){var f,d=u.key,p=n.state.keyEntities,v=sn(p,d);if(!(v!=null&&(f=v.children)!==null&&f!==void 0&&f.length)){var g=new Promise(function(x,w){n.setState(function(C){var m=C.loadedKeys,A=m===void 0?[]:m,S=C.loadingKeys,D=S===void 0?[]:S,$=n.props,F=$.loadData,B=$.onLoad;if(!F||A.includes(d)||D.includes(d))return null;var R=F(u);return R.then(function(){var I=n.state.loadedKeys,T=Wn(I,d);B==null||B(T,{event:"load",node:u}),n.setUncontrolledState({loadedKeys:T}),n.setState(function(W){return{loadingKeys:Mn(W.loadingKeys,d)}}),x()}).catch(function(I){if(n.setState(function(W){return{loadingKeys:Mn(W.loadingKeys,d)}}),n.loadingRetryTimes[d]=(n.loadingRetryTimes[d]||0)+1,n.loadingRetryTimes[d]>=Y3){var T=n.state.loadedKeys;lo(!1,"Retry for `loadData` many times but still failed. No more retry."),n.setUncontrolledState({loadedKeys:Wn(T,d)}),x()}w(I)}),{loadingKeys:Wn(D,d)}})});return g.catch(function(){}),g}}),_e(Kt(n),"onNodeMouseEnter",function(u,f){var d=n.props.onMouseEnter;d==null||d({event:u,node:f})}),_e(Kt(n),"onNodeMouseLeave",function(u,f){var d=n.props.onMouseLeave;d==null||d({event:u,node:f})}),_e(Kt(n),"onNodeContextMenu",function(u,f){var d=n.props.onRightClick;d&&(u.preventDefault(),d({event:u,node:f}))}),_e(Kt(n),"onFocus",function(){var u=n.props.onFocus;n.setState({focused:!0});for(var f=arguments.length,d=new Array(f),p=0;p<f;p++)d[p]=arguments[p];u==null||u.apply(void 0,d)}),_e(Kt(n),"onBlur",function(){var u=n.props.onBlur;n.setState({focused:!1}),n.onActiveChange(null);for(var f=arguments.length,d=new Array(f),p=0;p<f;p++)d[p]=arguments[p];u==null||u.apply(void 0,d)}),_e(Kt(n),"getTreeNodeRequiredProps",function(){var u=n.state,f=u.expandedKeys,d=u.selectedKeys,p=u.loadedKeys,v=u.loadingKeys,g=u.checkedKeys,x=u.halfCheckedKeys,w=u.dragOverNodeKey,C=u.dropPosition,m=u.keyEntities;return{expandedKeys:f||[],selectedKeys:d||[],loadedKeys:p||[],loadingKeys:v||[],checkedKeys:g||[],halfCheckedKeys:x||[],dragOverNodeKey:w,dropPosition:C,keyEntities:m}}),_e(Kt(n),"setExpandedKeys",function(u){var f=n.state,d=f.treeData,p=f.fieldNames,v=ul(d,u,p);n.setUncontrolledState({expandedKeys:u,flattenNodes:v},!0)}),_e(Kt(n),"onNodeExpand",function(u,f){var d=n.state.expandedKeys,p=n.state,v=p.listChanging,g=p.fieldNames,x=n.props,w=x.onExpand,C=x.loadData,m=f.expanded,A=f[g.key];if(!v){var S=d.includes(A),D=!m;if(lo(m&&S||!m&&!S,"Expand state not sync with index check"),d=D?Wn(d,A):Mn(d,A),n.setExpandedKeys(d),w==null||w(d,{node:f,expanded:D,nativeEvent:u.nativeEvent}),D&&C){var $=n.onNodeLoad(f);$&&$.then(function(){var F=ul(n.state.treeData,d,g);n.setUncontrolledState({flattenNodes:F})}).catch(function(){var F=n.state.expandedKeys,B=Mn(F,A);n.setExpandedKeys(B)})}}}),_e(Kt(n),"onListChangeStart",function(){n.setUncontrolledState({listChanging:!0})}),_e(Kt(n),"onListChangeEnd",function(){setTimeout(function(){n.setUncontrolledState({listChanging:!1})})}),_e(Kt(n),"onActiveChange",function(u){var f=n.state.activeKey,d=n.props,p=d.onActiveChange,v=d.itemScrollOffset,g=v===void 0?0:v;f!==u&&(n.setState({activeKey:u}),u!==null&&n.scrollTo({key:u,offset:g}),p==null||p(u))}),_e(Kt(n),"getActiveItem",function(){var u=n.state,f=u.activeKey,d=u.flattenNodes;return f===null?null:d.find(function(p){var v=p.key;return v===f})||null}),_e(Kt(n),"offsetActiveKey",function(u){var f=n.state,d=f.flattenNodes,p=f.activeKey,v=d.findIndex(function(w){var C=w.key;return C===p});v===-1&&u<0&&(v=d.length),v=(v+u+d.length)%d.length;var g=d[v];if(g){var x=g.key;n.onActiveChange(x)}else n.onActiveChange(null)}),_e(Kt(n),"onKeyDown",function(u){var f=n.state,d=f.activeKey,p=f.expandedKeys,v=f.checkedKeys,g=f.fieldNames,x=n.props,w=x.onKeyDown,C=x.checkable,m=x.selectable;switch(u.which){case Dn.UP:{n.offsetActiveKey(-1),u.preventDefault();break}case Dn.DOWN:{n.offsetActiveKey(1),u.preventDefault();break}}var A=n.getActiveItem();if(A&&A.data){var S=n.getTreeNodeRequiredProps(),D=A.data.isLeaf===!1||!!(A.data[g.children]||[]).length,$=Rr(Ke(Ke({},Na(d,S)),{},{data:A.data,active:!0}));switch(u.which){case Dn.LEFT:{D&&p.includes(d)?n.onNodeExpand({},$):A.parent&&n.onActiveChange(A.parent.key),u.preventDefault();break}case Dn.RIGHT:{D&&!p.includes(d)?n.onNodeExpand({},$):A.children&&A.children.length&&n.onActiveChange(A.children[0].key),u.preventDefault();break}case Dn.ENTER:case Dn.SPACE:{C&&!$.disabled&&$.checkable!==!1&&!$.disableCheckbox?n.onNodeCheck({},$,!v.includes(d)):!C&&m&&!$.disabled&&$.selectable!==!1&&n.onNodeSelect({},$);break}}}w==null||w(u)}),_e(Kt(n),"setUncontrolledState",function(u){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!n.destroyed){var p=!1,v=!0,g={};Object.keys(u).forEach(function(x){if(n.props.hasOwnProperty(x)){v=!1;return}p=!0,g[x]=u[x]}),p&&(!f||v)&&n.setState(Ke(Ke({},g),d))}}),_e(Kt(n),"scrollTo",function(u){n.listRef.current.scrollTo(u)}),n}return Gg(r,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var o=this.props,i=o.activeKey,c=o.itemScrollOffset,u=c===void 0?0:c;i!==void 0&&i!==this.state.activeKey&&(this.setState({activeKey:i}),i!==null&&this.scrollTo({key:i,offset:u}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var o=this.state,i=o.focused,c=o.flattenNodes,u=o.keyEntities,f=o.draggingNodeKey,d=o.activeKey,p=o.dropLevelOffset,v=o.dropContainerKey,g=o.dropTargetKey,x=o.dropPosition,w=o.dragOverNodeKey,C=o.indent,m=this.props,A=m.prefixCls,S=m.className,D=m.style,$=m.showLine,F=m.focusable,B=m.tabIndex,R=B===void 0?0:B,I=m.selectable,T=m.showIcon,W=m.icon,H=m.switcherIcon,Z=m.draggable,Y=m.checkable,j=m.checkStrictly,K=m.disabled,U=m.motion,G=m.loadData,J=m.filterTreeNode,z=m.height,ie=m.itemHeight,ge=m.scrollWidth,xe=m.virtual,Ae=m.titleRender,Fe=m.dropIndicatorRender,be=m.onContextMenu,X=m.onScroll,fe=m.direction,ce=m.rootClassName,se=m.rootStyle,oe=Gi(this.props,{aria:!0,data:!0}),he;Z&&(xn(Z)==="object"?he=Z:typeof Z=="function"?he={nodeDraggable:Z}:he={});var we={prefixCls:A,selectable:I,showIcon:T,icon:W,switcherIcon:H,draggable:he,draggingNodeKey:f,checkable:Y,checkStrictly:j,disabled:K,keyEntities:u,dropLevelOffset:p,dropContainerKey:v,dropTargetKey:g,dropPosition:x,dragOverNodeKey:w,indent:C,direction:fe,dropIndicatorRender:Fe,loadData:G,filterTreeNode:J,titleRender:Ae,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop};return N.createElement(su.Provider,{value:we},N.createElement("div",{className:vt(A,S,ce,_e(_e(_e({},"".concat(A,"-show-line"),$),"".concat(A,"-focused"),i),"".concat(A,"-active-focused"),d!==null)),style:se},N.createElement(G3,Ft({ref:this.listRef,prefixCls:A,style:D,data:c,disabled:K,selectable:I,checkable:!!Y,motion:U,dragging:f!==null,height:z,itemHeight:ie,virtual:xe,focusable:F,focused:i,tabIndex:R,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:be,onScroll:X,scrollWidth:ge},this.getTreeNodeRequiredProps(),oe))))}}],[{key:"getDerivedStateFromProps",value:function(o,i){var c=i.prevProps,u={prevProps:o};function f(R){return!c&&o.hasOwnProperty(R)||c&&c[R]!==o[R]}var d,p=i.fieldNames;if(f("fieldNames")&&(p=ra(o.fieldNames),u.fieldNames=p),f("treeData")?d=o.treeData:f("children")&&(lo(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),d=v1(o.children)),d){u.treeData=d;var v=eu(d,{fieldNames:p});u.keyEntities=Ke(_e({},No,K1),v.keyEntities)}var g=u.keyEntities||i.keyEntities;if(f("expandedKeys")||c&&f("autoExpandParent"))u.expandedKeys=o.autoExpandParent||!c&&o.defaultExpandParent?d0(o.expandedKeys,g):o.expandedKeys;else if(!c&&o.defaultExpandAll){var x=Ke({},g);delete x[No];var w=[];Object.keys(x).forEach(function(R){var I=x[R];I.children&&I.children.length&&w.push(I.key)}),u.expandedKeys=w}else!c&&o.defaultExpandedKeys&&(u.expandedKeys=o.autoExpandParent||o.defaultExpandParent?d0(o.defaultExpandedKeys,g):o.defaultExpandedKeys);if(u.expandedKeys||delete u.expandedKeys,d||u.expandedKeys){var C=ul(d||i.treeData,u.expandedKeys||i.expandedKeys,p);u.flattenNodes=C}if(o.selectable&&(f("selectedKeys")?u.selectedKeys=md(o.selectedKeys,o):!c&&o.defaultSelectedKeys&&(u.selectedKeys=md(o.defaultSelectedKeys,o))),o.checkable){var m;if(f("checkedKeys")?m=cl(o.checkedKeys)||{}:!c&&o.defaultCheckedKeys?m=cl(o.defaultCheckedKeys)||{}:d&&(m=cl(o.checkedKeys)||{checkedKeys:i.checkedKeys,halfCheckedKeys:i.halfCheckedKeys}),m){var A=m,S=A.checkedKeys,D=S===void 0?[]:S,$=A.halfCheckedKeys,F=$===void 0?[]:$;if(!o.checkStrictly){var B=Go(D,!0,g);D=B.checkedKeys,F=B.halfCheckedKeys}u.checkedKeys=D,u.halfCheckedKeys=F}}return f("loadedKeys")&&(u.loadedKeys=o.loadedKeys),u}}]),r})(N.Component);_e(uu,"defaultProps",{prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:L3,allowDrop:function(){return!0},expandAction:!1});_e(uu,"TreeNode",_a);var Z3={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file",theme:"outlined"},J3=function(t,r){return N.createElement(tn,Ft({},t,{ref:r,icon:Z3}))},W1=N.forwardRef(J3),Q3={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z"}}]},name:"folder-open",theme:"outlined"},e5=function(t,r){return N.createElement(tn,Ft({},t,{ref:r,icon:Q3}))},t5=N.forwardRef(e5),r5={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z"}}]},name:"folder",theme:"outlined"},n5=function(t,r){return N.createElement(tn,Ft({},t,{ref:r,icon:r5}))},o5=N.forwardRef(n5),a5={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 276.5a56 56 0 1056-97 56 56 0 00-56 97zm0 284a56 56 0 1056-97 56 56 0 00-56 97zM640 228a56 56 0 10112 0 56 56 0 00-112 0zm0 284a56 56 0 10112 0 56 56 0 00-112 0zM300 844.5a56 56 0 1056-97 56 56 0 00-56 97zM640 796a56 56 0 10112 0 56 56 0 00-112 0z"}}]},name:"holder",theme:"outlined"},i5=function(t,r){return N.createElement(tn,Ft({},t,{ref:r,icon:a5}))},s5=N.forwardRef(i5);const l5=({treeCls:e,treeNodeCls:t,directoryNodeSelectedBg:r,directoryNodeSelectedColor:n,motionDurationMid:o,borderRadius:i,controlItemBgHover:c})=>({[`${e}${e}-directory ${t}`]:{[`${e}-node-content-wrapper`]:{position:"static",[`&:has(${e}-drop-indicator)`]:{position:"relative"},[`> *:not(${e}-drop-indicator)`]:{position:"relative"},"&:hover":{background:"transparent"},"&:before":{position:"absolute",inset:0,transition:`background-color ${o}`,content:'""',borderRadius:i},"&:hover:before":{background:c}},[`${e}-switcher, ${e}-checkbox, ${e}-draggable-icon`]:{zIndex:1},"&-selected":{background:r,borderRadius:i,[`${e}-switcher, ${e}-draggable-icon`]:{color:n},[`${e}-node-content-wrapper`]:{color:n,background:"transparent","&, &:hover":{color:n},"&:before, &:hover:before":{background:r}}}}}),u5=new Jg("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),c5=(e,t)=>({[`.${e}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${t.motionDurationSlow}`}}}),d5=(e,t)=>({[`.${e}-drop-indicator`]:{position:"absolute",zIndex:1,height:2,backgroundColor:t.colorPrimary,borderRadius:1,pointerEvents:"none","&:after":{position:"absolute",top:-3,insetInlineStart:-6,width:8,height:8,backgroundColor:"transparent",border:`${pt(t.lineWidthBold)} solid ${t.colorPrimary}`,borderRadius:"50%",content:'""'}}}),f5=(e,t)=>{const{treeCls:r,treeNodeCls:n,treeNodePadding:o,titleHeight:i,indentSize:c,nodeSelectedBg:u,nodeHoverBg:f,colorTextQuaternary:d,controlItemBgActiveDisabled:p}=t;return{[r]:Object.assign(Object.assign({},Q0(t)),{"--rc-virtual-list-scrollbar-bg":t.colorSplit,background:t.colorBgContainer,borderRadius:t.borderRadius,transition:`background-color ${t.motionDurationSlow}`,"&-rtl":{direction:"rtl"},[`&${r}-rtl ${r}-switcher_close ${r}-switcher-icon svg`]:{transform:"rotate(90deg)"},[`&-focused:not(:hover):not(${r}-active-focused)`]:Qg(t),[`${r}-list-holder-inner`]:{alignItems:"flex-start"},[`&${r}-block-node`]:{[`${r}-list-holder-inner`]:{alignItems:"stretch",[`${r}-node-content-wrapper`]:{flex:"auto"},[`${n}.dragging:after`]:{position:"absolute",inset:0,border:`1px solid ${t.colorPrimary}`,opacity:0,animationName:u5,animationDuration:t.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none",borderRadius:t.borderRadius}}},[n]:{display:"flex",alignItems:"flex-start",marginBottom:o,lineHeight:pt(i),position:"relative","&:before":{content:'""',position:"absolute",zIndex:1,insetInlineStart:0,width:"100%",top:"100%",height:o},[`&-disabled ${r}-node-content-wrapper`]:{color:t.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"}},[`${r}-checkbox-disabled + ${r}-node-selected,&${n}-disabled${n}-selected ${r}-node-content-wrapper`]:{backgroundColor:p},[`${r}-checkbox-disabled`]:{pointerEvents:"unset"},[`&:not(${n}-disabled)`]:{[`${r}-node-content-wrapper`]:{"&:hover":{color:t.nodeHoverColor}}},[`&-active ${r}-node-content-wrapper`]:{background:t.controlItemBgHover},[`&:not(${n}-disabled).filter-node ${r}-title`]:{color:t.colorPrimary,fontWeight:t.fontWeightStrong},"&-draggable":{cursor:"grab",[`${r}-draggable-icon`]:{flexShrink:0,width:i,textAlign:"center",visibility:"visible",color:d},[`&${n}-disabled ${r}-draggable-icon`]:{visibility:"hidden"}}},[`${r}-indent`]:{alignSelf:"stretch",whiteSpace:"nowrap",userSelect:"none","&-unit":{display:"inline-block",width:c}},[`${r}-draggable-icon`]:{visibility:"hidden"},[`${r}-switcher, ${r}-checkbox`]:{marginInlineEnd:t.calc(t.calc(i).sub(t.controlInteractiveSize)).div(2).equal()},[`${r}-switcher`]:Object.assign(Object.assign({},c5(e,t)),{position:"relative",flex:"none",alignSelf:"stretch",width:i,textAlign:"center",cursor:"pointer",userSelect:"none",transition:`all ${t.motionDurationSlow}`,"&-noop":{cursor:"unset"},"&:before":{pointerEvents:"none",content:'""',width:i,height:i,position:"absolute",left:{_skip_check_:!0,value:0},top:0,borderRadius:t.borderRadius,transition:`all ${t.motionDurationSlow}`},[`&:not(${r}-switcher-noop):hover:before`]:{backgroundColor:t.colorBgTextHover},[`&_close ${r}-switcher-icon svg`]:{transform:"rotate(-90deg)"},"&-loading-icon":{color:t.colorPrimary},"&-leaf-line":{position:"relative",zIndex:1,display:"inline-block",width:"100%",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:t.calc(i).div(2).equal(),bottom:t.calc(o).mul(-1).equal(),marginInlineStart:-1,borderInlineEnd:`1px solid ${t.colorBorder}`,content:'""'},"&:after":{position:"absolute",width:t.calc(t.calc(i).div(2).equal()).mul(.8).equal(),height:t.calc(i).div(2).equal(),borderBottom:`1px solid ${t.colorBorder}`,content:'""'}}}),[`${r}-node-content-wrapper`]:Object.assign(Object.assign({position:"relative",minHeight:i,paddingBlock:0,paddingInline:t.paddingXS,background:"transparent",borderRadius:t.borderRadius,cursor:"pointer",transition:`all ${t.motionDurationMid}, border 0s, line-height 0s, box-shadow 0s`},d5(e,t)),{"&:hover":{backgroundColor:f},[`&${r}-node-selected`]:{color:t.nodeSelectedColor,backgroundColor:u},[`${r}-iconEle`]:{display:"inline-block",width:i,height:i,textAlign:"center",verticalAlign:"top","&:empty":{display:"none"}}}),[`${r}-unselectable ${r}-node-content-wrapper:hover`]:{backgroundColor:"transparent"},[`${n}.drop-container > [draggable]`]:{boxShadow:`0 0 0 2px ${t.colorPrimary}`},"&-show-line":{[`${r}-indent-unit`]:{position:"relative",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:t.calc(i).div(2).equal(),bottom:t.calc(o).mul(-1).equal(),borderInlineEnd:`1px solid ${t.colorBorder}`,content:'""'},"&-end:before":{display:"none"}},[`${r}-switcher`]:{background:"transparent","&-line-icon":{verticalAlign:"-0.15em"}}},[`${n}-leaf-last ${r}-switcher-leaf-line:before`]:{top:"auto !important",bottom:"auto !important",height:`${pt(t.calc(i).div(2).equal())} !important`}})}},h5=(e,t,r=!0)=>{const n=`.${e}`,o=`${n}-treenode`,i=t.calc(t.paddingXS).div(2).equal(),c=Ui(t,{treeCls:n,treeNodeCls:o,treeNodePadding:i});return[f5(e,c),r&&l5(c)].filter(Boolean)},p5=e=>{const{controlHeightSM:t,controlItemBgHover:r,controlItemBgActive:n}=e,o=t;return{titleHeight:o,indentSize:o,nodeHoverBg:r,nodeHoverColor:e.colorText,nodeSelectedBg:n,nodeSelectedColor:e.colorText}},m5=e=>{const{colorTextLightSolid:t,colorPrimary:r}=e;return Object.assign(Object.assign({},p5(e)),{directoryNodeSelectedColor:t,directoryNodeSelectedBg:r})},g5=U0("Tree",(e,{prefixCls:t})=>[{[e.componentCls]:Yg(`${t}-checkbox`,e)},h5(t,e),Zg(e)],m5),Cd=4;function v5(e){const{dropPosition:t,dropLevelOffset:r,prefixCls:n,indent:o,direction:i="ltr"}=e,c=i==="ltr"?"left":"right",u=i==="ltr"?"right":"left",f={[c]:-r*o+Cd,[u]:0};switch(t){case-1:f.top=-3;break;case 1:f.bottom=-3;break;default:f.bottom=-3,f[c]=o+Cd;break}return He.createElement("div",{style:f,className:`${n}-drop-indicator`})}var b5={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"filled"},y5=function(t,r){return N.createElement(tn,Ft({},t,{ref:r,icon:b5}))},x5=N.forwardRef(y5),w5={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"minus-square",theme:"outlined"},C5=function(t,r){return N.createElement(tn,Ft({},t,{ref:r,icon:w5}))},D5=N.forwardRef(C5),k5={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"plus-square",theme:"outlined"},E5=function(t,r){return N.createElement(tn,Ft({},t,{ref:r,icon:k5}))},S5=N.forwardRef(E5);const A5=e=>{var t,r;const{prefixCls:n,switcherIcon:o,treeNodeProps:i,showLine:c,switcherLoadingIcon:u}=e,{isLeaf:f,expanded:d,loading:p}=i;if(p)return N.isValidElement(u)?u:N.createElement(e4,{className:`${n}-switcher-loading-icon`});let v;if(c&&typeof c=="object"&&(v=c.showLeafIcon),f){if(!c)return null;if(typeof v!="boolean"&&v){const w=typeof v=="function"?v(i):v,C=`${n}-switcher-line-custom-icon`;return N.isValidElement(w)?Jc(w,{className:vt((t=w.props)===null||t===void 0?void 0:t.className,C)}):w}return v?N.createElement(W1,{className:`${n}-switcher-line-icon`}):N.createElement("span",{className:`${n}-switcher-leaf-line`})}const g=`${n}-switcher-icon`,x=typeof o=="function"?o(i):o;return N.isValidElement(x)?Jc(x,{className:vt((r=x.props)===null||r===void 0?void 0:r.className,g)}):x!==void 0?x:c?d?N.createElement(D5,{className:`${n}-switcher-line-icon`}):N.createElement(S5,{className:`${n}-switcher-line-icon`}):N.createElement(x5,{className:g})},V1=He.forwardRef((e,t)=>{var r;const{getPrefixCls:n,direction:o,virtual:i,tree:c}=He.useContext(Ja),{prefixCls:u,className:f,showIcon:d=!1,showLine:p,switcherIcon:v,switcherLoadingIcon:g,blockNode:x=!1,children:w,checkable:C=!1,selectable:m=!0,draggable:A,disabled:S,motion:D,style:$}=e,F=n("tree",u),B=n(),R=He.useContext(t4),I=S??R,T=D??Object.assign(Object.assign({},r4(B)),{motionAppear:!1}),W=Object.assign(Object.assign({},e),{checkable:C,selectable:m,showIcon:d,motion:T,blockNode:x,disabled:I,showLine:!!p,dropIndicatorRender:v5}),[H,Z,Y]=g5(F),[,j]=c1(),K=j.paddingXS/2+(((r=j.Tree)===null||r===void 0?void 0:r.titleHeight)||j.controlHeightSM),U=He.useMemo(()=>{if(!A)return!1;let J={};switch(typeof A){case"function":J.nodeDraggable=A;break;case"object":J=Object.assign({},A);break}return J.icon!==!1&&(J.icon=J.icon||He.createElement(s5,null)),J},[A]),G=J=>He.createElement(A5,{prefixCls:F,switcherIcon:v,switcherLoadingIcon:g,treeNodeProps:J,showLine:p});return H(He.createElement(uu,Object.assign({itemHeight:K,ref:t,virtual:i},W,{style:Object.assign(Object.assign({},c==null?void 0:c.style),$),prefixCls:F,className:vt({[`${F}-icon-hide`]:!d,[`${F}-block-node`]:x,[`${F}-unselectable`]:!m,[`${F}-rtl`]:o==="rtl",[`${F}-disabled`]:I},c==null?void 0:c.className,f,Z,Y),direction:o,checkable:C&&He.createElement("span",{className:`${F}-checkbox-inner`}),selectable:m,switcherIcon:G,draggable:U}),w))}),Dd=0,dl=1,kd=2;function cu(e,t,r){const{key:n,children:o}=r;function i(c){const u=c[n],f=c[o];t(u,c)!==!1&&cu(f||[],t,r)}e.forEach(i)}function B5({treeData:e,expandedKeys:t,startKey:r,endKey:n,fieldNames:o}){const i=[];let c=Dd;if(r&&r===n)return[r];if(!r||!n)return[];function u(f){return f===r||f===n}return cu(e,f=>{if(c===kd)return!1;if(u(f)){if(i.push(f),c===Dd)c=dl;else if(c===dl)return c=kd,!1}else c===dl&&i.push(f);return t.includes(f)},ra(o)),i}function fl(e,t,r){const n=Xt(t),o=[];return cu(e,(i,c)=>{const u=n.indexOf(i);return u!==-1&&(o.push(c),n.splice(u,1)),!!n.length},ra(r)),o}var Ed=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};function F5(e){const{isLeaf:t,expanded:r}=e;return t?N.createElement(W1,null):r?N.createElement(t5,null):N.createElement(o5,null)}function Sd({treeData:e,children:t}){return e||v1(t)}const N5=(e,t)=>{var{defaultExpandAll:r,defaultExpandParent:n,defaultExpandedKeys:o}=e,i=Ed(e,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]);const c=N.useRef(null),u=N.useRef(null),f=()=>{const{keyEntities:I}=eu(Sd(i),{fieldNames:i.fieldNames});let T;return r?T=Object.keys(I):n?T=d0(i.expandedKeys||o||[],I):T=i.expandedKeys||o||[],T},[d,p]=N.useState(i.selectedKeys||i.defaultSelectedKeys||[]),[v,g]=N.useState(()=>f());N.useEffect(()=>{"selectedKeys"in i&&p(i.selectedKeys)},[i.selectedKeys]),N.useEffect(()=>{"expandedKeys"in i&&g(i.expandedKeys)},[i.expandedKeys]);const x=(I,T)=>{var W;return"expandedKeys"in i||g(I),(W=i.onExpand)===null||W===void 0?void 0:W.call(i,I,T)},w=(I,T)=>{var W;const{multiple:H,fieldNames:Z}=i,{node:Y,nativeEvent:j}=T,{key:K=""}=Y,U=Sd(i),G=Object.assign(Object.assign({},T),{selected:!0}),J=(j==null?void 0:j.ctrlKey)||(j==null?void 0:j.metaKey),z=j==null?void 0:j.shiftKey;let ie;H&&J?(ie=I,c.current=K,u.current=ie,G.selectedNodes=fl(U,ie,Z)):H&&z?(ie=Array.from(new Set([].concat(Xt(u.current||[]),Xt(B5({treeData:U,expandedKeys:v,startKey:K,endKey:c.current,fieldNames:Z}))))),G.selectedNodes=fl(U,ie,Z)):(ie=[K],c.current=K,u.current=ie,G.selectedNodes=fl(U,ie,Z)),(W=i.onSelect)===null||W===void 0||W.call(i,ie,G),"selectedKeys"in i||p(ie)},{getPrefixCls:C,direction:m}=N.useContext(Ja),{prefixCls:A,className:S,showIcon:D=!0,expandAction:$="click"}=i,F=Ed(i,["prefixCls","className","showIcon","expandAction"]),B=C("tree",A),R=vt(`${B}-directory`,{[`${B}-directory-rtl`]:m==="rtl"},S);return N.createElement(V1,Object.assign({icon:F5,ref:t,blockNode:!0},F,{showIcon:D,expandAction:$,prefixCls:B,className:R,expandedKeys:v,selectedKeys:d,onSelect:w,onExpand:x}))},T5=N.forwardRef(N5),du=V1;du.DirectoryTree=T5;du.TreeNode=_a;const Ad=e=>{const{value:t,filterSearch:r,tablePrefixCls:n,locale:o,onChange:i}=e;return r?N.createElement("div",{className:`${n}-filter-dropdown-search`},N.createElement(n4,{prefix:N.createElement(o4,null),placeholder:o.filterSearchPlaceholder,onChange:i,value:t,htmlSize:1,className:`${n}-filter-dropdown-search-input`})):null},O5=e=>{const{keyCode:t}=e;t===Dn.ENTER&&e.stopPropagation()},$5=N.forwardRef((e,t)=>N.createElement("div",{className:e.className,onClick:r=>r.stopPropagation(),onKeyDown:O5,ref:t},e.children));function Yo(e){let t=[];return(e||[]).forEach(({value:r,children:n})=>{t.push(r),n&&(t=[].concat(Xt(t),Xt(Yo(n))))}),t}function M5(e){return e.some(({children:t})=>t)}function U1(e,t){return typeof t=="string"||typeof t=="number"?t==null?void 0:t.toString().toLowerCase().includes(e.trim().toLowerCase()):!1}function X1({filters:e,prefixCls:t,filteredKeys:r,filterMultiple:n,searchValue:o,filterSearch:i}){return e.map((c,u)=>{const f=String(c.value);if(c.children)return{key:f||u,label:c.text,popupClassName:`${t}-dropdown-submenu`,children:X1({filters:c.children,prefixCls:t,filteredKeys:r,filterMultiple:n,searchValue:o,filterSearch:i})};const d=n?Yi:t1,p={key:c.value!==void 0?f:u,label:N.createElement(N.Fragment,null,N.createElement(d,{checked:r.includes(f)}),N.createElement("span",null,c.text))};return o.trim()?typeof i=="function"?i(o,c)?p:null:U1(o,c.text)?p:null:p})}function hl(e){return e||[]}const R5=e=>{var t,r,n,o;const{tablePrefixCls:i,prefixCls:c,column:u,dropdownPrefixCls:f,columnKey:d,filterOnClose:p,filterMultiple:v,filterMode:g="menu",filterSearch:x=!1,filterState:w,triggerFilter:C,locale:m,children:A,getPopupContainer:S,rootClassName:D}=e,{filterResetToDefaultFilteredValue:$,defaultFilteredValue:F,filterDropdownProps:B={},filterDropdownOpen:R,filterDropdownVisible:I,onFilterDropdownVisibleChange:T,onFilterDropdownOpenChange:W}=u,[H,Z]=N.useState(!1),Y=!!(w&&(!((t=w.filteredKeys)===null||t===void 0)&&t.length||w.forceFiltered)),j=Oe=>{var je;Z(Oe),(je=B.onOpenChange)===null||je===void 0||je.call(B,Oe),W==null||W(Oe),T==null||T(Oe)},K=(o=(n=(r=B.open)!==null&&r!==void 0?r:R)!==null&&n!==void 0?n:I)!==null&&o!==void 0?o:H,U=w==null?void 0:w.filteredKeys,[G,J]=x4(hl(U)),z=({selectedKeys:Oe})=>{J(Oe)},ie=(Oe,{node:je,checked:Ve})=>{z(v?{selectedKeys:Oe}:{selectedKeys:Ve&&je.key?[je.key]:[]})};N.useEffect(()=>{H&&z({selectedKeys:hl(U)})},[U]);const[ge,xe]=N.useState([]),Ae=Oe=>{xe(Oe)},[Fe,be]=N.useState(""),X=Oe=>{const{value:je}=Oe.target;be(je)};N.useEffect(()=>{H||be("")},[H]);const fe=Oe=>{const je=Oe!=null&&Oe.length?Oe:null;if(je===null&&(!w||!w.filteredKeys)||ta(je,w==null?void 0:w.filteredKeys,!0))return null;C({column:u,key:d,filteredKeys:je})},ce=()=>{j(!1),fe(G())},se=({confirm:Oe,closeDropdown:je}={confirm:!1,closeDropdown:!1})=>{Oe&&fe([]),je&&j(!1),be(""),J($?(F||[]).map(Ve=>String(Ve)):[])},oe=({closeDropdown:Oe}={closeDropdown:!0})=>{Oe&&j(!1),fe(G())},he=(Oe,je)=>{je.source==="trigger"&&(Oe&&U!==void 0&&J(hl(U)),j(Oe),!Oe&&!u.filterDropdown&&p&&ce())},we=vt({[`${f}-menu-without-submenu`]:!M5(u.filters||[])}),Ce=Oe=>{if(Oe.target.checked){const je=Yo(u==null?void 0:u.filters).map(Ve=>String(Ve));J(je)}else J([])},ke=({filters:Oe})=>(Oe||[]).map((je,Ve)=>{const ft=String(je.value),tt={title:je.text,key:je.value!==void 0?ft:String(Ve)};return je.children&&(tt.children=ke({filters:je.children})),tt}),Se=Oe=>{var je;return Object.assign(Object.assign({},Oe),{text:Oe.title,value:Oe.key,children:((je=Oe.children)===null||je===void 0?void 0:je.map(Ve=>Se(Ve)))||[]})};let Te;const{direction:Ie,renderEmpty:We}=N.useContext(Ja);if(typeof u.filterDropdown=="function")Te=u.filterDropdown({prefixCls:`${f}-custom`,setSelectedKeys:Oe=>z({selectedKeys:Oe}),selectedKeys:G(),confirm:oe,clearFilters:se,filters:u.filters,visible:K,close:()=>{j(!1)}});else if(u.filterDropdown)Te=u.filterDropdown;else{const Oe=G()||[],je=()=>{var ft,tt;const nt=(ft=We==null?void 0:We("Table.filter"))!==null&&ft!==void 0?ft:N.createElement(ed,{image:ed.PRESENTED_IMAGE_SIMPLE,description:m.filterEmptyText,styles:{image:{height:24}},style:{margin:0,padding:"16px 0"}});if((u.filters||[]).length===0)return nt;if(g==="tree")return N.createElement(N.Fragment,null,N.createElement(Ad,{filterSearch:x,value:Fe,onChange:X,tablePrefixCls:i,locale:m}),N.createElement("div",{className:`${i}-filter-dropdown-tree`},v?N.createElement(Yi,{checked:Oe.length===Yo(u.filters).length,indeterminate:Oe.length>0&&Oe.length<Yo(u.filters).length,className:`${i}-filter-dropdown-checkall`,onChange:Ce},(tt=m==null?void 0:m.filterCheckall)!==null&&tt!==void 0?tt:m==null?void 0:m.filterCheckAll):null,N.createElement(du,{checkable:!0,selectable:!1,blockNode:!0,multiple:v,checkStrictly:!v,className:`${f}-menu`,onCheck:ie,checkedKeys:Oe,selectedKeys:Oe,showIcon:!1,treeData:ke({filters:u.filters}),autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:Fe.trim()?At=>typeof x=="function"?x(Fe,Se(At)):U1(Fe,At.title):void 0})));const Tt=X1({filters:u.filters||[],filterSearch:x,prefixCls:c,filteredKeys:G(),filterMultiple:v,searchValue:Fe}),bt=Tt.every(At=>At===null);return N.createElement(N.Fragment,null,N.createElement(Ad,{filterSearch:x,value:Fe,onChange:X,tablePrefixCls:i,locale:m}),bt?nt:N.createElement(f4,{selectable:!0,multiple:v,prefixCls:`${f}-menu`,className:we,onSelect:z,onDeselect:z,selectedKeys:Oe,getPopupContainer:S,openKeys:ge,onOpenChange:Ae,items:Tt}))},Ve=()=>$?ta((F||[]).map(ft=>String(ft)),Oe,!0):Oe.length===0;Te=N.createElement(N.Fragment,null,je(),N.createElement("div",{className:`${c}-dropdown-btns`},N.createElement(Qc,{type:"link",size:"small",disabled:Ve(),onClick:()=>se()},m.filterReset),N.createElement(Qc,{type:"primary",size:"small",onClick:ce},m.filterConfirm)))}u.filterDropdown&&(Te=N.createElement(h4,{selectable:void 0},Te)),Te=N.createElement($5,{className:`${c}-dropdown`},Te);const ot=d1({trigger:["click"],placement:Ie==="rtl"?"bottomLeft":"bottomRight",children:(()=>{let Oe;return typeof u.filterIcon=="function"?Oe=u.filterIcon(Y):u.filterIcon?Oe=u.filterIcon:Oe=N.createElement(j3,null),N.createElement("span",{role:"button",tabIndex:-1,className:vt(`${c}-trigger`,{active:Y}),onClick:je=>{je.stopPropagation()}},Oe)})(),getPopupContainer:S},Object.assign(Object.assign({},B),{rootClassName:vt(D,B.rootClassName),open:K,onOpenChange:he,popupRender:()=>typeof(B==null?void 0:B.dropdownRender)=="function"?B.dropdownRender(Te):Te}));return N.createElement("div",{className:`${c}-column`},N.createElement("span",{className:`${i}-column-title`},A),N.createElement(p1,Object.assign({},ot)))},g0=(e,t,r)=>{let n=[];return(e||[]).forEach((o,i)=>{var c;const u=ha(i,r),f=o.filterDropdown!==void 0;if(o.filters||f||"onFilter"in o)if("filteredValue"in o){let d=o.filteredValue;f||(d=(c=d==null?void 0:d.map(String))!==null&&c!==void 0?c:d),n.push({column:o,key:po(o,u),filteredKeys:d,forceFiltered:o.filtered})}else n.push({column:o,key:po(o,u),filteredKeys:t&&o.defaultFilteredValue?o.defaultFilteredValue:void 0,forceFiltered:o.filtered});"children"in o&&(n=[].concat(Xt(n),Xt(g0(o.children,t,u))))}),n};function G1(e,t,r,n,o,i,c,u,f){return r.map((d,p)=>{const v=ha(p,u),{filterOnClose:g=!0,filterMultiple:x=!0,filterMode:w,filterSearch:C}=d;let m=d;if(m.filters||m.filterDropdown){const A=po(m,v),S=n.find(({key:D})=>A===D);m=Object.assign(Object.assign({},m),{title:D=>N.createElement(R5,{tablePrefixCls:e,prefixCls:`${e}-filter`,dropdownPrefixCls:t,column:m,columnKey:A,filterState:S,filterOnClose:g,filterMultiple:x,filterMode:w,filterSearch:C,triggerFilter:i,locale:o,getPopupContainer:c,rootClassName:f},ms(d.title,D))})}return"children"in m&&(m=Object.assign(Object.assign({},m),{children:G1(e,t,m.children,n,o,i,c,v,f)})),m})}const Bd=e=>{const t={};return e.forEach(({key:r,filteredKeys:n,column:o})=>{const i=r,{filters:c,filterDropdown:u}=o;if(u)t[i]=n||null;else if(Array.isArray(n)){const f=Yo(c);t[i]=f.filter(d=>n.includes(String(d)))}else t[i]=null}),t},v0=(e,t,r)=>t.reduce((o,i)=>{const{column:{onFilter:c,filters:u},filteredKeys:f}=i;return c&&f&&f.length?o.map(d=>Object.assign({},d)).filter(d=>f.some(p=>{const v=Yo(u),g=v.findIndex(w=>String(w)===String(p)),x=g!==-1?v[g]:p;return d[r]&&(d[r]=v0(d[r],t,r)),c(x,d)})):o},e),Y1=e=>e.flatMap(t=>"children"in t?[t].concat(Xt(Y1(t.children||[]))):[t]),P5=e=>{const{prefixCls:t,dropdownPrefixCls:r,mergedColumns:n,onFilterChange:o,getPopupContainer:i,locale:c,rootClassName:u}=e;J0();const f=N.useMemo(()=>Y1(n||[]),[n]),[d,p]=N.useState(()=>g0(f,!0)),v=N.useMemo(()=>{const C=g0(f,!1);if(C.length===0)return C;let m=!0;if(C.forEach(({filteredKeys:A})=>{A!==void 0&&(m=!1)}),m){const A=(f||[]).map((S,D)=>po(S,ha(D)));return d.filter(({key:S})=>A.includes(S)).map(S=>{const D=f[A.indexOf(S.key)];return Object.assign(Object.assign({},S),{column:Object.assign(Object.assign({},S.column),D),forceFiltered:D.filtered})})}return C},[f,d]),g=N.useMemo(()=>Bd(v),[v]),x=C=>{const m=v.filter(({key:A})=>A!==C.key);m.push(C),p(m),o(Bd(m),m)};return[C=>G1(t,r,C,v,c,x,i,void 0,u),v,g]},z5=(e,t,r)=>{const n=N.useRef({});function o(i){var c;if(!n.current||n.current.data!==e||n.current.childrenColumnName!==t||n.current.getRowKey!==r){let f=function(d){d.forEach((p,v)=>{const g=r(p,v);u.set(g,p),p&&typeof p=="object"&&t in p&&f(p[t]||[])})};const u=new Map;f(e),n.current={data:e,childrenColumnName:t,kvMap:u,getRowKey:r}}return(c=n.current.kvMap)===null||c===void 0?void 0:c.get(i)}return[o]};var _5=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const Z1=10;function I5(e,t){const r={current:e.current,pageSize:e.pageSize};return Object.keys(t&&typeof t=="object"?t:{}).forEach(o=>{const i=e[o];typeof i!="function"&&(r[o]=i)}),r}function j5(e,t,r){const n=r&&typeof r=="object"?r:{},{total:o=0}=n,i=_5(n,["total"]),[c,u]=St(()=>({current:"defaultCurrent"in i?i.defaultCurrent:1,pageSize:"defaultPageSize"in i?i.defaultPageSize:Z1})),f=d1(c,i,{total:o>0?o:e}),d=Math.ceil((o||e)/f.pageSize);f.current>d&&(f.current=d||1);const p=(g,x)=>{u({current:g??1,pageSize:x||f.pageSize})},v=(g,x)=>{var w;r&&((w=r.onChange)===null||w===void 0||w.call(r,g,x)),p(g,x),t(g,x||(f==null?void 0:f.pageSize))};return r===!1?[{},()=>{}]:[Object.assign(Object.assign({},f),{onChange:v}),p]}var L5={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"outlined"},H5=function(t,r){return N.createElement(tn,Ft({},t,{ref:r,icon:L5}))},q5=N.forwardRef(H5),K5={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"}}]},name:"caret-up",theme:"outlined"},W5=function(t,r){return N.createElement(tn,Ft({},t,{ref:r,icon:K5}))},V5=N.forwardRef(W5);const $i="ascend",pl="descend",Ji=e=>typeof e.sorter=="object"&&typeof e.sorter.multiple=="number"?e.sorter.multiple:!1,Fd=e=>typeof e=="function"?e:e&&typeof e=="object"&&e.compare?e.compare:!1,U5=(e,t)=>t?e[e.indexOf(t)+1]:e[0],b0=(e,t,r)=>{let n=[];const o=(i,c)=>{n.push({column:i,key:po(i,c),multiplePriority:Ji(i),sortOrder:i.sortOrder})};return(e||[]).forEach((i,c)=>{const u=ha(c,r);i.children?("sortOrder"in i&&o(i,u),n=[].concat(Xt(n),Xt(b0(i.children,t,u)))):i.sorter&&("sortOrder"in i?o(i,u):t&&i.defaultSortOrder&&n.push({column:i,key:po(i,u),multiplePriority:Ji(i),sortOrder:i.defaultSortOrder}))}),n},J1=(e,t,r,n,o,i,c,u)=>(t||[]).map((d,p)=>{const v=ha(p,u);let g=d;if(g.sorter){const x=g.sortDirections||o,w=g.showSorterTooltip===void 0?c:g.showSorterTooltip,C=po(g,v),m=r.find(({key:T})=>T===C),A=m?m.sortOrder:null,S=U5(x,A);let D;if(d.sortIcon)D=d.sortIcon({sortOrder:A});else{const T=x.includes($i)&&N.createElement(V5,{className:vt(`${e}-column-sorter-up`,{active:A===$i})}),W=x.includes(pl)&&N.createElement(q5,{className:vt(`${e}-column-sorter-down`,{active:A===pl})});D=N.createElement("span",{className:vt(`${e}-column-sorter`,{[`${e}-column-sorter-full`]:!!(T&&W)})},N.createElement("span",{className:`${e}-column-sorter-inner`,"aria-hidden":"true"},T,W))}const{cancelSort:$,triggerAsc:F,triggerDesc:B}=i||{};let R=$;S===pl?R=B:S===$i&&(R=F);const I=typeof w=="object"?Object.assign({title:R},w):{title:R};g=Object.assign(Object.assign({},g),{className:vt(g.className,{[`${e}-column-sort`]:A}),title:T=>{const W=`${e}-column-sorters`,H=N.createElement("span",{className:`${e}-column-title`},ms(d.title,T)),Z=N.createElement("div",{className:W},H,D);return w?typeof w!="boolean"&&(w==null?void 0:w.target)==="sorter-icon"?N.createElement("div",{className:`${W} ${e}-column-sorters-tooltip-target-sorter`},H,N.createElement(n0,Object.assign({},I),D)):N.createElement(n0,Object.assign({},I),Z):Z},onHeaderCell:T=>{var W;const H=((W=d.onHeaderCell)===null||W===void 0?void 0:W.call(d,T))||{},Z=H.onClick,Y=H.onKeyDown;H.onClick=U=>{n({column:d,key:C,sortOrder:S,multiplePriority:Ji(d)}),Z==null||Z(U)},H.onKeyDown=U=>{U.keyCode===Dn.ENTER&&(n({column:d,key:C,sortOrder:S,multiplePriority:Ji(d)}),Y==null||Y(U))};const j=z3(d.title,{}),K=j==null?void 0:j.toString();return A&&(H["aria-sort"]=A==="ascend"?"ascending":"descending"),H["aria-label"]=K||"",H.className=vt(H.className,`${e}-column-has-sorters`),H.tabIndex=0,d.ellipsis&&(H.title=(j??"").toString()),H}})}return"children"in g&&(g=Object.assign(Object.assign({},g),{children:J1(e,g.children,r,n,o,i,c,v)})),g}),Nd=e=>{const{column:t,sortOrder:r}=e;return{column:t,order:r,field:t.dataIndex,columnKey:t.key}},Td=e=>{const t=e.filter(({sortOrder:r})=>r).map(Nd);if(t.length===0&&e.length){const r=e.length-1;return Object.assign(Object.assign({},Nd(e[r])),{column:void 0,order:void 0,field:void 0,columnKey:void 0})}return t.length<=1?t[0]||{}:t},y0=(e,t,r)=>{const n=t.slice().sort((c,u)=>u.multiplePriority-c.multiplePriority),o=e.slice(),i=n.filter(({column:{sorter:c},sortOrder:u})=>Fd(c)&&u);return i.length?o.sort((c,u)=>{for(let f=0;f<i.length;f+=1){const d=i[f],{column:{sorter:p},sortOrder:v}=d,g=Fd(p);if(g&&v){const x=g(c,u,v);if(x!==0)return v===$i?x:-x}}return 0}).map(c=>{const u=c[r];return u?Object.assign(Object.assign({},c),{[r]:y0(u,t,r)}):c}):o},X5=e=>{const{prefixCls:t,mergedColumns:r,sortDirections:n,tableLocale:o,showSorterTooltip:i,onSorterChange:c}=e,[u,f]=N.useState(()=>b0(r,!0)),d=(C,m)=>{const A=[];return C.forEach((S,D)=>{const $=ha(D,m);if(A.push(po(S,$)),Array.isArray(S.children)){const F=d(S.children,$);A.push.apply(A,Xt(F))}}),A},p=N.useMemo(()=>{let C=!0;const m=b0(r,!1);if(!m.length){const $=d(r);return u.filter(({key:F})=>$.includes(F))}const A=[];function S($){C?A.push($):A.push(Object.assign(Object.assign({},$),{sortOrder:null}))}let D=null;return m.forEach($=>{D===null?(S($),$.sortOrder&&($.multiplePriority===!1?C=!1:D=!0)):(D&&$.multiplePriority!==!1||(C=!1),S($))}),A},[r,u]),v=N.useMemo(()=>{var C,m;const A=p.map(({column:S,sortOrder:D})=>({column:S,order:D}));return{sortColumns:A,sortColumn:(C=A[0])===null||C===void 0?void 0:C.column,sortOrder:(m=A[0])===null||m===void 0?void 0:m.order}},[p]),g=C=>{let m;C.multiplePriority===!1||!p.length||p[0].multiplePriority===!1?m=[C]:m=[].concat(Xt(p.filter(({key:A})=>A!==C.key)),[C]),f(m),c(Td(m),m)};return[C=>J1(t,C,p,g,n,o,i),p,v,()=>Td(p)]},Q1=(e,t)=>e.map(n=>{const o=Object.assign({},n);return o.title=ms(n.title,t),"children"in o&&(o.children=Q1(o.children,t)),o}),G5=e=>[N.useCallback(r=>Q1(r,e),[e])],Y5=I1((e,t)=>{const{_renderTimes:r}=e,{_renderTimes:n}=t;return r!==n}),Z5=L1((e,t)=>{const{_renderTimes:r}=e,{_renderTimes:n}=t;return r!==n}),J5=e=>{const{componentCls:t,lineWidth:r,lineType:n,tableBorderColor:o,tableHeaderBg:i,tablePaddingVertical:c,tablePaddingHorizontal:u,calc:f}=e,d=`${pt(r)} ${n} ${o}`,p=(v,g,x)=>({[`&${t}-${v}`]:{[`> ${t}-container`]:{[`> ${t}-content, > ${t}-body`]:{"\n > table > tbody > tr > th,\n > table > tbody > tr > td\n ":{[`> ${t}-expanded-row-fixed`]:{margin:`${pt(f(g).mul(-1).equal())}
|
|
3
|
-
${pt(f(f(x).add(r)).mul(-1).equal())}`}}}}}});return{[`${t}-wrapper`]:{[`${t}${t}-bordered`]:Object.assign(Object.assign(Object.assign({[`> ${t}-title`]:{border:d,borderBottom:0},[`> ${t}-container`]:{borderInlineStart:d,borderTop:d,[`
|
|
4
|
-
> ${t}-content,
|
|
5
|
-
> ${t}-header,
|
|
6
|
-
> ${t}-body,
|
|
7
|
-
> ${t}-summary
|
|
8
|
-
`]:{"> table":{"\n > thead > tr > th,\n > thead > tr > td,\n > tbody > tr > th,\n > tbody > tr > td,\n > tfoot > tr > th,\n > tfoot > tr > td\n ":{borderInlineEnd:d},"> thead":{"> tr:not(:last-child) > th":{borderBottom:d},"> tr > th::before":{backgroundColor:"transparent !important"}},"\n > thead > tr,\n > tbody > tr,\n > tfoot > tr\n ":{[`> ${t}-cell-fix-right-first::after`]:{borderInlineEnd:d}},"\n > tbody > tr > th,\n > tbody > tr > td\n ":{[`> ${t}-expanded-row-fixed`]:{margin:`${pt(f(c).mul(-1).equal())} ${pt(f(f(u).add(r)).mul(-1).equal())}`,"&::after":{position:"absolute",top:0,insetInlineEnd:r,bottom:0,borderInlineEnd:d,content:'""'}}}}}},[`&${t}-scroll-horizontal`]:{[`> ${t}-container > ${t}-body`]:{"> table > tbody":{[`
|
|
9
|
-
> tr${t}-expanded-row,
|
|
10
|
-
> tr${t}-placeholder
|
|
11
|
-
`]:{"> th, > td":{borderInlineEnd:0}}}}}},p("middle",e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle)),p("small",e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall)),{[`> ${t}-footer`]:{border:d,borderTop:0}}),[`${t}-cell`]:{[`${t}-container:first-child`]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:`0 ${pt(r)} 0 ${pt(r)} ${i}`}},[`${t}-bordered ${t}-cell-scrollbar`]:{borderInlineEnd:d}}}},Q5=e=>{const{componentCls:t}=e;return{[`${t}-wrapper`]:{[`${t}-cell-ellipsis`]:Object.assign(Object.assign({},i1),{wordBreak:"keep-all",[`
|
|
12
|
-
&${t}-cell-fix-left-last,
|
|
13
|
-
&${t}-cell-fix-right-first
|
|
14
|
-
`]:{overflow:"visible",[`${t}-cell-content`]:{display:"block",overflow:"hidden",textOverflow:"ellipsis"}},[`${t}-column-title`]:{overflow:"hidden",textOverflow:"ellipsis",wordBreak:"keep-all"}})}}},ev=e=>{const{componentCls:t}=e;return{[`${t}-wrapper`]:{[`${t}-tbody > tr${t}-placeholder`]:{textAlign:"center",color:e.colorTextDisabled,"\n &:hover > th,\n &:hover > td,\n ":{background:e.colorBgContainer}}}}},tv=e=>{const{componentCls:t,antCls:r,motionDurationSlow:n,lineWidth:o,paddingXS:i,lineType:c,tableBorderColor:u,tableExpandIconBg:f,tableExpandColumnWidth:d,borderRadius:p,tablePaddingVertical:v,tablePaddingHorizontal:g,tableExpandedRowBg:x,paddingXXS:w,expandIconMarginTop:C,expandIconSize:m,expandIconHalfInner:A,expandIconScale:S,calc:D}=e,$=`${pt(o)} ${c} ${u}`,F=D(w).sub(o).equal();return{[`${t}-wrapper`]:{[`${t}-expand-icon-col`]:{width:d},[`${t}-row-expand-icon-cell`]:{textAlign:"center",[`${t}-row-expand-icon`]:{display:"inline-flex",float:"none",verticalAlign:"sub"}},[`${t}-row-indent`]:{height:1,float:"left"},[`${t}-row-expand-icon`]:Object.assign(Object.assign({},a4(e)),{position:"relative",float:"left",width:m,height:m,color:"inherit",lineHeight:pt(m),background:f,border:$,borderRadius:p,transform:`scale(${S})`,"&:focus, &:hover, &:active":{borderColor:"currentcolor"},"&::before, &::after":{position:"absolute",background:"currentcolor",transition:`transform ${n} ease-out`,content:'""'},"&::before":{top:A,insetInlineEnd:F,insetInlineStart:F,height:o},"&::after":{top:F,bottom:F,insetInlineStart:A,width:o,transform:"rotate(90deg)"},"&-collapsed::before":{transform:"rotate(-180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"},"&-spaced":{"&::before, &::after":{display:"none",content:"none"},background:"transparent",border:0,visibility:"hidden"}}),[`${t}-row-indent + ${t}-row-expand-icon`]:{marginTop:C,marginInlineEnd:i},[`tr${t}-expanded-row`]:{"&, &:hover":{"> th, > td":{background:x}},[`${r}-descriptions-view`]:{display:"flex",table:{flex:"auto",width:"100%"}}},[`${t}-expanded-row-fixed`]:{position:"relative",margin:`${pt(D(v).mul(-1).equal())} ${pt(D(g).mul(-1).equal())}`,padding:`${pt(v)} ${pt(g)}`}}}},rv=e=>{const{componentCls:t,antCls:r,iconCls:n,tableFilterDropdownWidth:o,tableFilterDropdownSearchWidth:i,paddingXXS:c,paddingXS:u,colorText:f,lineWidth:d,lineType:p,tableBorderColor:v,headerIconColor:g,fontSizeSM:x,tablePaddingHorizontal:w,borderRadius:C,motionDurationSlow:m,colorIcon:A,colorPrimary:S,tableHeaderFilterActiveBg:D,colorTextDisabled:$,tableFilterDropdownBg:F,tableFilterDropdownHeight:B,controlItemBgHover:R,controlItemBgActive:I,boxShadowSecondary:T,filterDropdownMenuBg:W,calc:H}=e,Z=`${r}-dropdown`,Y=`${t}-filter-dropdown`,j=`${r}-tree`,K=`${pt(d)} ${p} ${v}`;return[{[`${t}-wrapper`]:{[`${t}-filter-column`]:{display:"flex",justifyContent:"space-between"},[`${t}-filter-trigger`]:{position:"relative",display:"flex",alignItems:"center",marginBlock:H(c).mul(-1).equal(),marginInline:`${pt(c)} ${pt(H(w).div(2).mul(-1).equal())}`,padding:`0 ${pt(c)}`,color:g,fontSize:x,borderRadius:C,cursor:"pointer",transition:`all ${m}`,"&:hover":{color:A,background:D},"&.active":{color:S}}}},{[`${r}-dropdown`]:{[Y]:Object.assign(Object.assign({},Q0(e)),{minWidth:o,backgroundColor:F,borderRadius:C,boxShadow:T,overflow:"hidden",[`${Z}-menu`]:{maxHeight:B,overflowX:"hidden",border:0,boxShadow:"none",borderRadius:"unset",backgroundColor:W,"&:empty::after":{display:"block",padding:`${pt(u)} 0`,color:$,fontSize:x,textAlign:"center",content:'"Not Found"'}},[`${Y}-tree`]:{paddingBlock:`${pt(u)} 0`,paddingInline:u,[j]:{padding:0},[`${j}-treenode ${j}-node-content-wrapper:hover`]:{backgroundColor:R},[`${j}-treenode-checkbox-checked ${j}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:I}}},[`${Y}-search`]:{padding:u,borderBottom:K,"&-input":{input:{minWidth:i},[n]:{color:$}}},[`${Y}-checkall`]:{width:"100%",marginBottom:c,marginInlineStart:c},[`${Y}-btns`]:{display:"flex",justifyContent:"space-between",padding:`${pt(H(u).sub(d).equal())} ${pt(u)}`,overflow:"hidden",borderTop:K}})}},{[`${r}-dropdown ${Y}, ${Y}-submenu`]:{[`${r}-checkbox-wrapper + span`]:{paddingInlineStart:u,color:f},"> ul":{maxHeight:"calc(100vh - 130px)",overflowX:"hidden",overflowY:"auto"}}}]},nv=e=>{const{componentCls:t,lineWidth:r,colorSplit:n,motionDurationSlow:o,zIndexTableFixed:i,tableBg:c,zIndexTableSticky:u,calc:f}=e,d=n;return{[`${t}-wrapper`]:{[`
|
|
15
|
-
${t}-cell-fix-left,
|
|
16
|
-
${t}-cell-fix-right
|
|
17
|
-
`]:{position:"sticky !important",zIndex:i,background:c},[`
|
|
18
|
-
${t}-cell-fix-left-first::after,
|
|
19
|
-
${t}-cell-fix-left-last::after
|
|
20
|
-
`]:{position:"absolute",top:0,right:{_skip_check_:!0,value:0},bottom:f(r).mul(-1).equal(),width:30,transform:"translateX(100%)",transition:`box-shadow ${o}`,content:'""',pointerEvents:"none",willChange:"transform"},[`${t}-cell-fix-left-all::after`]:{display:"none"},[`
|
|
21
|
-
${t}-cell-fix-right-first::after,
|
|
22
|
-
${t}-cell-fix-right-last::after
|
|
23
|
-
`]:{position:"absolute",top:0,bottom:f(r).mul(-1).equal(),left:{_skip_check_:!0,value:0},width:30,transform:"translateX(-100%)",transition:`box-shadow ${o}`,content:'""',pointerEvents:"none"},[`${t}-container`]:{position:"relative","&::before, &::after":{position:"absolute",top:0,bottom:0,zIndex:f(u).add(1).equal({unit:!1}),width:30,transition:`box-shadow ${o}`,content:'""',pointerEvents:"none"},"&::before":{insetInlineStart:0},"&::after":{insetInlineEnd:0}},[`${t}-ping-left`]:{[`&:not(${t}-has-fix-left) ${t}-container::before`]:{boxShadow:`inset 10px 0 8px -8px ${d}`},[`
|
|
24
|
-
${t}-cell-fix-left-first::after,
|
|
25
|
-
${t}-cell-fix-left-last::after
|
|
26
|
-
`]:{boxShadow:`inset 10px 0 8px -8px ${d}`},[`${t}-cell-fix-left-last::before`]:{backgroundColor:"transparent !important"}},[`${t}-ping-right`]:{[`&:not(${t}-has-fix-right) ${t}-container::after`]:{boxShadow:`inset -10px 0 8px -8px ${d}`},[`
|
|
27
|
-
${t}-cell-fix-right-first::after,
|
|
28
|
-
${t}-cell-fix-right-last::after
|
|
29
|
-
`]:{boxShadow:`inset -10px 0 8px -8px ${d}`}},[`${t}-fixed-column-gapped`]:{[`
|
|
30
|
-
${t}-cell-fix-left-first::after,
|
|
31
|
-
${t}-cell-fix-left-last::after,
|
|
32
|
-
${t}-cell-fix-right-first::after,
|
|
33
|
-
${t}-cell-fix-right-last::after
|
|
34
|
-
`]:{boxShadow:"none"}}}}},ov=e=>{const{componentCls:t,antCls:r,margin:n}=e;return{[`${t}-wrapper ${t}-pagination${r}-pagination`]:{margin:`${pt(n)} 0`}}},av=e=>{const{componentCls:t,tableRadius:r}=e;return{[`${t}-wrapper`]:{[t]:{[`${t}-title, ${t}-header`]:{borderRadius:`${pt(r)} ${pt(r)} 0 0`},[`${t}-title + ${t}-container`]:{borderStartStartRadius:0,borderStartEndRadius:0,[`${t}-header, table`]:{borderRadius:0},"table > thead > tr:first-child":{"th:first-child, th:last-child, td:first-child, td:last-child":{borderRadius:0}}},"&-container":{borderStartStartRadius:r,borderStartEndRadius:r,"table > thead > tr:first-child":{"> *:first-child":{borderStartStartRadius:r},"> *:last-child":{borderStartEndRadius:r}}},"&-footer":{borderRadius:`0 0 ${pt(r)} ${pt(r)}`}}}}},iv=e=>{const{componentCls:t}=e;return{[`${t}-wrapper-rtl`]:{direction:"rtl",table:{direction:"rtl"},[`${t}-pagination-left`]:{justifyContent:"flex-end"},[`${t}-pagination-right`]:{justifyContent:"flex-start"},[`${t}-row-expand-icon`]:{float:"right","&::after":{transform:"rotate(-90deg)"},"&-collapsed::before":{transform:"rotate(180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"}},[`${t}-container`]:{"&::before":{insetInlineStart:"unset",insetInlineEnd:0},"&::after":{insetInlineStart:0,insetInlineEnd:"unset"},[`${t}-row-indent`]:{float:"right"}}}}},sv=e=>{const{componentCls:t,antCls:r,iconCls:n,fontSizeIcon:o,padding:i,paddingXS:c,headerIconColor:u,headerIconHoverColor:f,tableSelectionColumnWidth:d,tableSelectedRowBg:p,tableSelectedRowHoverBg:v,tableRowHoverBg:g,tablePaddingHorizontal:x,calc:w}=e;return{[`${t}-wrapper`]:{[`${t}-selection-col`]:{width:d,[`&${t}-selection-col-with-dropdown`]:{width:w(d).add(o).add(w(i).div(4)).equal()}},[`${t}-bordered ${t}-selection-col`]:{width:w(d).add(w(c).mul(2)).equal(),[`&${t}-selection-col-with-dropdown`]:{width:w(d).add(o).add(w(i).div(4)).add(w(c).mul(2)).equal()}},[`
|
|
35
|
-
table tr th${t}-selection-column,
|
|
36
|
-
table tr td${t}-selection-column,
|
|
37
|
-
${t}-selection-column
|
|
38
|
-
`]:{paddingInlineEnd:e.paddingXS,paddingInlineStart:e.paddingXS,textAlign:"center",[`${r}-radio-wrapper`]:{marginInlineEnd:0}},[`table tr th${t}-selection-column${t}-cell-fix-left`]:{zIndex:w(e.zIndexTableFixed).add(1).equal({unit:!1})},[`table tr th${t}-selection-column::after`]:{backgroundColor:"transparent !important"},[`${t}-selection`]:{position:"relative",display:"inline-flex",flexDirection:"column"},[`${t}-selection-extra`]:{position:"absolute",top:0,zIndex:1,cursor:"pointer",transition:`all ${e.motionDurationSlow}`,marginInlineStart:"100%",paddingInlineStart:pt(w(x).div(4).equal()),[n]:{color:u,fontSize:o,verticalAlign:"baseline","&:hover":{color:f}}},[`${t}-tbody`]:{[`${t}-row`]:{[`&${t}-row-selected`]:{[`> ${t}-cell`]:{background:p,"&-row-hover":{background:v}}},[`> ${t}-cell-row-hover`]:{background:g}}}}}},lv=e=>{const{componentCls:t,tableExpandColumnWidth:r,calc:n}=e,o=(i,c,u,f)=>({[`${t}${t}-${i}`]:{fontSize:f,[`
|
|
39
|
-
${t}-title,
|
|
40
|
-
${t}-footer,
|
|
41
|
-
${t}-cell,
|
|
42
|
-
${t}-thead > tr > th,
|
|
43
|
-
${t}-tbody > tr > th,
|
|
44
|
-
${t}-tbody > tr > td,
|
|
45
|
-
tfoot > tr > th,
|
|
46
|
-
tfoot > tr > td
|
|
47
|
-
`]:{padding:`${pt(c)} ${pt(u)}`},[`${t}-filter-trigger`]:{marginInlineEnd:pt(n(u).div(2).mul(-1).equal())},[`${t}-expanded-row-fixed`]:{margin:`${pt(n(c).mul(-1).equal())} ${pt(n(u).mul(-1).equal())}`},[`${t}-tbody`]:{[`${t}-wrapper:only-child ${t}`]:{marginBlock:pt(n(c).mul(-1).equal()),marginInline:`${pt(n(r).sub(u).equal())} ${pt(n(u).mul(-1).equal())}`}},[`${t}-selection-extra`]:{paddingInlineStart:pt(n(u).div(4).equal())}}});return{[`${t}-wrapper`]:Object.assign(Object.assign({},o("middle",e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle,e.tableFontSizeMiddle)),o("small",e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall,e.tableFontSizeSmall))}},uv=e=>{const{componentCls:t,marginXXS:r,fontSizeIcon:n,headerIconColor:o,headerIconHoverColor:i}=e;return{[`${t}-wrapper`]:{[`${t}-thead th${t}-column-has-sorters`]:{outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}, left 0s`,"&:hover":{background:e.tableHeaderSortHoverBg,"&::before":{backgroundColor:"transparent !important"}},"&:focus-visible":{color:e.colorPrimary},[`
|
|
48
|
-
&${t}-cell-fix-left:hover,
|
|
49
|
-
&${t}-cell-fix-right:hover
|
|
50
|
-
`]:{background:e.tableFixedHeaderSortActiveBg}},[`${t}-thead th${t}-column-sort`]:{background:e.tableHeaderSortBg,"&::before":{backgroundColor:"transparent !important"}},[`td${t}-column-sort`]:{background:e.tableBodySortBg},[`${t}-column-title`]:{position:"relative",zIndex:1,flex:1,minWidth:0},[`${t}-column-sorters`]:{display:"flex",flex:"auto",alignItems:"center",justifyContent:"space-between","&::after":{position:"absolute",inset:0,width:"100%",height:"100%",content:'""'}},[`${t}-column-sorters-tooltip-target-sorter`]:{"&::after":{content:"none"}},[`${t}-column-sorter`]:{marginInlineStart:r,color:o,fontSize:0,transition:`color ${e.motionDurationSlow}`,"&-inner":{display:"inline-flex",flexDirection:"column",alignItems:"center"},"&-up, &-down":{fontSize:n,"&.active":{color:e.colorPrimary}},[`${t}-column-sorter-up + ${t}-column-sorter-down`]:{marginTop:"-0.3em"}},[`${t}-column-sorters:hover ${t}-column-sorter`]:{color:i}}}},cv=e=>{const{componentCls:t,opacityLoading:r,tableScrollThumbBg:n,tableScrollThumbBgHover:o,tableScrollThumbSize:i,tableScrollBg:c,zIndexTableSticky:u,stickyScrollBarBorderRadius:f,lineWidth:d,lineType:p,tableBorderColor:v}=e,g=`${pt(d)} ${p} ${v}`;return{[`${t}-wrapper`]:{[`${t}-sticky`]:{"&-holder":{position:"sticky",zIndex:u,background:e.colorBgContainer},"&-scroll":{position:"sticky",bottom:0,height:`${pt(i)} !important`,zIndex:u,display:"flex",alignItems:"center",background:c,borderTop:g,opacity:r,"&:hover":{transformOrigin:"center bottom"},"&-bar":{height:i,backgroundColor:n,borderRadius:f,transition:`all ${e.motionDurationSlow}, transform 0s`,position:"absolute",bottom:0,"&:hover, &-active":{backgroundColor:o}}}}}}},Od=e=>{const{componentCls:t,lineWidth:r,tableBorderColor:n,calc:o}=e,i=`${pt(r)} ${e.lineType} ${n}`;return{[`${t}-wrapper`]:{[`${t}-summary`]:{position:"relative",zIndex:e.zIndexTableFixed,background:e.tableBg,"> tr":{"> th, > td":{borderBottom:i}}},[`div${t}-summary`]:{boxShadow:`0 ${pt(o(r).mul(-1).equal())} 0 ${n}`}}}},dv=e=>{const{componentCls:t,motionDurationMid:r,lineWidth:n,lineType:o,tableBorderColor:i,calc:c}=e,u=`${pt(n)} ${o} ${i}`,f=`${t}-expanded-row-cell`;return{[`${t}-wrapper`]:{[`${t}-tbody-virtual`]:{[`${t}-tbody-virtual-holder-inner`]:{[`
|
|
51
|
-
& > ${t}-row,
|
|
52
|
-
& > div:not(${t}-row) > ${t}-row
|
|
53
|
-
`]:{display:"flex",boxSizing:"border-box",width:"100%"}},[`${t}-cell`]:{borderBottom:u,transition:`background ${r}`},[`${t}-expanded-row`]:{[`${f}${f}-fixed`]:{position:"sticky",insetInlineStart:0,overflow:"hidden",width:`calc(var(--virtual-width) - ${pt(n)})`,borderInlineEnd:"none"}}},[`${t}-bordered`]:{[`${t}-tbody-virtual`]:{"&:after":{content:'""',insetInline:0,bottom:0,borderBottom:u,position:"absolute"},[`${t}-cell`]:{borderInlineEnd:u,[`&${t}-cell-fix-right-first:before`]:{content:'""',position:"absolute",insetBlock:0,insetInlineStart:c(n).mul(-1).equal(),borderInlineStart:u}}},[`&${t}-virtual`]:{[`${t}-placeholder ${t}-cell`]:{borderInlineEnd:u,borderBottom:u}}}}}},fv=e=>{const{componentCls:t,fontWeightStrong:r,tablePaddingVertical:n,tablePaddingHorizontal:o,tableExpandColumnWidth:i,lineWidth:c,lineType:u,tableBorderColor:f,tableFontSize:d,tableBg:p,tableRadius:v,tableHeaderTextColor:g,motionDurationMid:x,tableHeaderBg:w,tableHeaderCellSplitColor:C,tableFooterTextColor:m,tableFooterBg:A,calc:S}=e,D=`${pt(c)} ${u} ${f}`;return{[`${t}-wrapper`]:Object.assign(Object.assign({clear:"both",maxWidth:"100%","--rc-virtual-list-scrollbar-bg":e.tableScrollBg},i4()),{[t]:Object.assign(Object.assign({},Q0(e)),{fontSize:d,background:p,borderRadius:`${pt(v)} ${pt(v)} 0 0`,scrollbarColor:`${e.tableScrollThumbBg} ${e.tableScrollBg}`}),table:{width:"100%",textAlign:"start",borderRadius:`${pt(v)} ${pt(v)} 0 0`,borderCollapse:"separate",borderSpacing:0},[`
|
|
54
|
-
${t}-cell,
|
|
55
|
-
${t}-thead > tr > th,
|
|
56
|
-
${t}-tbody > tr > th,
|
|
57
|
-
${t}-tbody > tr > td,
|
|
58
|
-
tfoot > tr > th,
|
|
59
|
-
tfoot > tr > td
|
|
60
|
-
`]:{position:"relative",padding:`${pt(n)} ${pt(o)}`,overflowWrap:"break-word"},[`${t}-title`]:{padding:`${pt(n)} ${pt(o)}`},[`${t}-thead`]:{"\n > tr > th,\n > tr > td\n ":{position:"relative",color:g,fontWeight:r,textAlign:"start",background:w,borderBottom:D,transition:`background ${x} ease`,"&[colspan]:not([colspan='1'])":{textAlign:"center"},[`&:not(:last-child):not(${t}-selection-column):not(${t}-row-expand-icon-cell):not([colspan])::before`]:{position:"absolute",top:"50%",insetInlineEnd:0,width:1,height:"1.6em",backgroundColor:C,transform:"translateY(-50%)",transition:`background-color ${x}`,content:'""'}},"> tr:not(:last-child) > th[colspan]":{borderBottom:0}},[`${t}-tbody`]:{"> tr":{"> th, > td":{transition:`background ${x}, border-color ${x}`,borderBottom:D,[`
|
|
61
|
-
> ${t}-wrapper:only-child,
|
|
62
|
-
> ${t}-expanded-row-fixed > ${t}-wrapper:only-child
|
|
63
|
-
`]:{[t]:{marginBlock:pt(S(n).mul(-1).equal()),marginInline:`${pt(S(i).sub(o).equal())}
|
|
64
|
-
${pt(S(o).mul(-1).equal())}`,[`${t}-tbody > tr:last-child > td`]:{borderBottomWidth:0,"&:first-child, &:last-child":{borderRadius:0}}}}},"> th":{position:"relative",color:g,fontWeight:r,textAlign:"start",background:w,borderBottom:D,transition:`background ${x} ease`},[`& > ${t}-measure-cell`]:{paddingBlock:"0 !important",borderBlock:"0 !important",[`${t}-measure-cell-content`]:{height:0,overflow:"hidden",pointerEvents:"none"}}}},[`${t}-footer`]:{padding:`${pt(n)} ${pt(o)}`,color:m,background:A}})}},hv=e=>{const{colorFillAlter:t,colorBgContainer:r,colorTextHeading:n,colorFillSecondary:o,colorFillContent:i,controlItemBgActive:c,controlItemBgActiveHover:u,padding:f,paddingSM:d,paddingXS:p,colorBorderSecondary:v,borderRadiusLG:g,controlHeight:x,colorTextPlaceholder:w,fontSize:C,fontSizeSM:m,lineHeight:A,lineWidth:S,colorIcon:D,colorIconHover:$,opacityLoading:F,controlInteractiveSize:B}=e,R=new gn(o).onBackground(r).toHexString(),I=new gn(i).onBackground(r).toHexString(),T=new gn(t).onBackground(r).toHexString(),W=new gn(D),H=new gn($),Z=B/2-S,Y=Z*2+S*3;return{headerBg:T,headerColor:n,headerSortActiveBg:R,headerSortHoverBg:I,bodySortBg:T,rowHoverBg:T,rowSelectedBg:c,rowSelectedHoverBg:u,rowExpandedBg:t,cellPaddingBlock:f,cellPaddingInline:f,cellPaddingBlockMD:d,cellPaddingInlineMD:p,cellPaddingBlockSM:p,cellPaddingInlineSM:p,borderColor:v,headerBorderRadius:g,footerBg:T,footerColor:n,cellFontSize:C,cellFontSizeMD:C,cellFontSizeSM:C,headerSplitColor:v,fixedHeaderSortActiveBg:R,headerFilterHoverBg:i,filterDropdownMenuBg:r,filterDropdownBg:r,expandIconBg:r,selectionColumnWidth:x,stickyScrollBarBg:w,stickyScrollBarBorderRadius:100,expandIconMarginTop:(C*A-S*3)/2-Math.ceil((m*1.4-S*3)/2),headerIconColor:W.clone().setA(W.a*F).toRgbString(),headerIconHoverColor:H.clone().setA(H.a*F).toRgbString(),expandIconHalfInner:Z,expandIconSize:Y,expandIconScale:B/Y}},$d=2,pv=U0("Table",e=>{const{colorTextHeading:t,colorSplit:r,colorBgContainer:n,controlInteractiveSize:o,headerBg:i,headerColor:c,headerSortActiveBg:u,headerSortHoverBg:f,bodySortBg:d,rowHoverBg:p,rowSelectedBg:v,rowSelectedHoverBg:g,rowExpandedBg:x,cellPaddingBlock:w,cellPaddingInline:C,cellPaddingBlockMD:m,cellPaddingInlineMD:A,cellPaddingBlockSM:S,cellPaddingInlineSM:D,borderColor:$,footerBg:F,footerColor:B,headerBorderRadius:R,cellFontSize:I,cellFontSizeMD:T,cellFontSizeSM:W,headerSplitColor:H,fixedHeaderSortActiveBg:Z,headerFilterHoverBg:Y,filterDropdownBg:j,expandIconBg:K,selectionColumnWidth:U,stickyScrollBarBg:G,calc:J}=e,z=Ui(e,{tableFontSize:I,tableBg:n,tableRadius:R,tablePaddingVertical:w,tablePaddingHorizontal:C,tablePaddingVerticalMiddle:m,tablePaddingHorizontalMiddle:A,tablePaddingVerticalSmall:S,tablePaddingHorizontalSmall:D,tableBorderColor:$,tableHeaderTextColor:c,tableHeaderBg:i,tableFooterTextColor:B,tableFooterBg:F,tableHeaderCellSplitColor:H,tableHeaderSortBg:u,tableHeaderSortHoverBg:f,tableBodySortBg:d,tableFixedHeaderSortActiveBg:Z,tableHeaderFilterActiveBg:Y,tableFilterDropdownBg:j,tableRowHoverBg:p,tableSelectedRowBg:v,tableSelectedRowHoverBg:g,zIndexTableFixed:$d,zIndexTableSticky:J($d).add(1).equal({unit:!1}),tableFontSizeMiddle:T,tableFontSizeSmall:W,tableSelectionColumnWidth:U,tableExpandIconBg:K,tableExpandColumnWidth:J(o).add(J(e.padding).mul(2)).equal(),tableExpandedRowBg:x,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:G,tableScrollThumbBgHover:t,tableScrollBg:r});return[fv(z),ov(z),Od(z),uv(z),rv(z),J5(z),av(z),tv(z),Od(z),ev(z),sv(z),nv(z),cv(z),Q5(z),lv(z),iv(z),dv(z)]},hv,{unitless:{expandIconScale:!0}}),Md=[],mv=(e,t)=>{var r,n;const{prefixCls:o,className:i,rootClassName:c,style:u,size:f,bordered:d,dropdownPrefixCls:p,dataSource:v,pagination:g,rowSelection:x,rowKey:w="key",rowClassName:C,columns:m,children:A,childrenColumnName:S,onChange:D,getPopupContainer:$,loading:F,expandIcon:B,expandable:R,expandedRowRender:I,expandIconColumnIndex:T,indentSize:W,scroll:H,sortDirections:Z,locale:Y,showSorterTooltip:j={target:"full-header"},virtual:K}=e;J0();const U=N.useMemo(()=>m||au(A),[m,A]),G=N.useMemo(()=>U.some(gt=>gt.responsive),[U]),J=s4(G),z=N.useMemo(()=>{const gt=new Set(Object.keys(J).filter(xt=>J[xt]));return U.filter(xt=>!xt.responsive||xt.responsive.some(Re=>gt.has(Re)))},[U,J]),ie=n1(e,["className","style","columns"]),{locale:ge=l4,direction:xe,table:Ae,renderEmpty:Fe,getPrefixCls:be,getPopupContainer:X}=N.useContext(Ja),fe=u4(f),ce=Object.assign(Object.assign({},ge.Table),Y),se=v||Md,oe=be("table",o),he=be("dropdown",p),[,we]=c1(),Ce=X0(oe),[ke,Se,Te]=pv(oe,Ce),Ie=Object.assign(Object.assign({childrenColumnName:S,expandIconColumnIndex:T},R),{expandIcon:(r=R==null?void 0:R.expandIcon)!==null&&r!==void 0?r:(n=Ae==null?void 0:Ae.expandable)===null||n===void 0?void 0:n.expandIcon}),{childrenColumnName:We="children"}=Ie,ut=N.useMemo(()=>se.some(gt=>gt==null?void 0:gt[We])?"nest":I||R!=null&&R.expandedRowRender?"row":null,[se]),ot={body:N.useRef(null)},Oe=P3(oe),je=N.useRef(null),Ve=N.useRef(null);y4(t,()=>Object.assign(Object.assign({},Ve.current),{nativeElement:je.current}));const ft=N.useMemo(()=>typeof w=="function"?w:gt=>gt==null?void 0:gt[w],[w]),[tt]=z5(se,We,ft),nt={},Tt=(gt,xt,Re=!1)=>{var $t,sr,Nr,ee;const yr=Object.assign(Object.assign({},nt),gt);Re&&(($t=nt.resetPagination)===null||$t===void 0||$t.call(nt),!((sr=yr.pagination)===null||sr===void 0)&&sr.current&&(yr.pagination.current=1),g&&((Nr=g.onChange)===null||Nr===void 0||Nr.call(g,1,(ee=yr.pagination)===null||ee===void 0?void 0:ee.pageSize))),H&&H.scrollToFirstRowOnChange!==!1&&ot.body.current&&g4(0,{getContainer:()=>ot.body.current}),D==null||D(yr.pagination,yr.filters,yr.sorter,{currentDataSource:v0(y0(se,yr.sorterStates,We),yr.filterStates,We),action:xt})},bt=(gt,xt)=>{Tt({sorter:gt,sorterStates:xt},"sort",!1)},[At,yt,Me,ue]=X5({prefixCls:oe,mergedColumns:z,onSorterChange:bt,sortDirections:Z||["ascend","descend"],tableLocale:ce,showSorterTooltip:j}),mt=N.useMemo(()=>y0(se,yt,We),[se,yt]);nt.sorter=ue(),nt.sorterStates=yt;const zt=(gt,xt)=>{Tt({filters:gt,filterStates:xt},"filter",!0)},[Wt,Ot,ir]=P5({prefixCls:oe,locale:ce,dropdownPrefixCls:he,mergedColumns:z,onFilterChange:zt,getPopupContainer:$||X,rootClassName:vt(c,Ce)}),Ct=v0(mt,Ot,We);nt.filters=ir,nt.filterStates=Ot;const _t=N.useMemo(()=>{const gt={};return Object.keys(ir).forEach(xt=>{ir[xt]!==null&&(gt[xt]=ir[xt])}),Object.assign(Object.assign({},Me),{filters:gt})},[Me,ir]),[Gt]=G5(_t),pr=(gt,xt)=>{Tt({pagination:Object.assign(Object.assign({},nt.pagination),{current:gt,pageSize:xt})},"paginate")},[Dt,Fr]=j5(Ct.length,pr,g);nt.pagination=g===!1?{}:I5(Dt,g),nt.resetPagination=Fr;const br=N.useMemo(()=>{if(g===!1||!Dt.pageSize)return Ct;const{current:gt=1,total:xt,pageSize:Re=Z1}=Dt;return Ct.length<xt?Ct.length>Re?Ct.slice((gt-1)*Re,gt*Re):Ct:Ct.slice((gt-1)*Re,gt*Re)},[!!g,Ct,Dt==null?void 0:Dt.current,Dt==null?void 0:Dt.pageSize,Dt==null?void 0:Dt.total]),[or,tr]=M3({prefixCls:oe,data:Ct,pageData:br,getRowKey:ft,getRecordByKey:tt,expandType:ut,childrenColumnName:We,locale:ce,getPopupContainer:$||X},x),mr=(gt,xt,Re)=>{let $t;return typeof C=="function"?$t=vt(C(gt,xt,Re)):$t=vt(C),vt({[`${oe}-row-selected`]:tr.has(ft(gt,xt))},$t)};Ie.__PARENT_RENDER_ICON__=Ie.expandIcon,Ie.expandIcon=Ie.expandIcon||B||R3(ce),ut==="nest"&&Ie.expandIconColumnIndex===void 0?Ie.expandIconColumnIndex=x?1:0:Ie.expandIconColumnIndex>0&&x&&(Ie.expandIconColumnIndex-=1),typeof Ie.indentSize!="number"&&(Ie.indentSize=typeof W=="number"?W:15);const Ir=N.useCallback(gt=>Gt(or(Wt(At(gt)))),[At,Wt,or]),Mr=()=>{if(g===!1||!(Dt!=null&&Dt.total))return{};const gt=()=>Dt.size||(fe==="small"||fe==="middle"?"small":void 0),xt=Be=>{const Pe=Be==="left"?"start":Be==="right"?"end":Be;return N.createElement(h1,Object.assign({},Dt,{align:Dt.align||Pe,className:vt(`${oe}-pagination`,Dt.className),size:gt()}))},Re=xe==="rtl"?"left":"right",$t=Dt.position;if($t===null||!Array.isArray($t))return{bottom:xt(Re)};const sr=$t.find(Be=>typeof Be=="string"&&Be.toLowerCase().includes("top")),Nr=$t.find(Be=>typeof Be=="string"&&Be.toLowerCase().includes("bottom")),ee=$t.every(Be=>`${Be}`=="none"),yr=sr?sr.toLowerCase().replace("top",""):"",ne=Nr?Nr.toLowerCase().replace("bottom",""):"",Jn=!sr&&!Nr&&!ee,_n=()=>yr?xt(yr):void 0,ae=()=>{if(ne)return xt(ne);if(Jn)return xt(Re)};return{top:_n(),bottom:ae()}},cr=N.useMemo(()=>typeof F=="boolean"?{spinning:F}:typeof F=="object"&&F!==null?Object.assign({spinning:!0},F):void 0,[F]),Vt=vt(Te,Ce,`${oe}-wrapper`,Ae==null?void 0:Ae.className,{[`${oe}-wrapper-rtl`]:xe==="rtl"},i,c,Se),y=Object.assign(Object.assign({},Ae==null?void 0:Ae.style),u),k=N.useMemo(()=>cr!=null&&cr.spinning&&se===Md?null:typeof(Y==null?void 0:Y.emptyText)<"u"?Y.emptyText:(Fe==null?void 0:Fe("Table"))||N.createElement(c4,{componentName:"Table"}),[cr==null?void 0:cr.spinning,se,Y==null?void 0:Y.emptyText,Fe]),ze=K?Z5:Y5,M={},Q=N.useMemo(()=>{const{fontSize:gt,lineHeight:xt,lineWidth:Re,padding:$t,paddingXS:sr,paddingSM:Nr}=we,ee=Math.floor(gt*xt);switch(fe){case"middle":return Nr*2+ee+Re;case"small":return sr*2+ee+Re;default:return $t*2+ee+Re}},[we,fe]);K&&(M.listItemHeight=Q);const{top:Yt,bottom:at}=Mr();return ke(N.createElement("div",{ref:je,className:Vt,style:y},N.createElement(f1,Object.assign({spinning:!1},cr),Yt,N.createElement(ze,Object.assign({},M,ie,{ref:Ve,columns:z,direction:xe,expandable:Ie,prefixCls:oe,className:vt({[`${oe}-middle`]:fe==="middle",[`${oe}-small`]:fe==="small",[`${oe}-bordered`]:d,[`${oe}-empty`]:se.length===0},Te,Ce,Se),data:br,rowKey:ft,rowClassName:mr,emptyText:k,internalHooks:ti,internalRefs:ot,transformColumns:Ir,getContainerWidth:Oe,measureRowRender:gt=>N.createElement(d4,{getPopupContainer:xt=>xt},gt)})),at)))},gv=N.forwardRef(mv),vv=(e,t)=>{const r=N.useRef(0);return r.current+=1,N.createElement(gv,Object.assign({},e,{ref:t,_renderTimes:r.current}))},Zn=N.forwardRef(vv);Zn.SELECTION_COLUMN=no;Zn.EXPAND_COLUMN=ao;Zn.SELECTION_ALL=f0;Zn.SELECTION_INVERT=h0;Zn.SELECTION_NONE=p0;Zn.Column=k3;Zn.ColumnGroup=E3;Zn.Summary=F1;const bv="modulepreload",yv=function(e,t){return new URL(e,t).href},Rd={},fr=function(t,r,n){let o=Promise.resolve();if(r&&r.length>0){let c=function(p){return Promise.all(p.map(v=>Promise.resolve(v).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};const u=document.getElementsByTagName("link"),f=document.querySelector("meta[property=csp-nonce]"),d=(f==null?void 0:f.nonce)||(f==null?void 0:f.getAttribute("nonce"));o=c(r.map(p=>{if(p=yv(p,n),p in Rd)return;Rd[p]=!0;const v=p.endsWith(".css"),g=v?'[rel="stylesheet"]':"";if(!!n)for(let C=u.length-1;C>=0;C--){const m=u[C];if(m.href===p&&(!v||m.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${p}"]${g}`))return;const w=document.createElement("link");if(w.rel=v?"stylesheet":bv,v||(w.as="script"),w.crossOrigin="",w.href=p,d&&w.setAttribute("nonce",d),document.head.appendChild(w),v)return new Promise((C,m)=>{w.addEventListener("load",C),w.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${p}`)))})}))}function i(c){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=c,window.dispatchEvent(u),!u.defaultPrevented)throw c}return o.then(c=>{for(const u of c||[])u.status==="rejected"&&i(u.reason);return t().catch(i)})};var dn={},xv=Object.defineProperty,wv=(e,t,r)=>t in e?xv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,vr=(e,t,r)=>wv(e,typeof t!="symbol"?t+"":t,r),Ko=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ri(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Pd={exports:{}},Ca={};/**
|
|
65
|
-
* @license React
|
|
66
|
-
* react-jsx-runtime.production.min.js
|
|
67
|
-
*
|
|
68
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
69
|
-
*
|
|
70
|
-
* This source code is licensed under the MIT license found in the
|
|
71
|
-
* LICENSE file in the root directory of this source tree.
|
|
72
|
-
*/var zd;function Cv(){if(zd)return Ca;zd=1;var e=He,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function c(u,f,d){var p,v={},g=null,x=null;d!==void 0&&(g=""+d),f.key!==void 0&&(g=""+f.key),f.ref!==void 0&&(x=f.ref);for(p in f)n.call(f,p)&&!i.hasOwnProperty(p)&&(v[p]=f[p]);if(u&&u.defaultProps)for(p in f=u.defaultProps,f)v[p]===void 0&&(v[p]=f[p]);return{$$typeof:t,type:u,key:g,ref:x,props:v,_owner:o.current}}return Ca.Fragment=r,Ca.jsx=c,Ca.jsxs=c,Ca}var _d;function Dv(){return _d||(_d=1,Pd.exports=Cv()),Pd.exports}var q=Dv();/*!
|
|
73
|
-
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
|
74
|
-
*
|
|
75
|
-
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
76
|
-
* Released under the MIT License.
|
|
77
|
-
*/function Id(e){return Object.prototype.toString.call(e)==="[object Object]"}function Ur(e){var t,r;return Id(e)===!1?!1:(t=e.constructor,t===void 0?!0:(r=t.prototype,!(Id(r)===!1||r.hasOwnProperty("isPrototypeOf")===!1)))}var ep=Symbol.for("immer-nothing"),jd=Symbol.for("immer-draftable"),fn=Symbol.for("immer-state");function kn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ia=Object.getPrototypeOf;function To(e){return!!e&&!!e[fn]}function Oo(e){var t;return e?tp(e)||Array.isArray(e)||!!e[jd]||!!((t=e.constructor)!=null&&t[jd])||ni(e)||vs(e):!1}var kv=Object.prototype.constructor.toString(),Ld=new WeakMap;function tp(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(r===Object)return!0;if(typeof r!="function")return!1;let n=Ld.get(r);return n===void 0&&(n=Function.toString.call(r),Ld.set(r,n)),n===kv}function Qi(e,t,r=!0){gs(e)===0?(r?Reflect.ownKeys(e):Object.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,o)=>t(o,n,e))}function gs(e){const t=e[fn];return t?t.type_:Array.isArray(e)?1:ni(e)?2:vs(e)?3:0}function x0(e,t){return gs(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function rp(e,t,r){const n=gs(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function Ev(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function ni(e){return e instanceof Map}function vs(e){return e instanceof Set}function xo(e){return e.copy_||e.base_}function w0(e,t){if(ni(e))return new Map(e);if(vs(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=tp(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[fn];let o=Reflect.ownKeys(n);for(let i=0;i<o.length;i++){const c=o[i],u=n[c];u.writable===!1&&(u.writable=!0,u.configurable=!0),(u.get||u.set)&&(n[c]={configurable:!0,writable:!0,enumerable:u.enumerable,value:e[c]})}return Object.create(Ia(e),n)}else{const n=Ia(e);if(n!==null&&r)return{...e};const o=Object.create(n);return Object.assign(o,e)}}function fu(e,t=!1){return bs(e)||To(e)||!Oo(e)||(gs(e)>1&&Object.defineProperties(e,{set:xi,add:xi,clear:xi,delete:xi}),Object.freeze(e),t&&Object.values(e).forEach(r=>fu(r,!0))),e}function Sv(){kn(2)}var xi={value:Sv};function bs(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var Av={};function $o(e){const t=Av[e];return t||kn(0,e),t}var ja;function np(){return ja}function Bv(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Hd(e,t){t&&($o("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function C0(e){D0(e),e.drafts_.forEach(Fv),e.drafts_=null}function D0(e){e===ja&&(ja=e.parent_)}function qd(e){return ja=Bv(ja,e)}function Fv(e){const t=e[fn];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Kd(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[fn].modified_&&(C0(t),kn(4)),Oo(e)&&(e=es(t,e),t.parent_||ts(t,e)),t.patches_&&$o("Patches").generateReplacementPatches_(r[fn].base_,e,t.patches_,t.inversePatches_)):e=es(t,r,[]),C0(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==ep?e:void 0}function es(e,t,r){if(bs(t))return t;const n=e.immer_.shouldUseStrictIteration(),o=t[fn];if(!o)return Qi(t,(i,c)=>Wd(e,o,t,i,c,r),n),t;if(o.scope_!==e)return t;if(!o.modified_)return ts(e,o.base_,!0),o.base_;if(!o.finalized_){o.finalized_=!0,o.scope_.unfinalizedDrafts_--;const i=o.copy_;let c=i,u=!1;o.type_===3&&(c=new Set(i),i.clear(),u=!0),Qi(c,(f,d)=>Wd(e,o,i,f,d,r,u),n),ts(e,i,!1),r&&e.patches_&&$o("Patches").generatePatches_(o,r,e.patches_,e.inversePatches_)}return o.copy_}function Wd(e,t,r,n,o,i,c){if(o==null||typeof o!="object"&&!c)return;const u=bs(o);if(!(u&&!c)){if(To(o)){const f=i&&t&&t.type_!==3&&!x0(t.assigned_,n)?i.concat(n):void 0,d=es(e,o,f);if(rp(r,n,d),To(d))e.canAutoFreeze_=!1;else return}else c&&r.add(o);if(Oo(o)&&!u){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[n]===o&&u)return;es(e,o),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(ni(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&ts(e,o)}}}function ts(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&fu(t,r)}function Nv(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:np(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=n,i=hu;r&&(o=[n],i=La);const{revoke:c,proxy:u}=Proxy.revocable(o,i);return n.draft_=u,n.revoke_=c,u}var hu={get(e,t){if(t===fn)return e;const r=xo(e);if(!x0(r,t))return Tv(e,r,t);const n=r[t];return e.finalized_||!Oo(n)?n:n===ml(e.base_,t)?(gl(e),e.copy_[t]=E0(n,e)):n},has(e,t){return t in xo(e)},ownKeys(e){return Reflect.ownKeys(xo(e))},set(e,t,r){const n=op(xo(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const o=ml(xo(e),t),i=o==null?void 0:o[fn];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(Ev(r,o)&&(r!==void 0||x0(e.base_,t)))return!0;gl(e),k0(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return ml(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,gl(e),k0(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=xo(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){kn(11)},getPrototypeOf(e){return Ia(e.base_)},setPrototypeOf(){kn(12)}},La={};Qi(hu,(e,t)=>{La[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});La.deleteProperty=function(e,t){return La.set.call(this,e,t,void 0)};La.set=function(e,t,r){return hu.set.call(this,e[0],t,r,e[0])};function ml(e,t){const r=e[fn];return(r?xo(r):e)[t]}function Tv(e,t,r){var o;const n=op(t,r);return n?"value"in n?n.value:(o=n.get)==null?void 0:o.call(e.draft_):void 0}function op(e,t){if(!(t in e))return;let r=Ia(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Ia(r)}}function k0(e){e.modified_||(e.modified_=!0,e.parent_&&k0(e.parent_))}function gl(e){e.copy_||(e.copy_=w0(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Ov=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){const i=r;r=t;const c=this;return function(u=i,...f){return c.produce(u,d=>r.call(this,d,...f))}}typeof r!="function"&&kn(6),n!==void 0&&typeof n!="function"&&kn(7);let o;if(Oo(t)){const i=qd(this),c=E0(t,void 0);let u=!0;try{o=r(c),u=!1}finally{u?C0(i):D0(i)}return Hd(i,n),Kd(o,i)}else if(!t||typeof t!="object"){if(o=r(t),o===void 0&&(o=t),o===ep&&(o=void 0),this.autoFreeze_&&fu(o,!0),n){const i=[],c=[];$o("Patches").generateReplacementPatches_(t,o,i,c),n(i,c)}return o}else kn(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(i,...c)=>this.produceWithPatches(i,u=>t(u,...c));let n,o;return[this.produce(t,r,(i,c)=>{n=i,o=c}),n,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof(e==null?void 0:e.useStrictIteration)=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Oo(e)||kn(8),To(e)&&(e=$v(e));const t=qd(this),r=E0(e,void 0);return r[fn].isManual_=!0,D0(t),r}finishDraft(e,t){const r=e&&e[fn];(!r||!r.isManual_)&&kn(9);const{scope_:n}=r;return Hd(n,t),Kd(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const o=t[r];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}r>-1&&(t=t.slice(r+1));const n=$o("Patches").applyPatches_;return To(e)?n(e,t):this.produce(e,o=>n(o,t))}};function E0(e,t){const r=ni(e)?$o("MapSet").proxyMap_(e,t):vs(e)?$o("MapSet").proxySet_(e,t):Nv(e,t);return(t?t.scope_:np()).drafts_.push(r),r}function $v(e){return To(e)||kn(10,e),ap(e)}function ap(e){if(!Oo(e)||bs(e))return e;const t=e[fn];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=w0(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=w0(e,!0);return Qi(r,(o,i)=>{rp(r,o,ap(i))},n),t&&(t.finalized_=!1),r}var Ha=new Ov,pu=Ha.produce,Vd=Ha.createDraft.bind(Ha),Ud=Ha.finishDraft.bind(Ha),Mv={transform(e,t){var{current:r,affinity:n}=e;if(r!=null){var o=re.transform(r,t,{affinity:n});e.current=o,o==null&&e.unref()}}},Rv={transform(e,t){var{current:r,affinity:n}=e;if(r!=null){var o=Lt.transform(r,t,{affinity:n});e.current=o,o==null&&e.unref()}}},Pv={transform(e,t){var{current:r,affinity:n}=e;if(r!=null){var o=Ne.transform(r,t,{affinity:n});e.current=o,o==null&&e.unref()}}},rs=new WeakMap,ns=new WeakMap,Oa=new WeakMap,ip=new WeakMap,Xd=new WeakMap,Gd=new WeakMap,Yd=new WeakMap,re={ancestors(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=t,n=re.levels(e,t);return r?n=n.slice(1):n=n.slice(0,-1),n},common(e,t){for(var r=[],n=0;n<e.length&&n<t.length;n++){var o=e[n],i=t[n];if(o!==i)break;r.push(o)}return r},compare(e,t){for(var r=Math.min(e.length,t.length),n=0;n<r;n++){if(e[n]<t[n])return-1;if(e[n]>t[n])return 1}return 0},endsAfter(e,t){var r=e.length-1,n=e.slice(0,r),o=t.slice(0,r),i=e[r],c=t[r];return re.equals(n,o)&&i>c},endsAt(e,t){var r=e.length,n=e.slice(0,r),o=t.slice(0,r);return re.equals(n,o)},endsBefore(e,t){var r=e.length-1,n=e.slice(0,r),o=t.slice(0,r),i=e[r],c=t[r];return re.equals(n,o)&&i<c},equals(e,t){return e.length===t.length&&e.every((r,n)=>r===t[n])},hasPrevious(e){return e[e.length-1]>0},isAfter(e,t){return re.compare(e,t)===1},isAncestor(e,t){return e.length<t.length&&re.compare(e,t)===0},isBefore(e,t){return re.compare(e,t)===-1},isChild(e,t){return e.length===t.length+1&&re.compare(e,t)===0},isCommon(e,t){return e.length<=t.length&&re.compare(e,t)===0},isDescendant(e,t){return e.length>t.length&&re.compare(e,t)===0},isParent(e,t){return e.length+1===t.length&&re.compare(e,t)===0},isPath(e){return Array.isArray(e)&&(e.length===0||typeof e[0]=="number")},isSibling(e,t){if(e.length!==t.length)return!1;var r=e.slice(0,-1),n=t.slice(0,-1),o=e[e.length-1],i=t[t.length-1];return o!==i&&re.equals(r,n)},levels(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=t,n=[],o=0;o<=e.length;o++)n.push(e.slice(0,o));return r&&n.reverse(),n},next(e){if(e.length===0)throw new Error("Cannot get the next path of a root path [".concat(e,"], because it has no next index."));var t=e[e.length-1];return e.slice(0,-1).concat(t+1)},operationCanTransformPath(e){switch(e.type){case"insert_node":case"remove_node":case"merge_node":case"split_node":case"move_node":return!0;default:return!1}},parent(e){if(e.length===0)throw new Error("Cannot get the parent path of the root path [".concat(e,"]."));return e.slice(0,-1)},previous(e){if(e.length===0)throw new Error("Cannot get the previous path of a root path [".concat(e,"], because it has no previous index."));var t=e[e.length-1];if(t<=0)throw new Error("Cannot get the previous path of a first child path [".concat(e,"] because it would result in a negative index."));return e.slice(0,-1).concat(t-1)},relative(e,t){if(!re.isAncestor(t,e)&&!re.equals(e,t))throw new Error("Cannot get the relative path of [".concat(e,"] inside ancestor [").concat(t,"], because it is not above or equal to the path."));return e.slice(t.length)},transform(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!e)return null;var n=[...e],{affinity:o="forward"}=r;if(e.length===0)return n;switch(t.type){case"insert_node":{var{path:i}=t;(re.equals(i,n)||re.endsBefore(i,n)||re.isAncestor(i,n))&&(n[i.length-1]+=1);break}case"remove_node":{var{path:c}=t;if(re.equals(c,n)||re.isAncestor(c,n))return null;re.endsBefore(c,n)&&(n[c.length-1]-=1);break}case"merge_node":{var{path:u,position:f}=t;re.equals(u,n)||re.endsBefore(u,n)?n[u.length-1]-=1:re.isAncestor(u,n)&&(n[u.length-1]-=1,n[u.length]+=f);break}case"split_node":{var{path:d,position:p}=t;if(re.equals(d,n)){if(o==="forward")n[n.length-1]+=1;else if(o!=="backward")return null}else re.endsBefore(d,n)?n[d.length-1]+=1:re.isAncestor(d,n)&&e[d.length]>=p&&(n[d.length-1]+=1,n[d.length]-=p);break}case"move_node":{var{path:v,newPath:g}=t;if(re.equals(v,g))return n;if(re.isAncestor(v,n)||re.equals(v,n)){var x=g.slice();return re.endsBefore(v,g)&&v.length<g.length&&(x[v.length-1]-=1),x.concat(n.slice(v.length))}else re.isSibling(v,g)&&(re.isAncestor(g,n)||re.equals(g,n))?re.endsBefore(v,n)?n[v.length-1]-=1:n[v.length-1]+=1:re.endsBefore(g,n)||re.equals(g,n)||re.isAncestor(g,n)?(re.endsBefore(v,n)&&(n[v.length-1]-=1),n[g.length-1]+=1):re.endsBefore(v,n)&&(re.equals(g,n)&&(n[g.length-1]+=1),n[v.length-1]-=1);break}}return n}};function qa(e){"@babel/helpers - typeof";return qa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qa(e)}function zv(e,t){if(qa(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(qa(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _v(e){var t=zv(e,"string");return qa(t)==="symbol"?t:String(t)}function rn(e,t,r){return t=_v(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Zd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Da(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Zd(Object(r),!0).forEach(function(n){rn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Iv=(e,t,r)=>{switch(r.type){case"insert_node":{var{path:n,node:o}=r,i=Qe.parent(e,n),c=n[n.length-1];if(c>i.children.length)throw new Error('Cannot apply an "insert_node" operation at path ['.concat(n,"] because the destination is past the end of the node."));if(i.children.splice(c,0,o),t)for(var[u,f]of Ne.points(t))t[f]=Lt.transform(u,r);break}case"insert_text":{var{path:d,offset:p,text:v}=r;if(v.length===0)break;var g=Qe.leaf(e,d),x=g.text.slice(0,p),w=g.text.slice(p);if(g.text=x+v+w,t)for(var[C,m]of Ne.points(t))t[m]=Lt.transform(C,r);break}case"merge_node":{var{path:A}=r,S=Qe.get(e,A),D=re.previous(A),$=Qe.get(e,D),F=Qe.parent(e,A),B=A[A.length-1];if(ct.isText(S)&&ct.isText($))$.text+=S.text;else if(!ct.isText(S)&&!ct.isText($))$.children.push(...S.children);else throw new Error('Cannot apply a "merge_node" operation at path ['.concat(A,"] to nodes of different interfaces: ").concat(Hr.stringify(S)," ").concat(Hr.stringify($)));if(F.children.splice(B,1),t)for(var[R,I]of Ne.points(t))t[I]=Lt.transform(R,r);break}case"move_node":{var{path:T,newPath:W}=r;if(re.isAncestor(T,W))throw new Error("Cannot move a path [".concat(T,"] to new path [").concat(W,"] because the destination is inside itself."));var H=Qe.get(e,T),Z=Qe.parent(e,T),Y=T[T.length-1];Z.children.splice(Y,1);var j=re.transform(T,r),K=Qe.get(e,re.parent(j)),U=j[j.length-1];if(K.children.splice(U,0,H),t)for(var[G,J]of Ne.points(t))t[J]=Lt.transform(G,r);break}case"remove_node":{var{path:z}=r,ie=z[z.length-1],ge=Qe.parent(e,z);if(ge.children.splice(ie,1),t)for(var[xe,Ae]of Ne.points(t)){var Fe=Lt.transform(xe,r);if(t!=null&&Fe!=null)t[Ae]=Fe;else{var be=void 0,X=void 0;for(var[fe,ce]of Qe.texts(e))if(re.compare(ce,z)===-1)be=[fe,ce];else{X=[fe,ce];break}var se=!1;be&&X&&(re.equals(X[1],z)?se=!re.hasPrevious(X[1]):se=re.common(be[1],z).length<re.common(X[1],z).length),be&&!se?(xe.path=be[1],xe.offset=be[0].text.length):X?(xe.path=X[1],xe.offset=0):t=null}}break}case"remove_text":{var{path:oe,offset:he,text:we}=r;if(we.length===0)break;var Ce=Qe.leaf(e,oe),ke=Ce.text.slice(0,he),Se=Ce.text.slice(he+we.length);if(Ce.text=ke+Se,t)for(var[Te,Ie]of Ne.points(t))t[Ie]=Lt.transform(Te,r);break}case"set_node":{var{path:We,properties:ut,newProperties:ot}=r;if(We.length===0)throw new Error("Cannot set properties on the root node!");var Oe=Qe.get(e,We);for(var je in ot){if(je==="children"||je==="text")throw new Error('Cannot set the "'.concat(je,'" property of nodes!'));var Ve=ot[je];Ve==null?delete Oe[je]:Oe[je]=Ve}for(var ft in ut)ot.hasOwnProperty(ft)||delete Oe[ft];break}case"set_selection":{var{newProperties:tt}=r;if(tt==null)t=tt;else{if(t==null){if(!Ne.isRange(tt))throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(Hr.stringify(tt)," when there is no current selection."));t=Da({},tt)}for(var nt in tt){var Tt=tt[nt];if(Tt==null){if(nt==="anchor"||nt==="focus")throw new Error('Cannot remove the "'.concat(nt,'" selection property'));delete t[nt]}else t[nt]=Tt}}break}case"split_node":{var{path:bt,position:At,properties:yt}=r;if(bt.length===0)throw new Error('Cannot apply a "split_node" operation at path ['.concat(bt,"] because the root node cannot be split."));var Me=Qe.get(e,bt),ue=Qe.parent(e,bt),mt=bt[bt.length-1],zt;if(ct.isText(Me)){var Wt=Me.text.slice(0,At),Ot=Me.text.slice(At);Me.text=Wt,zt=Da(Da({},yt),{},{text:Ot})}else{var ir=Me.children.slice(0,At),Ct=Me.children.slice(At);Me.children=ir,zt=Da(Da({},yt),{},{children:Ct})}if(ue.children.splice(mt+1,0,zt),t)for(var[_t,Gt]of Ne.points(t))t[Gt]=Lt.transform(_t,r);break}}return t},jv={transform(e,t){e.children=Vd(e.children);var r=e.selection&&Vd(e.selection);try{r=Iv(e,r,t)}finally{e.children=Ud(e.children),r?e.selection=To(r)?Ud(r):r:e.selection=null}}},Lv={insertNodes(e,t,r){e.insertNodes(t,r)},liftNodes(e,t){e.liftNodes(t)},mergeNodes(e,t){e.mergeNodes(t)},moveNodes(e,t){e.moveNodes(t)},removeNodes(e,t){e.removeNodes(t)},setNodes(e,t,r){e.setNodes(t,r)},splitNodes(e,t){e.splitNodes(t)},unsetNodes(e,t,r){e.unsetNodes(t,r)},unwrapNodes(e,t){e.unwrapNodes(t)},wrapNodes(e,t,r){e.wrapNodes(t,r)}},Hv={collapse(e,t){e.collapse(t)},deselect(e){e.deselect()},move(e,t){e.move(t)},select(e,t){e.select(t)},setPoint(e,t,r){e.setPoint(t,r)},setSelection(e,t){e.setSelection(t)}},sp=(e,t)=>{for(var r in e){var n=e[r],o=t[r];if(Ur(n)&&Ur(o)){if(!sp(n,o))return!1}else if(Array.isArray(n)&&Array.isArray(o)){if(n.length!==o.length)return!1;for(var i=0;i<n.length;i++)if(n[i]!==o[i])return!1}else if(n!==o)return!1}for(var c in t)if(e[c]===void 0&&t[c]!==void 0)return!1;return!0};function qv(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,i;for(i=0;i<n.length;i++)o=n[i],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function Yn(e,t){if(e==null)return{};var r=qv(e,t),n,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var Kv=["anchor","focus"];function Jd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Wv(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Jd(Object(r),!0).forEach(function(n){rn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Jd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Ne={edges(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=t,{anchor:n,focus:o}=e;return Ne.isBackward(e)===r?[n,o]:[o,n]},end(e){var[,t]=Ne.edges(e);return t},equals(e,t){return Lt.equals(e.anchor,t.anchor)&&Lt.equals(e.focus,t.focus)},includes(e,t){if(Ne.isRange(t)){if(Ne.includes(e,t.anchor)||Ne.includes(e,t.focus))return!0;var[r,n]=Ne.edges(e),[o,i]=Ne.edges(t);return Lt.isBefore(r,o)&&Lt.isAfter(n,i)}var[c,u]=Ne.edges(e),f=!1,d=!1;return Lt.isPoint(t)?(f=Lt.compare(t,c)>=0,d=Lt.compare(t,u)<=0):(f=re.compare(t,c.path)>=0,d=re.compare(t,u.path)<=0),f&&d},intersection(e,t){var r=Yn(e,Kv),[n,o]=Ne.edges(e),[i,c]=Ne.edges(t),u=Lt.isBefore(n,i)?i:n,f=Lt.isBefore(o,c)?o:c;return Lt.isBefore(f,u)?null:Wv({anchor:u,focus:f},r)},isBackward(e){var{anchor:t,focus:r}=e;return Lt.isAfter(t,r)},isCollapsed(e){var{anchor:t,focus:r}=e;return Lt.equals(t,r)},isExpanded(e){return!Ne.isCollapsed(e)},isForward(e){return!Ne.isBackward(e)},isRange(e){return Ur(e)&&Lt.isPoint(e.anchor)&&Lt.isPoint(e.focus)},*points(e){yield[e.anchor,"anchor"],yield[e.focus,"focus"]},start(e){var[t]=Ne.edges(e);return t},transform(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return pu(e,n=>{if(n===null)return null;var{affinity:o="inward"}=r,i,c;if(o==="inward"){var u=Ne.isCollapsed(n);Ne.isForward(n)?(i="forward",c=u?i:"backward"):(i="backward",c=u?i:"forward")}else o==="outward"?Ne.isForward(n)?(i="backward",c="forward"):(i="forward",c="backward"):(i=o,c=o);var f=Lt.transform(n.anchor,t,{affinity:i}),d=Lt.transform(n.focus,t,{affinity:c});if(!f||!d)return null;n.anchor=f,n.focus=d})}},Qd=e=>Ur(e)&&Qe.isNodeList(e.children)&&!P.isEditor(e),dt={isAncestor(e){return Ur(e)&&Qe.isNodeList(e.children)},isElement:Qd,isElementList(e){return Array.isArray(e)&&e.every(t=>dt.isElement(t))},isElementProps(e){return e.children!==void 0},isElementType:function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"type";return Qd(e)&&e[r]===t},matches(e,t){for(var r in t)if(r!=="children"&&e[r]!==t[r])return!1;return!0}},Vv=["children"],Uv=["text"],ef=new WeakMap,Qe={ancestor(e,t){var r=Qe.get(e,t);if(ct.isText(r))throw new Error("Cannot get the ancestor node at path [".concat(t,"] because it refers to a text node instead: ").concat(Hr.stringify(r)));return r},ancestors(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return(function*(){for(var n of re.ancestors(t,r)){var o=Qe.ancestor(e,n),i=[o,n];yield i}})()},child(e,t){if(ct.isText(e))throw new Error("Cannot get the child of a text node: ".concat(Hr.stringify(e)));var r=e.children[t];if(r==null)throw new Error("Cannot get child at index `".concat(t,"` in node: ").concat(Hr.stringify(e)));return r},children(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return(function*(){for(var{reverse:n=!1}=r,o=Qe.ancestor(e,t),{children:i}=o,c=n?i.length-1:0;n?c>=0:c<i.length;){var u=Qe.child(o,c),f=t.concat(c);yield[u,f],c=n?c-1:c+1}})()},common(e,t,r){var n=re.common(t,r),o=Qe.get(e,n);return[o,n]},descendant(e,t){var r=Qe.get(e,t);if(P.isEditor(r))throw new Error("Cannot get the descendant node at path [".concat(t,"] because it refers to the root editor node instead: ").concat(Hr.stringify(r)));return r},descendants(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){for(var[r,n]of Qe.nodes(e,t))n.length!==0&&(yield[r,n])})()},elements(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){for(var[r,n]of Qe.nodes(e,t))dt.isElement(r)&&(yield[r,n])})()},extractProps(e){if(dt.isAncestor(e)){var t=Yn(e,Vv);return t}else{var t=Yn(e,Uv);return t}},first(e,t){for(var r=t.slice(),n=Qe.get(e,r);n&&!(ct.isText(n)||n.children.length===0);)n=n.children[0],r.push(0);return[n,r]},fragment(e,t){if(ct.isText(e))throw new Error("Cannot get a fragment starting from a root text node: ".concat(Hr.stringify(e)));var r=pu({children:e.children},n=>{var[o,i]=Ne.edges(t),c=Qe.nodes(n,{reverse:!0,pass:g=>{var[,x]=g;return!Ne.includes(t,x)}});for(var[,u]of c){if(!Ne.includes(t,u)){var f=Qe.parent(n,u),d=u[u.length-1];f.children.splice(d,1)}if(re.equals(u,i.path)){var p=Qe.leaf(n,u);p.text=p.text.slice(0,i.offset)}if(re.equals(u,o.path)){var v=Qe.leaf(n,u);v.text=v.text.slice(o.offset)}}P.isEditor(n)&&(n.selection=null)});return r.children},get(e,t){for(var r=e,n=0;n<t.length;n++){var o=t[n];if(ct.isText(r)||!r.children[o])throw new Error("Cannot find a descendant at path [".concat(t,"] in node: ").concat(Hr.stringify(e)));r=r.children[o]}return r},has(e,t){for(var r=e,n=0;n<t.length;n++){var o=t[n];if(ct.isText(r)||!r.children[o])return!1;r=r.children[o]}return!0},isNode(e){return ct.isText(e)||dt.isElement(e)||P.isEditor(e)},isNodeList(e){if(!Array.isArray(e))return!1;var t=ef.get(e);if(t!==void 0)return t;var r=e.every(n=>Qe.isNode(n));return ef.set(e,r),r},last(e,t){for(var r=t.slice(),n=Qe.get(e,r);n&&!(ct.isText(n)||n.children.length===0);){var o=n.children.length-1;n=n.children[o],r.push(o)}return[n,r]},leaf(e,t){var r=Qe.get(e,t);if(!ct.isText(r))throw new Error("Cannot get the leaf node at path [".concat(t,"] because it refers to a non-leaf node: ").concat(Hr.stringify(r)));return r},levels(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return(function*(){for(var n of re.levels(t,r)){var o=Qe.get(e,n);yield[o,n]}})()},matches(e,t){return dt.isElement(e)&&dt.isElementProps(t)&&dt.matches(e,t)||ct.isText(e)&&ct.isTextProps(t)&&ct.matches(e,t)},nodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){for(var{pass:r,reverse:n=!1}=t,{from:o=[],to:i}=t,c=new Set,u=[],f=e;!(i&&(n?re.isBefore(u,i):re.isAfter(u,i)));){if(c.has(f)||(yield[f,u]),!c.has(f)&&!ct.isText(f)&&f.children.length!==0&&(r==null||r([f,u])===!1)){c.add(f);var d=n?f.children.length-1:0;re.isAncestor(u,o)&&(d=o[u.length]),u=u.concat(d),f=Qe.get(e,u);continue}if(u.length===0)break;if(!n){var p=re.next(u);if(Qe.has(e,p)){u=p,f=Qe.get(e,u);continue}}if(n&&u[u.length-1]!==0){var v=re.previous(u);u=v,f=Qe.get(e,u);continue}u=re.parent(u),f=Qe.get(e,u),c.add(f)}})()},parent(e,t){var r=re.parent(t),n=Qe.get(e,r);if(ct.isText(n))throw new Error("Cannot get the parent of path [".concat(t,"] because it does not exist in the root."));return n},string(e){return ct.isText(e)?e.text:e.children.map(Qe.string).join("")},texts(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){for(var[r,n]of Qe.nodes(e,t))ct.isText(r)&&(yield[r,n])})()}};function tf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Er(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tf(Object(r),!0).forEach(function(n){rn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Sa={isNodeOperation(e){return Sa.isOperation(e)&&e.type.endsWith("_node")},isOperation(e){if(!Ur(e))return!1;switch(e.type){case"insert_node":return re.isPath(e.path)&&Qe.isNode(e.node);case"insert_text":return typeof e.offset=="number"&&typeof e.text=="string"&&re.isPath(e.path);case"merge_node":return typeof e.position=="number"&&re.isPath(e.path)&&Ur(e.properties);case"move_node":return re.isPath(e.path)&&re.isPath(e.newPath);case"remove_node":return re.isPath(e.path)&&Qe.isNode(e.node);case"remove_text":return typeof e.offset=="number"&&typeof e.text=="string"&&re.isPath(e.path);case"set_node":return re.isPath(e.path)&&Ur(e.properties)&&Ur(e.newProperties);case"set_selection":return e.properties===null&&Ne.isRange(e.newProperties)||e.newProperties===null&&Ne.isRange(e.properties)||Ur(e.properties)&&Ur(e.newProperties);case"split_node":return re.isPath(e.path)&&typeof e.position=="number"&&Ur(e.properties);default:return!1}},isOperationList(e){return Array.isArray(e)&&e.every(t=>Sa.isOperation(t))},isSelectionOperation(e){return Sa.isOperation(e)&&e.type.endsWith("_selection")},isTextOperation(e){return Sa.isOperation(e)&&e.type.endsWith("_text")},inverse(e){switch(e.type){case"insert_node":return Er(Er({},e),{},{type:"remove_node"});case"insert_text":return Er(Er({},e),{},{type:"remove_text"});case"merge_node":return Er(Er({},e),{},{type:"split_node",path:re.previous(e.path)});case"move_node":{var{newPath:t,path:r}=e;if(re.equals(t,r))return e;if(re.isSibling(r,t))return Er(Er({},e),{},{path:t,newPath:r});var n=re.transform(r,e),o=re.transform(re.next(r),e);return Er(Er({},e),{},{path:n,newPath:o})}case"remove_node":return Er(Er({},e),{},{type:"insert_node"});case"remove_text":return Er(Er({},e),{},{type:"insert_text"});case"set_node":{var{properties:i,newProperties:c}=e;return Er(Er({},e),{},{properties:c,newProperties:i})}case"set_selection":{var{properties:u,newProperties:f}=e;return u==null?Er(Er({},e),{},{properties:f,newProperties:null}):f==null?Er(Er({},e),{},{properties:null,newProperties:u}):Er(Er({},e),{},{properties:f,newProperties:u})}case"split_node":return Er(Er({},e),{},{type:"merge_node",path:re.next(e.path)})}}},rf=new WeakMap,Xv=e=>{var t=rf.get(e);if(t!==void 0)return t;if(!Ur(e))return!1;var r=typeof e.addMark=="function"&&typeof e.apply=="function"&&typeof e.deleteFragment=="function"&&typeof e.insertBreak=="function"&&typeof e.insertSoftBreak=="function"&&typeof e.insertFragment=="function"&&typeof e.insertNode=="function"&&typeof e.insertText=="function"&&typeof e.isElementReadOnly=="function"&&typeof e.isInline=="function"&&typeof e.isSelectable=="function"&&typeof e.isVoid=="function"&&typeof e.normalizeNode=="function"&&typeof e.onChange=="function"&&typeof e.removeMark=="function"&&typeof e.getDirtyPaths=="function"&&(e.marks===null||Ur(e.marks))&&(e.selection===null||Ne.isRange(e.selection))&&Qe.isNodeList(e.children)&&Sa.isOperationList(e.operations);return rf.set(e,r),r},P={above(e,t){return e.above(t)},addMark(e,t,r){e.addMark(t,r)},after(e,t,r){return e.after(t,r)},before(e,t,r){return e.before(t,r)},deleteBackward(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:r="character"}=t;e.deleteBackward(r)},deleteForward(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:r="character"}=t;e.deleteForward(r)},deleteFragment(e,t){e.deleteFragment(t)},edges(e,t){return e.edges(t)},elementReadOnly(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.elementReadOnly(t)},end(e,t){return e.end(t)},first(e,t){return e.first(t)},fragment(e,t){return e.fragment(t)},hasBlocks(e,t){return e.hasBlocks(t)},hasInlines(e,t){return e.hasInlines(t)},hasPath(e,t){return e.hasPath(t)},hasTexts(e,t){return e.hasTexts(t)},insertBreak(e){e.insertBreak()},insertFragment(e,t,r){e.insertFragment(t,r)},insertNode(e,t){e.insertNode(t)},insertSoftBreak(e){e.insertSoftBreak()},insertText(e,t){e.insertText(t)},isBlock(e,t){return e.isBlock(t)},isEdge(e,t,r){return e.isEdge(t,r)},isEditor(e){return Xv(e)},isElementReadOnly(e,t){return e.isElementReadOnly(t)},isEmpty(e,t){return e.isEmpty(t)},isEnd(e,t,r){return e.isEnd(t,r)},isInline(e,t){return e.isInline(t)},isNormalizing(e){return e.isNormalizing()},isSelectable(e,t){return e.isSelectable(t)},isStart(e,t,r){return e.isStart(t,r)},isVoid(e,t){return e.isVoid(t)},last(e,t){return e.last(t)},leaf(e,t,r){return e.leaf(t,r)},levels(e,t){return e.levels(t)},marks(e){return e.getMarks()},next(e,t){return e.next(t)},node(e,t,r){return e.node(t,r)},nodes(e,t){return e.nodes(t)},normalize(e,t){e.normalize(t)},parent(e,t,r){return e.parent(t,r)},path(e,t,r){return e.path(t,r)},pathRef(e,t,r){return e.pathRef(t,r)},pathRefs(e){return e.pathRefs()},point(e,t,r){return e.point(t,r)},pointRef(e,t,r){return e.pointRef(t,r)},pointRefs(e){return e.pointRefs()},positions(e,t){return e.positions(t)},previous(e,t){return e.previous(t)},range(e,t,r){return e.range(t,r)},rangeRef(e,t,r){return e.rangeRef(t,r)},rangeRefs(e){return e.rangeRefs()},removeMark(e,t){e.removeMark(t)},setNormalizing(e,t){e.setNormalizing(t)},start(e,t){return e.start(t)},string(e,t,r){return e.string(t,r)},unhangRange(e,t,r){return e.unhangRange(t,r)},void(e,t){return e.void(t)},withoutNormalizing(e,t){e.withoutNormalizing(t)},shouldMergeNodesRemovePrevNode:(e,t,r)=>e.shouldMergeNodesRemovePrevNode(t,r)},Gv={isSpan(e){return Array.isArray(e)&&e.length===2&&e.every(re.isPath)}};function nf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function of(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?nf(Object(r),!0).forEach(function(n){rn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Lt={compare(e,t){var r=re.compare(e.path,t.path);return r===0?e.offset<t.offset?-1:e.offset>t.offset?1:0:r},isAfter(e,t){return Lt.compare(e,t)===1},isBefore(e,t){return Lt.compare(e,t)===-1},equals(e,t){return e.offset===t.offset&&re.equals(e.path,t.path)},isPoint(e){return Ur(e)&&typeof e.offset=="number"&&re.isPath(e.path)},transform(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return pu(e,n=>{if(n===null)return null;var{affinity:o="forward"}=r,{path:i,offset:c}=n;switch(t.type){case"insert_node":case"move_node":{n.path=re.transform(i,t,r);break}case"insert_text":{re.equals(t.path,i)&&(t.offset<c||t.offset===c&&o==="forward")&&(n.offset+=t.text.length);break}case"merge_node":{re.equals(t.path,i)&&(n.offset+=t.position),n.path=re.transform(i,t,r);break}case"remove_text":{re.equals(t.path,i)&&t.offset<=c&&(n.offset-=Math.min(c-t.offset,t.text.length));break}case"remove_node":{if(re.equals(t.path,i)||re.isAncestor(t.path,i))return null;n.path=re.transform(i,t,r);break}case"split_node":{if(re.equals(t.path,i)){if(t.position===c&&o==null)return null;(t.position<c||t.position===c&&o==="forward")&&(n.offset-=t.position,n.path=re.transform(i,t,of(of({},r),{},{affinity:"forward"})))}else n.path=re.transform(i,t,r);break}}})}},af=void 0,Hr={setScrubber(e){af=e},stringify(e){return JSON.stringify(e,af)}},Yv=["text"],Zv=["anchor","focus"];function sf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Kn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?sf(Object(r),!0).forEach(function(n){rn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ct={equals(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{loose:n=!1}=r;function o(i){var c=Yn(i,Yv);return c}return sp(n?o(e):e,n?o(t):t)},isText(e){return Ur(e)&&typeof e.text=="string"},isTextList(e){return Array.isArray(e)&&e.every(t=>ct.isText(t))},isTextProps(e){return e.text!==void 0},matches(e,t){for(var r in t)if(r!=="text"&&(!e.hasOwnProperty(r)||e[r]!==t[r]))return!1;return!0},decorations(e,t){var r=[Kn({},e)];for(var n of t){var o=Yn(n,Zv),[i,c]=Ne.edges(n),u=[],f=0,d=i.offset,p=c.offset;for(var v of r){var{length:g}=v.text,x=f;if(f+=g,d<=x&&f<=p){Object.assign(v,o),u.push(v);continue}if(d!==p&&(d===f||p===x)||d>f||p<x||p===x&&x!==0){u.push(v);continue}var w=v,C=void 0,m=void 0;if(p<f){var A=p-x;m=Kn(Kn({},w),{},{text:w.text.slice(A)}),w=Kn(Kn({},w),{},{text:w.text.slice(0,A)})}if(d>x){var S=d-x;C=Kn(Kn({},w),{},{text:w.text.slice(0,S)}),w=Kn(Kn({},w),{},{text:w.text.slice(S)})}Object.assign(w,o),C&&u.push(C),u.push(w),m&&u.push(m)}r=u}return r}},mu=e=>e.selection?e.selection:e.children.length>0?P.end(e,[]):[0],pa=(e,t)=>{var[r]=P.node(e,t);return n=>n===r},gu=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=!t,n=t?n6(e):e,o=Nt.None,i=Nt.None,c=0,u=null,f=null;for(var d of n){var p=d.codePointAt(0);if(!p)break;var v=m6(d,p);if([o,i]=r?[i,v]:[v,o],Wo(o,Nt.ZWJ)&&Wo(i,Nt.ExtPict)&&(r?u=lf(e.substring(0,c)):u=lf(e.substring(0,e.length-c)),!u)||Wo(o,Nt.RI)&&Wo(i,Nt.RI)&&(f!==null?f=!f:r?f=!0:f=x6(e.substring(0,e.length-c)),!f)||o!==Nt.None&&i!==Nt.None&&v6(o,i))break;c+=d.length}return c||1},Jv=/\s/,Qv=/[\u002B\u0021-\u0023\u0025-\u002A\u002C-\u002F\u003A\u003B\u003F\u0040\u005B-\u005D\u005F\u007B\u007D\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E3B\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,e6=/['\u2018\u2019]/,t6=function(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=0,n=!1;e.length>0;){var o=gu(e,t),[i,c]=vu(e,o,t);if(r6(i,c,t))n=!0,r+=o;else if(!n)r+=o;else break;e=c}return r},vu=(e,t,r)=>{if(r){var n=e.length-t;return[e.slice(n,e.length),e.slice(0,n)]}return[e.slice(0,t),e.slice(t)]},r6=function e(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(Jv.test(t))return!1;if(e6.test(t)){var o=gu(r,n),[i,c]=vu(r,o,n);if(e(i,c,n))return!0}return!Qv.test(t)},n6=function*(e){for(var t=e.length-1,r=0;r<e.length;r++){var n=e.charAt(t-r);if(a6(n.charCodeAt(0))){var o=e.charAt(t-r-1);if(o6(o.charCodeAt(0))){yield o+n,r++;continue}}yield n}},o6=e=>e>=55296&&e<=56319,a6=e=>e>=56320&&e<=57343,Nt;(function(e){e[e.None=0]="None",e[e.Extend=1]="Extend",e[e.ZWJ=2]="ZWJ",e[e.RI=4]="RI",e[e.Prepend=8]="Prepend",e[e.SpacingMark=16]="SpacingMark",e[e.L=32]="L",e[e.V=64]="V",e[e.T=128]="T",e[e.LV=256]="LV",e[e.LVT=512]="LVT",e[e.ExtPict=1024]="ExtPict",e[e.Any=2048]="Any"})(Nt||(Nt={}));var i6=/^(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC01\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDE41\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4\uDF00\uDF01\uDF36-\uDF3A\uDF40\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])$/,s6=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,l6=/^(?:[\u0903\u093B\u093E-\u0940\u0949-\u094C\u094E\u094F\u0982\u0983\u09BF\u09C0\u09C7\u09C8\u09CB\u09CC\u0A03\u0A3E-\u0A40\u0A83\u0ABE-\u0AC0\u0AC9\u0ACB\u0ACC\u0B02\u0B03\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0BBF\u0BC1\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0C01-\u0C03\u0C41-\u0C44\u0C82\u0C83\u0CBE\u0CC0\u0CC1\u0CC3\u0CC4\u0CC7\u0CC8\u0CCA\u0CCB\u0D02\u0D03\u0D3F\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D82\u0D83\u0DD0\u0DD1\u0DD8-\u0DDE\u0DF2\u0DF3\u0E33\u0EB3\u0F3E\u0F3F\u0F7F\u1031\u103B\u103C\u1056\u1057\u1084\u1715\u1734\u17B6\u17BE-\u17C5\u17C7\u17C8\u1923-\u1926\u1929-\u192B\u1930\u1931\u1933-\u1938\u1A19\u1A1A\u1A55\u1A57\u1A6D-\u1A72\u1B04\u1B3B\u1B3D-\u1B41\u1B43\u1B44\u1B82\u1BA1\u1BA6\u1BA7\u1BAA\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2\u1BF3\u1C24-\u1C2B\u1C34\u1C35\u1CE1\u1CF7\uA823\uA824\uA827\uA880\uA881\uA8B4-\uA8C3\uA952\uA953\uA983\uA9B4\uA9B5\uA9BA\uA9BB\uA9BE-\uA9C0\uAA2F\uAA30\uAA33\uAA34\uAA4D\uAAEB\uAAEE\uAAEF\uAAF5\uABE3\uABE4\uABE6\uABE7\uABE9\uABEA\uABEC]|\uD804[\uDC00\uDC02\uDC82\uDCB0-\uDCB2\uDCB7\uDCB8\uDD2C\uDD45\uDD46\uDD82\uDDB3-\uDDB5\uDDBF\uDDC0\uDDCE\uDE2C-\uDE2E\uDE32\uDE33\uDE35\uDEE0-\uDEE2\uDF02\uDF03\uDF3F\uDF41-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF62\uDF63]|\uD805[\uDC35-\uDC37\uDC40\uDC41\uDC45\uDCB1\uDCB2\uDCB9\uDCBB\uDCBC\uDCBE\uDCC1\uDDB0\uDDB1\uDDB8-\uDDBB\uDDBE\uDE30-\uDE32\uDE3B\uDE3C\uDE3E\uDEAC\uDEAE\uDEAF\uDEB6\uDF26]|\uD806[\uDC2C-\uDC2E\uDC38\uDD31-\uDD35\uDD37\uDD38\uDD3D\uDD40\uDD42\uDDD1-\uDDD3\uDDDC-\uDDDF\uDDE4\uDE39\uDE57\uDE58\uDE97]|\uD807[\uDC2F\uDC3E\uDCA9\uDCB1\uDCB4\uDD8A-\uDD8E\uDD93\uDD94\uDD96\uDEF5\uDEF6]|\uD81B[\uDF51-\uDF87\uDFF0\uDFF1]|\uD834[\uDD66\uDD6D])$/,u6=/^[\u1100-\u115F\uA960-\uA97C]$/,c6=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,d6=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,f6=/^[\uAC00\uAC1C\uAC38\uAC54\uAC70\uAC8C\uACA8\uACC4\uACE0\uACFC\uAD18\uAD34\uAD50\uAD6C\uAD88\uADA4\uADC0\uADDC\uADF8\uAE14\uAE30\uAE4C\uAE68\uAE84\uAEA0\uAEBC\uAED8\uAEF4\uAF10\uAF2C\uAF48\uAF64\uAF80\uAF9C\uAFB8\uAFD4\uAFF0\uB00C\uB028\uB044\uB060\uB07C\uB098\uB0B4\uB0D0\uB0EC\uB108\uB124\uB140\uB15C\uB178\uB194\uB1B0\uB1CC\uB1E8\uB204\uB220\uB23C\uB258\uB274\uB290\uB2AC\uB2C8\uB2E4\uB300\uB31C\uB338\uB354\uB370\uB38C\uB3A8\uB3C4\uB3E0\uB3FC\uB418\uB434\uB450\uB46C\uB488\uB4A4\uB4C0\uB4DC\uB4F8\uB514\uB530\uB54C\uB568\uB584\uB5A0\uB5BC\uB5D8\uB5F4\uB610\uB62C\uB648\uB664\uB680\uB69C\uB6B8\uB6D4\uB6F0\uB70C\uB728\uB744\uB760\uB77C\uB798\uB7B4\uB7D0\uB7EC\uB808\uB824\uB840\uB85C\uB878\uB894\uB8B0\uB8CC\uB8E8\uB904\uB920\uB93C\uB958\uB974\uB990\uB9AC\uB9C8\uB9E4\uBA00\uBA1C\uBA38\uBA54\uBA70\uBA8C\uBAA8\uBAC4\uBAE0\uBAFC\uBB18\uBB34\uBB50\uBB6C\uBB88\uBBA4\uBBC0\uBBDC\uBBF8\uBC14\uBC30\uBC4C\uBC68\uBC84\uBCA0\uBCBC\uBCD8\uBCF4\uBD10\uBD2C\uBD48\uBD64\uBD80\uBD9C\uBDB8\uBDD4\uBDF0\uBE0C\uBE28\uBE44\uBE60\uBE7C\uBE98\uBEB4\uBED0\uBEEC\uBF08\uBF24\uBF40\uBF5C\uBF78\uBF94\uBFB0\uBFCC\uBFE8\uC004\uC020\uC03C\uC058\uC074\uC090\uC0AC\uC0C8\uC0E4\uC100\uC11C\uC138\uC154\uC170\uC18C\uC1A8\uC1C4\uC1E0\uC1FC\uC218\uC234\uC250\uC26C\uC288\uC2A4\uC2C0\uC2DC\uC2F8\uC314\uC330\uC34C\uC368\uC384\uC3A0\uC3BC\uC3D8\uC3F4\uC410\uC42C\uC448\uC464\uC480\uC49C\uC4B8\uC4D4\uC4F0\uC50C\uC528\uC544\uC560\uC57C\uC598\uC5B4\uC5D0\uC5EC\uC608\uC624\uC640\uC65C\uC678\uC694\uC6B0\uC6CC\uC6E8\uC704\uC720\uC73C\uC758\uC774\uC790\uC7AC\uC7C8\uC7E4\uC800\uC81C\uC838\uC854\uC870\uC88C\uC8A8\uC8C4\uC8E0\uC8FC\uC918\uC934\uC950\uC96C\uC988\uC9A4\uC9C0\uC9DC\uC9F8\uCA14\uCA30\uCA4C\uCA68\uCA84\uCAA0\uCABC\uCAD8\uCAF4\uCB10\uCB2C\uCB48\uCB64\uCB80\uCB9C\uCBB8\uCBD4\uCBF0\uCC0C\uCC28\uCC44\uCC60\uCC7C\uCC98\uCCB4\uCCD0\uCCEC\uCD08\uCD24\uCD40\uCD5C\uCD78\uCD94\uCDB0\uCDCC\uCDE8\uCE04\uCE20\uCE3C\uCE58\uCE74\uCE90\uCEAC\uCEC8\uCEE4\uCF00\uCF1C\uCF38\uCF54\uCF70\uCF8C\uCFA8\uCFC4\uCFE0\uCFFC\uD018\uD034\uD050\uD06C\uD088\uD0A4\uD0C0\uD0DC\uD0F8\uD114\uD130\uD14C\uD168\uD184\uD1A0\uD1BC\uD1D8\uD1F4\uD210\uD22C\uD248\uD264\uD280\uD29C\uD2B8\uD2D4\uD2F0\uD30C\uD328\uD344\uD360\uD37C\uD398\uD3B4\uD3D0\uD3EC\uD408\uD424\uD440\uD45C\uD478\uD494\uD4B0\uD4CC\uD4E8\uD504\uD520\uD53C\uD558\uD574\uD590\uD5AC\uD5C8\uD5E4\uD600\uD61C\uD638\uD654\uD670\uD68C\uD6A8\uD6C4\uD6E0\uD6FC\uD718\uD734\uD750\uD76C\uD788]$/,h6=/^[\uAC01-\uAC1B\uAC1D-\uAC37\uAC39-\uAC53\uAC55-\uAC6F\uAC71-\uAC8B\uAC8D-\uACA7\uACA9-\uACC3\uACC5-\uACDF\uACE1-\uACFB\uACFD-\uAD17\uAD19-\uAD33\uAD35-\uAD4F\uAD51-\uAD6B\uAD6D-\uAD87\uAD89-\uADA3\uADA5-\uADBF\uADC1-\uADDB\uADDD-\uADF7\uADF9-\uAE13\uAE15-\uAE2F\uAE31-\uAE4B\uAE4D-\uAE67\uAE69-\uAE83\uAE85-\uAE9F\uAEA1-\uAEBB\uAEBD-\uAED7\uAED9-\uAEF3\uAEF5-\uAF0F\uAF11-\uAF2B\uAF2D-\uAF47\uAF49-\uAF63\uAF65-\uAF7F\uAF81-\uAF9B\uAF9D-\uAFB7\uAFB9-\uAFD3\uAFD5-\uAFEF\uAFF1-\uB00B\uB00D-\uB027\uB029-\uB043\uB045-\uB05F\uB061-\uB07B\uB07D-\uB097\uB099-\uB0B3\uB0B5-\uB0CF\uB0D1-\uB0EB\uB0ED-\uB107\uB109-\uB123\uB125-\uB13F\uB141-\uB15B\uB15D-\uB177\uB179-\uB193\uB195-\uB1AF\uB1B1-\uB1CB\uB1CD-\uB1E7\uB1E9-\uB203\uB205-\uB21F\uB221-\uB23B\uB23D-\uB257\uB259-\uB273\uB275-\uB28F\uB291-\uB2AB\uB2AD-\uB2C7\uB2C9-\uB2E3\uB2E5-\uB2FF\uB301-\uB31B\uB31D-\uB337\uB339-\uB353\uB355-\uB36F\uB371-\uB38B\uB38D-\uB3A7\uB3A9-\uB3C3\uB3C5-\uB3DF\uB3E1-\uB3FB\uB3FD-\uB417\uB419-\uB433\uB435-\uB44F\uB451-\uB46B\uB46D-\uB487\uB489-\uB4A3\uB4A5-\uB4BF\uB4C1-\uB4DB\uB4DD-\uB4F7\uB4F9-\uB513\uB515-\uB52F\uB531-\uB54B\uB54D-\uB567\uB569-\uB583\uB585-\uB59F\uB5A1-\uB5BB\uB5BD-\uB5D7\uB5D9-\uB5F3\uB5F5-\uB60F\uB611-\uB62B\uB62D-\uB647\uB649-\uB663\uB665-\uB67F\uB681-\uB69B\uB69D-\uB6B7\uB6B9-\uB6D3\uB6D5-\uB6EF\uB6F1-\uB70B\uB70D-\uB727\uB729-\uB743\uB745-\uB75F\uB761-\uB77B\uB77D-\uB797\uB799-\uB7B3\uB7B5-\uB7CF\uB7D1-\uB7EB\uB7ED-\uB807\uB809-\uB823\uB825-\uB83F\uB841-\uB85B\uB85D-\uB877\uB879-\uB893\uB895-\uB8AF\uB8B1-\uB8CB\uB8CD-\uB8E7\uB8E9-\uB903\uB905-\uB91F\uB921-\uB93B\uB93D-\uB957\uB959-\uB973\uB975-\uB98F\uB991-\uB9AB\uB9AD-\uB9C7\uB9C9-\uB9E3\uB9E5-\uB9FF\uBA01-\uBA1B\uBA1D-\uBA37\uBA39-\uBA53\uBA55-\uBA6F\uBA71-\uBA8B\uBA8D-\uBAA7\uBAA9-\uBAC3\uBAC5-\uBADF\uBAE1-\uBAFB\uBAFD-\uBB17\uBB19-\uBB33\uBB35-\uBB4F\uBB51-\uBB6B\uBB6D-\uBB87\uBB89-\uBBA3\uBBA5-\uBBBF\uBBC1-\uBBDB\uBBDD-\uBBF7\uBBF9-\uBC13\uBC15-\uBC2F\uBC31-\uBC4B\uBC4D-\uBC67\uBC69-\uBC83\uBC85-\uBC9F\uBCA1-\uBCBB\uBCBD-\uBCD7\uBCD9-\uBCF3\uBCF5-\uBD0F\uBD11-\uBD2B\uBD2D-\uBD47\uBD49-\uBD63\uBD65-\uBD7F\uBD81-\uBD9B\uBD9D-\uBDB7\uBDB9-\uBDD3\uBDD5-\uBDEF\uBDF1-\uBE0B\uBE0D-\uBE27\uBE29-\uBE43\uBE45-\uBE5F\uBE61-\uBE7B\uBE7D-\uBE97\uBE99-\uBEB3\uBEB5-\uBECF\uBED1-\uBEEB\uBEED-\uBF07\uBF09-\uBF23\uBF25-\uBF3F\uBF41-\uBF5B\uBF5D-\uBF77\uBF79-\uBF93\uBF95-\uBFAF\uBFB1-\uBFCB\uBFCD-\uBFE7\uBFE9-\uC003\uC005-\uC01F\uC021-\uC03B\uC03D-\uC057\uC059-\uC073\uC075-\uC08F\uC091-\uC0AB\uC0AD-\uC0C7\uC0C9-\uC0E3\uC0E5-\uC0FF\uC101-\uC11B\uC11D-\uC137\uC139-\uC153\uC155-\uC16F\uC171-\uC18B\uC18D-\uC1A7\uC1A9-\uC1C3\uC1C5-\uC1DF\uC1E1-\uC1FB\uC1FD-\uC217\uC219-\uC233\uC235-\uC24F\uC251-\uC26B\uC26D-\uC287\uC289-\uC2A3\uC2A5-\uC2BF\uC2C1-\uC2DB\uC2DD-\uC2F7\uC2F9-\uC313\uC315-\uC32F\uC331-\uC34B\uC34D-\uC367\uC369-\uC383\uC385-\uC39F\uC3A1-\uC3BB\uC3BD-\uC3D7\uC3D9-\uC3F3\uC3F5-\uC40F\uC411-\uC42B\uC42D-\uC447\uC449-\uC463\uC465-\uC47F\uC481-\uC49B\uC49D-\uC4B7\uC4B9-\uC4D3\uC4D5-\uC4EF\uC4F1-\uC50B\uC50D-\uC527\uC529-\uC543\uC545-\uC55F\uC561-\uC57B\uC57D-\uC597\uC599-\uC5B3\uC5B5-\uC5CF\uC5D1-\uC5EB\uC5ED-\uC607\uC609-\uC623\uC625-\uC63F\uC641-\uC65B\uC65D-\uC677\uC679-\uC693\uC695-\uC6AF\uC6B1-\uC6CB\uC6CD-\uC6E7\uC6E9-\uC703\uC705-\uC71F\uC721-\uC73B\uC73D-\uC757\uC759-\uC773\uC775-\uC78F\uC791-\uC7AB\uC7AD-\uC7C7\uC7C9-\uC7E3\uC7E5-\uC7FF\uC801-\uC81B\uC81D-\uC837\uC839-\uC853\uC855-\uC86F\uC871-\uC88B\uC88D-\uC8A7\uC8A9-\uC8C3\uC8C5-\uC8DF\uC8E1-\uC8FB\uC8FD-\uC917\uC919-\uC933\uC935-\uC94F\uC951-\uC96B\uC96D-\uC987\uC989-\uC9A3\uC9A5-\uC9BF\uC9C1-\uC9DB\uC9DD-\uC9F7\uC9F9-\uCA13\uCA15-\uCA2F\uCA31-\uCA4B\uCA4D-\uCA67\uCA69-\uCA83\uCA85-\uCA9F\uCAA1-\uCABB\uCABD-\uCAD7\uCAD9-\uCAF3\uCAF5-\uCB0F\uCB11-\uCB2B\uCB2D-\uCB47\uCB49-\uCB63\uCB65-\uCB7F\uCB81-\uCB9B\uCB9D-\uCBB7\uCBB9-\uCBD3\uCBD5-\uCBEF\uCBF1-\uCC0B\uCC0D-\uCC27\uCC29-\uCC43\uCC45-\uCC5F\uCC61-\uCC7B\uCC7D-\uCC97\uCC99-\uCCB3\uCCB5-\uCCCF\uCCD1-\uCCEB\uCCED-\uCD07\uCD09-\uCD23\uCD25-\uCD3F\uCD41-\uCD5B\uCD5D-\uCD77\uCD79-\uCD93\uCD95-\uCDAF\uCDB1-\uCDCB\uCDCD-\uCDE7\uCDE9-\uCE03\uCE05-\uCE1F\uCE21-\uCE3B\uCE3D-\uCE57\uCE59-\uCE73\uCE75-\uCE8F\uCE91-\uCEAB\uCEAD-\uCEC7\uCEC9-\uCEE3\uCEE5-\uCEFF\uCF01-\uCF1B\uCF1D-\uCF37\uCF39-\uCF53\uCF55-\uCF6F\uCF71-\uCF8B\uCF8D-\uCFA7\uCFA9-\uCFC3\uCFC5-\uCFDF\uCFE1-\uCFFB\uCFFD-\uD017\uD019-\uD033\uD035-\uD04F\uD051-\uD06B\uD06D-\uD087\uD089-\uD0A3\uD0A5-\uD0BF\uD0C1-\uD0DB\uD0DD-\uD0F7\uD0F9-\uD113\uD115-\uD12F\uD131-\uD14B\uD14D-\uD167\uD169-\uD183\uD185-\uD19F\uD1A1-\uD1BB\uD1BD-\uD1D7\uD1D9-\uD1F3\uD1F5-\uD20F\uD211-\uD22B\uD22D-\uD247\uD249-\uD263\uD265-\uD27F\uD281-\uD29B\uD29D-\uD2B7\uD2B9-\uD2D3\uD2D5-\uD2EF\uD2F1-\uD30B\uD30D-\uD327\uD329-\uD343\uD345-\uD35F\uD361-\uD37B\uD37D-\uD397\uD399-\uD3B3\uD3B5-\uD3CF\uD3D1-\uD3EB\uD3ED-\uD407\uD409-\uD423\uD425-\uD43F\uD441-\uD45B\uD45D-\uD477\uD479-\uD493\uD495-\uD4AF\uD4B1-\uD4CB\uD4CD-\uD4E7\uD4E9-\uD503\uD505-\uD51F\uD521-\uD53B\uD53D-\uD557\uD559-\uD573\uD575-\uD58F\uD591-\uD5AB\uD5AD-\uD5C7\uD5C9-\uD5E3\uD5E5-\uD5FF\uD601-\uD61B\uD61D-\uD637\uD639-\uD653\uD655-\uD66F\uD671-\uD68B\uD68D-\uD6A7\uD6A9-\uD6C3\uD6C5-\uD6DF\uD6E1-\uD6FB\uD6FD-\uD717\uD719-\uD733\uD735-\uD74F\uD751-\uD76B\uD76D-\uD787\uD789-\uD7A3]$/,p6=/^(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])$/,m6=(e,t)=>{var r=Nt.Any;return e.search(i6)!==-1&&(r|=Nt.Extend),t===8205&&(r|=Nt.ZWJ),t>=127462&&t<=127487&&(r|=Nt.RI),e.search(s6)!==-1&&(r|=Nt.Prepend),e.search(l6)!==-1&&(r|=Nt.SpacingMark),e.search(u6)!==-1&&(r|=Nt.L),e.search(c6)!==-1&&(r|=Nt.V),e.search(d6)!==-1&&(r|=Nt.T),e.search(f6)!==-1&&(r|=Nt.LV),e.search(h6)!==-1&&(r|=Nt.LVT),e.search(p6)!==-1&&(r|=Nt.ExtPict),r};function Wo(e,t){return(e&t)!==0}var g6=[[Nt.L,Nt.L|Nt.V|Nt.LV|Nt.LVT],[Nt.LV|Nt.V,Nt.V|Nt.T],[Nt.LVT|Nt.T,Nt.T],[Nt.Any,Nt.Extend|Nt.ZWJ],[Nt.Any,Nt.SpacingMark],[Nt.Prepend,Nt.Any],[Nt.ZWJ,Nt.ExtPict],[Nt.RI,Nt.RI]];function v6(e,t){return g6.findIndex(r=>Wo(e,r[0])&&Wo(t,r[1]))===-1}var b6=/(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC01\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDE41\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4\uDF00\uDF01\uDF36-\uDF3A\uDF40\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])*\u200D$/,lf=e=>e.search(b6)!==-1,y6=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,x6=e=>{var t=e.match(y6);if(t===null)return!1;var r=t[0].length/2;return r%2===1},w6={delete(e,t){e.delete(t)},insertFragment(e,t,r){e.insertFragment(t,r)},insertText(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};P.withoutNormalizing(e,()=>{var{voids:n=!1}=r,{at:o=mu(e)}=r;if(re.isPath(o)&&(o=P.range(e,o)),Ne.isRange(o))if(Ne.isCollapsed(o))o=o.anchor;else{var i=Ne.end(o);if(!n&&P.void(e,{at:i}))return;var c=Ne.start(o),u=P.pointRef(e,c),f=P.pointRef(e,i);qe.delete(e,{at:o,voids:n});var d=u.unref(),p=f.unref();o=d||p,qe.setSelection(e,{anchor:o,focus:o})}if(!(!n&&P.void(e,{at:o})||P.elementReadOnly(e,{at:o}))){var{path:v,offset:g}=o;t.length>0&&e.apply({type:"insert_text",path:v,offset:g,text:t})}})}};function uf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function wi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?uf(Object(r),!0).forEach(function(n){rn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var qe=wi(wi(wi(wi({},jv),Lv),Hv),w6),Mi=new WeakMap,C6=e=>Mi.get(e)||!1,D6=(e,t,r)=>{var n=Mi.get(e)||!1;Mi.set(e,!0);try{t(),r()}finally{Mi.set(e,n)}};function lp(e,t,r){var n=rs.get(e)||[],o=ns.get(e)||new Set,i,c,u=v=>{if(v){var g=v.join(",");c.has(g)||(c.add(g),i.push(v))}};if(r){i=[],c=new Set;for(var f of n){var d=r(f);u(d)}}else i=n,c=o;for(var p of t)u(p);rs.set(e,i),ns.set(e,c)}var k6=(e,t)=>{for(var r of P.pathRefs(e))Mv.transform(r,t);for(var n of P.pointRefs(e))Rv.transform(n,t);for(var o of P.rangeRefs(e))Pv.transform(o,t);if(!C6(e)){var i=re.operationCanTransformPath(t)?c=>re.transform(c,t):void 0;lp(e,e.getDirtyPaths(t),i)}qe.transform(e,t),e.operations.push(t),P.normalize(e,{operation:t}),t.type==="set_selection"&&(e.marks=null),Oa.get(e)||(Oa.set(e,!0),Promise.resolve().then(()=>{Oa.set(e,!1),e.onChange({operation:t}),e.operations=[]}))},E6=(e,t)=>{switch(t.type){case"insert_text":case"remove_text":case"set_node":{var{path:r}=t;return re.levels(r)}case"insert_node":{var{node:n,path:o}=t,i=re.levels(o),c=ct.isText(n)?[]:Array.from(Qe.nodes(n),W=>{var[,H]=W;return o.concat(H)});return[...i,...c]}case"merge_node":{var{path:u}=t,f=re.ancestors(u),d=re.previous(u);return[...f,d]}case"move_node":{var{path:p,newPath:v}=t;if(re.equals(p,v))return[];var g=[],x=[];for(var w of re.ancestors(p)){var C=re.transform(w,t);g.push(C)}for(var m of re.ancestors(v)){var A=re.transform(m,t);x.push(A)}var S=x[x.length-1],D=v[v.length-1],$=S.concat(D);return[...g,...x,$]}case"remove_node":{var{path:F}=t,B=re.ancestors(F);return[...B]}case"split_node":{var{path:R}=t,I=re.levels(R),T=re.next(R);return[...I,T]}default:return[]}},S6=e=>{var{selection:t}=e;return t?Qe.fragment(e,t):[]},A6=(e,t)=>{var[r,n]=t;if(!ct.isText(r)){if(dt.isElement(r)&&r.children.length===0){var o={text:""};qe.insertNodes(e,o,{at:n.concat(0),voids:!0});return}for(var i=P.isEditor(r)?!1:dt.isElement(r)&&(e.isInline(r)||r.children.length===0||ct.isText(r.children[0])||e.isInline(r.children[0])),c=0,u=0;u<r.children.length;u++,c++){var f=Qe.get(e,n);if(!ct.isText(f)){var d=f.children[c],p=f.children[c-1],v=u===r.children.length-1,g=ct.isText(d)||dt.isElement(d)&&e.isInline(d);if(g!==i)qe.removeNodes(e,{at:n.concat(c),voids:!0}),c--;else if(dt.isElement(d)){if(e.isInline(d)){if(p==null||!ct.isText(p)){var x={text:""};qe.insertNodes(e,x,{at:n.concat(c),voids:!0}),c++}else if(v){var w={text:""};qe.insertNodes(e,w,{at:n.concat(c+1),voids:!0}),c++}}}else{if(!ct.isText(d)&&!("children"in d)){var C=d;C.children=[]}p!=null&&ct.isText(p)&&(ct.equals(d,p,{loose:!0})?(qe.mergeNodes(e,{at:n.concat(c),voids:!0}),c--):p.text===""?(qe.removeNodes(e,{at:n.concat(c-1),voids:!0}),c--):d.text===""&&(qe.removeNodes(e,{at:n.concat(c),voids:!0}),c--))}}}}},B6=(e,t)=>{var{iteration:r,initialDirtyPathsLength:n}=t,o=n*42;if(r>o)throw new Error("Could not completely normalize the editor after ".concat(o," iterations! This is usually due to incorrect normalization logic that leaves a node in an invalid state."));return!0},F6=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{voids:r=!1,mode:n="lowest",at:o=e.selection,match:i}=t;if(o){var c=P.path(e,o),u=n==="lowest";for(var[f,d]of P.levels(e,{at:c,voids:r,match:i,reverse:u}))if(!ct.isText(f)){if(Ne.isRange(o)){if(re.isAncestor(d,o.anchor.path)&&re.isAncestor(d,o.focus.path))return[f,d]}else if(!re.equals(c,d))return[f,d]}}};function cf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function df(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?cf(Object(r),!0).forEach(function(n){rn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var N6=(e,t,r)=>{var{selection:n}=e;if(n){var o=(v,g)=>{if(!ct.isText(v))return!1;var[x,w]=P.parent(e,g);return!e.isVoid(x)||e.markableVoid(x)},i=Ne.isExpanded(n),c=!1;if(!i){var[u,f]=P.node(e,n);if(u&&o(u,f)){var[d]=P.parent(e,f);c=d&&e.markableVoid(d)}}if(i||c)qe.setNodes(e,{[t]:r},{match:o,split:!0,voids:!0});else{var p=df(df({},P.marks(e)||{}),{},{[t]:r});e.marks=p,Oa.get(e)||e.onChange()}}};function ff(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function hf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ff(Object(r),!0).forEach(function(n){rn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ff(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var T6=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=P.point(e,t,{edge:"end"}),o=P.end(e,[]),i={anchor:n,focus:o},{distance:c=1}=r,u=0,f;for(var d of P.positions(e,hf(hf({},r),{},{at:i}))){if(u>c)break;u!==0&&(f=d),u++}return f};function pf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function mf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?pf(Object(r),!0).forEach(function(n){rn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var O6=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=P.start(e,[]),o=P.point(e,t,{edge:"start"}),i={anchor:n,focus:o},{distance:c=1}=r,u=0,f;for(var d of P.positions(e,mf(mf({},r),{},{at:i,reverse:!0}))){if(u>c)break;u!==0&&(f=d),u++}return f},$6=(e,t)=>{var{selection:r}=e;r&&Ne.isCollapsed(r)&&qe.delete(e,{unit:t,reverse:!0})},M6=(e,t)=>{var{selection:r}=e;r&&Ne.isCollapsed(r)&&qe.delete(e,{unit:t})},R6=function(e){var{direction:t="forward"}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:r}=e;r&&Ne.isExpanded(r)&&qe.delete(e,{reverse:t==="backward"})},P6=(e,t)=>[P.start(e,t),P.end(e,t)];function gf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function vf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?gf(Object(r),!0).forEach(function(n){rn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var z6=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return P.above(e,vf(vf({},t),{},{match:r=>dt.isElement(r)&&P.isElementReadOnly(e,r)}))},_6=(e,t)=>P.point(e,t,{edge:"end"}),I6=(e,t)=>{var r=P.path(e,t,{edge:"start"});return P.node(e,r)},j6=(e,t)=>{var r=P.range(e,t);return Qe.fragment(e,r)};function bf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function yf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?bf(Object(r),!0).forEach(function(n){rn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var L6=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return P.above(e,yf(yf({},t),{},{match:r=>dt.isElement(r)&&P.isVoid(e,r)}))},H6=(e,t)=>t.children.some(r=>dt.isElement(r)&&P.isBlock(e,r)),q6=(e,t)=>t.children.some(r=>ct.isText(r)||P.isInline(e,r)),K6=(e,t)=>Qe.has(e,t),W6=(e,t)=>t.children.every(r=>ct.isText(r)),V6=e=>{qe.splitNodes(e,{always:!0})},U6=(e,t,r)=>{qe.insertNodes(e,t,r)},X6=e=>{qe.splitNodes(e,{always:!0})};function xf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function G6(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xf(Object(r),!0).forEach(function(n){rn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Y6=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:n,marks:o}=e;if(n){if(o){var i=G6({text:t},o);qe.insertNodes(e,i,{at:r.at,voids:r.voids})}else qe.insertText(e,t,r);e.marks=null}},Z6=(e,t)=>!e.isInline(t),J6=(e,t,r)=>P.isStart(e,t,r)||P.isEnd(e,t,r),Q6=(e,t)=>{var{children:r}=t,[n]=r;return r.length===0||r.length===1&&ct.isText(n)&&n.text===""&&!e.isVoid(t)},e7=(e,t,r)=>{var n=P.end(e,r);return Lt.equals(t,n)},t7=e=>{var t=ip.get(e);return t===void 0?!0:t},r7=(e,t,r)=>{if(t.offset!==0)return!1;var n=P.start(e,r);return Lt.equals(t,n)},n7=(e,t)=>{var r=P.path(e,t,{edge:"end"});return P.node(e,r)},o7=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=P.path(e,t,r),o=Qe.leaf(e,n);return[o,n]};function a7(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){var{at:r=e.selection,reverse:n=!1,voids:o=!1}=t,{match:i}=t;if(i==null&&(i=()=>!0),!!r){var c=[],u=P.path(e,r);for(var[f,d]of Qe.levels(e,u))if(i(f,d)&&(c.push([f,d]),!o&&dt.isElement(f)&&P.isVoid(e,f)))break;n&&c.reverse(),yield*c}})()}var i7=["text"],s7=["text"],l7=function(e){var{marks:t,selection:r}=e;if(!r)return null;var{anchor:n,focus:o}=r;if(t)return t;if(Ne.isExpanded(r)){var i=P.isEnd(e,n,n.path);if(i){var c=P.after(e,n);c&&(n=c)}var[u]=P.nodes(e,{match:ct.isText,at:{anchor:n,focus:o}});if(u){var[f]=u,d=Yn(f,i7);return d}else return{}}var{path:p}=n,[v]=P.leaf(e,p);if(n.offset===0){var g=P.previous(e,{at:p,match:ct.isText}),x=P.above(e,{match:D=>dt.isElement(D)&&P.isVoid(e,D)&&e.markableVoid(D)});if(!x){var w=P.above(e,{match:D=>dt.isElement(D)&&P.isBlock(e,D)});if(g&&w){var[C,m]=g,[,A]=w;re.isAncestor(A,m)&&(v=C)}}}var S=Yn(v,s7);return S},u7=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:r="lowest",voids:n=!1}=t,{match:o,at:i=e.selection}=t;if(i){var c=P.after(e,i,{voids:n});if(c){var[,u]=P.last(e,[]),f=[c.path,u];if(re.isPath(i)&&i.length===0)throw new Error("Cannot get the next node from the root node!");if(o==null)if(re.isPath(i)){var[d]=P.parent(e,i);o=v=>d.children.includes(v)}else o=()=>!0;var[p]=P.nodes(e,{at:f,match:o,mode:r,voids:n});return p}}},c7=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=P.path(e,t,r),o=Qe.get(e,n);return[o,n]};function d7(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){var{at:r=e.selection,mode:n="all",universal:o=!1,reverse:i=!1,voids:c=!1,ignoreNonSelectable:u=!1}=t,{match:f}=t;if(f||(f=()=>!0),!!r){var d,p;if(Gv.isSpan(r))d=r[0],p=r[1];else{var v=P.path(e,r,{edge:"start"}),g=P.path(e,r,{edge:"end"});d=i?g:v,p=i?v:g}var x=Qe.nodes(e,{reverse:i,from:d,to:p,pass:$=>{var[F]=$;return dt.isElement(F)?!!(!c&&(P.isVoid(e,F)||P.isElementReadOnly(e,F))||u&&!P.isSelectable(e,F)):!1}}),w=[],C;for(var[m,A]of x)if(!(u&&dt.isElement(m)&&!P.isSelectable(e,m))){var S=C&&re.compare(A,C[1])===0;if(!(n==="highest"&&S)){if(!f(m,A)){if(o&&!S&&ct.isText(m))return;continue}if(n==="lowest"&&S){C=[m,A];continue}var D=n==="lowest"?C:[m,A];D&&(o?w.push(D):yield D),C=[m,A]}}n==="lowest"&&C&&(o?w.push(C):yield C),o&&(yield*w)}})()}var f7=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{force:r=!1,operation:n}=t,o=d=>rs.get(d)||[],i=d=>ns.get(d)||new Set,c=d=>{var p=o(d).pop(),v=p.join(",");return i(d).delete(v),p};if(P.isNormalizing(e)){if(r){var u=Array.from(Qe.nodes(e),d=>{var[,p]=d;return p}),f=new Set(u.map(d=>d.join(",")));rs.set(e,u),ns.set(e,f)}o(e).length!==0&&P.withoutNormalizing(e,()=>{for(var d of o(e))if(Qe.has(e,d)){var p=P.node(e,d),[v,g]=p;dt.isElement(v)&&v.children.length===0&&e.normalizeNode(p,{operation:n})}for(var x=o(e),w=x.length,C=0;x.length!==0;){if(!e.shouldNormalize({dirtyPaths:x,iteration:C,initialDirtyPathsLength:w,operation:n}))return;var m=c(e);if(Qe.has(e,m)){var A=P.node(e,m);e.normalizeNode(A,{operation:n})}C++,x=o(e)}})}},h7=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=P.path(e,t,r),o=re.parent(n),i=P.node(e,o);return i},p7=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:n="forward"}=r,o={current:t,affinity:n,unref(){var{current:c}=o,u=P.pathRefs(e);return u.delete(o),o.current=null,c}},i=P.pathRefs(e);return i.add(o),o},m7=e=>{var t=Xd.get(e);return t||(t=new Set,Xd.set(e,t)),t},g7=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{depth:n,edge:o}=r;if(re.isPath(t)){if(o==="start"){var[,i]=Qe.first(e,t);t=i}else if(o==="end"){var[,c]=Qe.last(e,t);t=c}}return Ne.isRange(t)&&(o==="start"?t=Ne.start(t):o==="end"?t=Ne.end(t):t=re.common(t.anchor.path,t.focus.path)),Lt.isPoint(t)&&(t=t.path),n!=null&&(t=t.slice(0,n)),t},v7=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:n="forward"}=r,o={current:t,affinity:n,unref(){var{current:c}=o,u=P.pointRefs(e);return u.delete(o),o.current=null,c}},i=P.pointRefs(e);return i.add(o),o},b7=e=>{var t=Gd.get(e);return t||(t=new Set,Gd.set(e,t)),t},y7=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{edge:n="start"}=r;if(re.isPath(t)){var o;if(n==="end"){var[,i]=Qe.last(e,t);o=i}else{var[,c]=Qe.first(e,t);o=c}var u=Qe.get(e,o);if(!ct.isText(u))throw new Error("Cannot get the ".concat(n," point in the node at path [").concat(t,"] because it has no ").concat(n," text node."));return{path:o,offset:n==="end"?u.text.length:0}}if(Ne.isRange(t)){var[f,d]=Ne.edges(t);return n==="start"?f:d}return t};function x7(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){var{at:r=e.selection,unit:n="offset",reverse:o=!1,voids:i=!1,ignoreNonSelectable:c=!1}=t;if(!r)return;var u=P.range(e,r),[f,d]=Ne.edges(u),p=o?d:f,v=!1,g="",x=0,w=0,C=0;for(var[m,A]of P.nodes(e,{at:r,reverse:o,voids:i,ignoreNonSelectable:c})){if(dt.isElement(m)){if(!i&&(e.isVoid(m)||e.isElementReadOnly(m))){yield P.start(e,A);continue}if(e.isInline(m))continue;if(P.hasInlines(e,m)){var S=re.isAncestor(A,d.path)?d:P.end(e,A),D=re.isAncestor(A,f.path)?f:P.start(e,A);g=P.string(e,{anchor:D,focus:S},{voids:i}),v=!0}}if(ct.isText(m)){var $=re.equals(A,p.path);for($?(w=o?p.offset:m.text.length-p.offset,C=p.offset):(w=m.text.length,C=o?w:0),($||v||n==="offset")&&(yield{path:A,offset:C},v=!1);;){if(x===0){if(g==="")break;x=F(g,n,o),g=vu(g,x,o)[1]}if(C=o?C-x:C+x,w=w-x,w<0){x=-w;break}x=0,yield{path:A,offset:C}}}}function F(B,R,I){return R==="character"?gu(B,I):R==="word"?t6(B,I):R==="line"||R==="block"?B.length:1}})()}var w7=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:r="lowest",voids:n=!1}=t,{match:o,at:i=e.selection}=t;if(i){var c=P.before(e,i,{voids:n});if(c){var[,u]=P.first(e,[]),f=[c.path,u];if(re.isPath(i)&&i.length===0)throw new Error("Cannot get the previous node from the root node!");if(o==null)if(re.isPath(i)){var[d]=P.parent(e,i);o=v=>d.children.includes(v)}else o=()=>!0;var[p]=P.nodes(e,{reverse:!0,at:f,match:o,mode:r,voids:n});return p}}},C7=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:n="forward"}=r,o={current:t,affinity:n,unref(){var{current:c}=o,u=P.rangeRefs(e);return u.delete(o),o.current=null,c}},i=P.rangeRefs(e);return i.add(o),o},D7=e=>{var t=Yd.get(e);return t||(t=new Set,Yd.set(e,t)),t},k7=(e,t,r)=>{if(Ne.isRange(t)&&!r)return t;var n=P.start(e,t),o=P.end(e,r||t);return{anchor:n,focus:o}};function wf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function E7(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?wf(Object(r),!0).forEach(function(n){rn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var S7=(e,t)=>{var{selection:r}=e;if(r){var n=(p,v)=>{if(!ct.isText(p))return!1;var[g,x]=P.parent(e,v);return!e.isVoid(g)||e.markableVoid(g)},o=Ne.isExpanded(r),i=!1;if(!o){var[c,u]=P.node(e,r);if(c&&n(c,u)){var[f]=P.parent(e,u);i=f&&e.markableVoid(f)}}if(o||i)qe.unsetNodes(e,t,{match:n,split:!0,voids:!0});else{var d=E7({},P.marks(e)||{});delete d[t],e.marks=d,Oa.get(e)||e.onChange()}}},A7=(e,t)=>{ip.set(e,t)},B7=(e,t)=>P.point(e,t,{edge:"start"}),F7=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:n=!1}=r,o=P.range(e,t),[i,c]=Ne.edges(o),u="";for(var[f,d]of P.nodes(e,{at:o,match:ct.isText,voids:n})){var p=f.text;re.equals(d,c.path)&&(p=p.slice(0,c.offset)),re.equals(d,i.path)&&(p=p.slice(i.offset)),u+=p}return u},N7=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:n=!1}=r,[o,i]=Ne.edges(t);if(o.offset!==0||i.offset!==0||Ne.isCollapsed(t)||re.hasPrevious(i.path))return t;var c=P.above(e,{at:i,match:x=>dt.isElement(x)&&P.isBlock(e,x),voids:n}),u=c?c[1]:[],f=P.start(e,o),d={anchor:f,focus:i},p=!0;for(var[v,g]of P.nodes(e,{at:d,match:ct.isText,reverse:!0,voids:n})){if(p){p=!1;continue}if(v.text!==""||re.isBefore(g,u)){i={path:g,offset:v.text.length};break}}return{anchor:o,focus:i}},T7=(e,t)=>{var r=P.isNormalizing(e);P.setNormalizing(e,!1);try{t()}finally{P.setNormalizing(e,r)}P.normalize(e)},O7=(e,t,r)=>{var[n,o]=t;return dt.isElement(n)&&P.isEmpty(e,n)||ct.isText(n)&&n.text===""&&o[o.length-1]!==0},$7=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};P.withoutNormalizing(e,()=>{var r,n,{reverse:o=!1,unit:i="character",distance:c=1,voids:u=!1}=t,{at:f=e.selection,hanging:d=!1}=t;if(f){var p=!1;if(Ne.isRange(f)&&Ne.isCollapsed(f)&&(p=!0,f=f.anchor),Lt.isPoint(f)){var v=P.void(e,{at:f,mode:"highest"});if(!u&&v){var[,g]=v;f=g}else{var x={unit:i,distance:c},w=o?P.before(e,f,x)||P.start(e,[]):P.after(e,f,x)||P.end(e,[]);f={anchor:f,focus:w},d=!0}}if(re.isPath(f)){qe.removeNodes(e,{at:f,voids:u});return}if(!Ne.isCollapsed(f)){if(!d){var[,C]=Ne.edges(f),m=P.end(e,[]);Lt.equals(C,m)||(f=P.unhangRange(e,f,{voids:u}))}var[A,S]=Ne.edges(f),D=P.above(e,{match:Ce=>dt.isElement(Ce)&&P.isBlock(e,Ce),at:A,voids:u}),$=P.above(e,{match:Ce=>dt.isElement(Ce)&&P.isBlock(e,Ce),at:S,voids:u}),F=D&&$&&!re.equals(D[1],$[1]),B=re.equals(A.path,S.path),R=u?null:(r=P.void(e,{at:A,mode:"highest"}))!==null&&r!==void 0?r:P.elementReadOnly(e,{at:A,mode:"highest"}),I=u?null:(n=P.void(e,{at:S,mode:"highest"}))!==null&&n!==void 0?n:P.elementReadOnly(e,{at:S,mode:"highest"});if(R){var T=P.before(e,A);T&&D&&re.isAncestor(D[1],T.path)&&(A=T)}if(I){var W=P.after(e,S);W&&$&&re.isAncestor($[1],W.path)&&(S=W)}var H=[],Z;for(var Y of P.nodes(e,{at:f,voids:u})){var[j,K]=Y;Z&&re.compare(K,Z)===0||(!u&&dt.isElement(j)&&(P.isVoid(e,j)||P.isElementReadOnly(e,j))||!re.isCommon(K,A.path)&&!re.isCommon(K,S.path))&&(H.push(Y),Z=K)}var U=Array.from(H,Ce=>{var[,ke]=Ce;return P.pathRef(e,ke)}),G=P.pointRef(e,A),J=P.pointRef(e,S),z="";if(!B&&!R){var ie=G.current,[ge]=P.leaf(e,ie),{path:xe}=ie,{offset:Ae}=A,Fe=ge.text.slice(Ae);Fe.length>0&&(e.apply({type:"remove_text",path:xe,offset:Ae,text:Fe}),z=Fe)}if(U.reverse().map(Ce=>Ce.unref()).filter(Ce=>Ce!==null).forEach(Ce=>qe.removeNodes(e,{at:Ce,voids:u})),!I){var be=J.current,[X]=P.leaf(e,be),{path:fe}=be,ce=B?A.offset:0,se=X.text.slice(ce,S.offset);se.length>0&&(e.apply({type:"remove_text",path:fe,offset:ce,text:se}),z=se)}!B&&F&&J.current&&G.current&&qe.mergeNodes(e,{at:J.current,hanging:!0,voids:u}),p&&o&&i==="character"&&z.length>1&&z.match(/[\u0E00-\u0E7F]+/)&&qe.insertText(e,z.slice(0,z.length-c));var oe=G.unref(),he=J.unref(),we=o?oe||he:he||oe;t.at==null&&we&&qe.select(e,we)}}})},M7=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};P.withoutNormalizing(e,()=>{var{hanging:n=!1,voids:o=!1}=r,{at:i=mu(e),batchDirty:c=!0}=r;if(t.length){if(Ne.isRange(i))if(n||(i=P.unhangRange(e,i,{voids:o})),Ne.isCollapsed(i))i=i.anchor;else{var[,u]=Ne.edges(i);if(!o&&P.void(e,{at:u}))return;var f=P.pointRef(e,u);qe.delete(e,{at:i}),i=f.unref()}else re.isPath(i)&&(i=P.start(e,i));if(!(!o&&P.void(e,{at:i}))){var d=P.above(e,{at:i,match:Fe=>dt.isElement(Fe)&&P.isInline(e,Fe),mode:"highest",voids:o});if(d){var[,p]=d;if(P.isEnd(e,i,p)){var v=P.after(e,p);i=v}else if(P.isStart(e,i,p)){var g=P.before(e,p);i=g}}var x=P.above(e,{match:Fe=>dt.isElement(Fe)&&P.isBlock(e,Fe),at:i,voids:o}),[,w]=x,C=P.isStart(e,i,w),m=P.isEnd(e,i,w),A=C&&m,S=!C||C&&m,D=!m,[,$]=Qe.first({children:t},[]),[,F]=Qe.last({children:t},[]),B=[],R=Fe=>{var[be,X]=Fe,fe=X.length===0;return fe?!1:A?!0:!(S&&re.isAncestor(X,$)&&dt.isElement(be)&&!e.isVoid(be)&&!e.isInline(be)||D&&re.isAncestor(X,F)&&dt.isElement(be)&&!e.isVoid(be)&&!e.isInline(be))};for(var I of Qe.nodes({children:t},{pass:R}))R(I)&&B.push(I);var T=[],W=[],H=[],Z=!0,Y=!1;for(var[j]of B)dt.isElement(j)&&!e.isInline(j)?(Z=!1,Y=!0,W.push(j)):Z?T.push(j):H.push(j);var[K]=P.nodes(e,{at:i,match:Fe=>ct.isText(Fe)||P.isInline(e,Fe),mode:"highest",voids:o}),[,U]=K,G=P.isStart(e,i,U),J=P.isEnd(e,i,U),z=P.pathRef(e,m&&!H.length?re.next(w):w),ie=P.pathRef(e,J?re.next(U):U);qe.splitNodes(e,{at:i,match:Fe=>Y?dt.isElement(Fe)&&P.isBlock(e,Fe):ct.isText(Fe)||P.isInline(e,Fe),mode:Y?"lowest":"highest",always:Y&&(!C||T.length>0)&&(!m||H.length>0),voids:o});var ge=P.pathRef(e,!G||G&&J?re.next(U):U);if(qe.insertNodes(e,T,{at:ge.current,match:Fe=>ct.isText(Fe)||P.isInline(e,Fe),mode:"highest",voids:o,batchDirty:c}),A&&!T.length&&W.length&&!H.length&&qe.delete(e,{at:w,voids:o}),qe.insertNodes(e,W,{at:z.current,match:Fe=>dt.isElement(Fe)&&P.isBlock(e,Fe),mode:"lowest",voids:o,batchDirty:c}),qe.insertNodes(e,H,{at:ie.current,match:Fe=>ct.isText(Fe)||P.isInline(e,Fe),mode:"highest",voids:o,batchDirty:c}),!r.at){var xe;if(H.length>0&&ie.current?xe=re.previous(ie.current):W.length>0&&z.current?xe=re.previous(z.current):ge.current&&(xe=re.previous(ge.current)),xe){var Ae=P.end(e,xe);qe.select(e,Ae)}}ge.unref(),z.unref(),ie.unref()}}})},R7=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{edge:r="anchor"}=t,{selection:n}=e;if(n){if(r==="anchor")qe.select(e,n.anchor);else if(r==="focus")qe.select(e,n.focus);else if(r==="start"){var[o]=Ne.edges(n);qe.select(e,o)}else if(r==="end"){var[,i]=Ne.edges(n);qe.select(e,i)}}else return},P7=e=>{var{selection:t}=e;t&&e.apply({type:"set_selection",properties:t,newProperties:null})},z7=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:r}=e,{distance:n=1,unit:o="character",reverse:i=!1}=t,{edge:c=null}=t;if(r){c==="start"&&(c=Ne.isBackward(r)?"focus":"anchor"),c==="end"&&(c=Ne.isBackward(r)?"anchor":"focus");var{anchor:u,focus:f}=r,d={distance:n,unit:o,ignoreNonSelectable:!0},p={};if(c==null||c==="anchor"){var v=i?P.before(e,u,d):P.after(e,u,d);v&&(p.anchor=v)}if(c==null||c==="focus"){var g=i?P.before(e,f,d):P.after(e,f,d);g&&(p.focus=g)}qe.setSelection(e,p)}},_7=(e,t)=>{var{selection:r}=e;if(t=P.range(e,t),r){qe.setSelection(e,t);return}if(!Ne.isRange(t))throw new Error("When setting the selection and the current selection is `null` you must provide at least an `anchor` and `focus`, but you passed: ".concat(Hr.stringify(t)));e.apply({type:"set_selection",properties:r,newProperties:t})};function Cf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Df(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Cf(Object(r),!0).forEach(function(n){rn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Cf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var I7=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:n}=e,{edge:o="both"}=r;if(n){o==="start"&&(o=Ne.isBackward(n)?"focus":"anchor"),o==="end"&&(o=Ne.isBackward(n)?"anchor":"focus");var{anchor:i,focus:c}=n,u=o==="anchor"?i:c;qe.setSelection(e,{[o==="anchor"?"anchor":"focus"]:Df(Df({},u),t)})}},j7=(e,t)=>{var{selection:r}=e,n={},o={};if(r){for(var i in t)(i==="anchor"&&t.anchor!=null&&!Lt.equals(t.anchor,r.anchor)||i==="focus"&&t.focus!=null&&!Lt.equals(t.focus,r.focus)||i!=="anchor"&&i!=="focus"&&t[i]!==r[i])&&(n[i]=r[i],o[i]=t[i]);Object.keys(n).length>0&&e.apply({type:"set_selection",properties:n,newProperties:o})}},L7=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};P.withoutNormalizing(e,()=>{var{hanging:n=!1,voids:o=!1,mode:i="lowest",batchDirty:c=!0}=r,{at:u,match:f,select:d}=r;if(Qe.isNode(t)&&(t=[t]),t.length!==0){var[p]=t;if(u||(u=mu(e),d!==!1&&(d=!0)),d==null&&(d=!1),Ne.isRange(u))if(n||(u=P.unhangRange(e,u,{voids:o})),Ne.isCollapsed(u))u=u.anchor;else{var[,v]=Ne.edges(u),g=P.pointRef(e,v);qe.delete(e,{at:u}),u=g.unref()}if(Lt.isPoint(u)){f==null&&(ct.isText(p)?f=T=>ct.isText(T):e.isInline(p)?f=T=>ct.isText(T)||P.isInline(e,T):f=T=>dt.isElement(T)&&P.isBlock(e,T));var[x]=P.nodes(e,{at:u.path,match:f,mode:i,voids:o});if(x){var[,w]=x,C=P.pathRef(e,w),m=P.isEnd(e,u,w);qe.splitNodes(e,{at:u,match:f,mode:i,voids:o});var A=C.unref();u=m?re.next(A):A}else return}var S=re.parent(u),D=u[u.length-1];if(!(!o&&P.void(e,{at:S}))){if(c){var $=[],F=re.levels(S);D6(e,()=>{var T=function(){var H=S.concat(D);D++;var Z={type:"insert_node",path:H,node:W};e.apply(Z),u=re.next(u),$.push(Z),ct.isText?F.push(...Array.from(Qe.nodes(W),Y=>{var[,j]=Y;return H.concat(j)})):F.push(H)};for(var W of t)T()},()=>{lp(e,F,T=>{var W=T;for(var H of $)if(re.operationCanTransformPath(H)&&(W=re.transform(W,H),!W))return null;return W})})}else for(var B of t){var R=S.concat(D);D++,e.apply({type:"insert_node",path:R,node:B}),u=re.next(u)}if(u=re.previous(u),d){var I=P.end(e,u);I&&qe.select(e,I)}}}})},H7=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};P.withoutNormalizing(e,()=>{var{at:r=e.selection,mode:n="lowest",voids:o=!1}=t,{match:i}=t;if(i==null&&(i=re.isPath(r)?pa(e,r):D=>dt.isElement(D)&&P.isBlock(e,D)),!!r){var c=P.nodes(e,{at:r,match:i,mode:n,voids:o}),u=Array.from(c,D=>{var[,$]=D;return P.pathRef(e,$)});for(var f of u){var d=f.unref();if(d.length<2)throw new Error("Cannot lift node at a path [".concat(d,"] because it has a depth of less than `2`."));var p=P.node(e,re.parent(d)),[v,g]=p,x=d[d.length-1],{length:w}=v.children;if(w===1){var C=re.next(g);qe.moveNodes(e,{at:d,to:C,voids:o}),qe.removeNodes(e,{at:g,voids:o})}else if(x===0)qe.moveNodes(e,{at:d,to:g,voids:o});else if(x===w-1){var m=re.next(g);qe.moveNodes(e,{at:d,to:m,voids:o})}else{var A=re.next(d),S=re.next(g);qe.splitNodes(e,{at:A,voids:o}),qe.moveNodes(e,{at:d,to:S,voids:o})}}}})},q7=["text"],K7=["children"],up=(e,t)=>{if(dt.isElement(t)){var r=t;return P.isVoid(e,t)?!0:r.children.length===1?up(e,r.children[0]):!1}else return!P.isEditor(t)},W7=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};P.withoutNormalizing(e,()=>{var{match:r,at:n=e.selection}=t,{hanging:o=!1,voids:i=!1,mode:c="lowest"}=t;if(n){if(r==null)if(re.isPath(n)){var[u]=P.parent(e,n);r=T=>u.children.includes(T)}else r=T=>dt.isElement(T)&&P.isBlock(e,T);if(!o&&Ne.isRange(n)&&(n=P.unhangRange(e,n,{voids:i})),Ne.isRange(n))if(Ne.isCollapsed(n))n=n.anchor;else{var[,f]=Ne.edges(n),d=P.pointRef(e,f);qe.delete(e,{at:n}),n=d.unref(),t.at==null&&qe.select(e,n)}var[p]=P.nodes(e,{at:n,match:r,voids:i,mode:c}),v=P.previous(e,{at:n,match:r,voids:i,mode:c});if(!(!p||!v)){var[g,x]=p,[w,C]=v;if(!(x.length===0||C.length===0)){var m=re.next(C),A=re.common(x,C),S=re.isSibling(x,C),D=Array.from(P.levels(e,{at:x}),T=>{var[W]=T;return W}).slice(A.length).slice(0,-1),$=P.above(e,{at:x,mode:"highest",match:T=>D.includes(T)&&up(e,T)}),F=$&&P.pathRef(e,$[1]),B,R;if(ct.isText(g)&&ct.isText(w)){var I=Yn(g,q7);R=w.text.length,B=I}else if(dt.isElement(g)&&dt.isElement(w)){var I=Yn(g,K7);R=w.children.length,B=I}else throw new Error("Cannot merge the node at path [".concat(x,"] with the previous sibling because it is not the same kind: ").concat(Hr.stringify(g)," ").concat(Hr.stringify(w)));S||qe.moveNodes(e,{at:x,to:m,voids:i}),F&&qe.removeNodes(e,{at:F.current,voids:i}),P.shouldMergeNodesRemovePrevNode(e,v,p)?qe.removeNodes(e,{at:C,voids:i}):e.apply({type:"merge_node",path:m,position:R,properties:B}),F&&F.unref()}}}})},V7=(e,t)=>{P.withoutNormalizing(e,()=>{var{to:r,at:n=e.selection,mode:o="lowest",voids:i=!1}=t,{match:c}=t;if(n){c==null&&(c=re.isPath(n)?pa(e,n):x=>dt.isElement(x)&&P.isBlock(e,x));var u=P.pathRef(e,r),f=P.nodes(e,{at:n,match:c,mode:o,voids:i}),d=Array.from(f,x=>{var[,w]=x;return P.pathRef(e,w)});for(var p of d){var v=p.unref(),g=u.current;v.length!==0&&e.apply({type:"move_node",path:v,newPath:g}),u.current&&re.isSibling(g,v)&&re.isAfter(g,v)&&(u.current=re.next(u.current))}u.unref()}})},U7=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};P.withoutNormalizing(e,()=>{var{hanging:r=!1,voids:n=!1,mode:o="lowest"}=t,{at:i=e.selection,match:c}=t;if(i){c==null&&(c=re.isPath(i)?pa(e,i):g=>dt.isElement(g)&&P.isBlock(e,g)),!r&&Ne.isRange(i)&&(i=P.unhangRange(e,i,{voids:n}));var u=P.nodes(e,{at:i,match:c,mode:o,voids:n}),f=Array.from(u,g=>{var[,x]=g;return P.pathRef(e,x)});for(var d of f){var p=d.unref();if(p){var[v]=P.node(e,p);e.apply({type:"remove_node",path:p,node:v})}}}})},X7=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};P.withoutNormalizing(e,()=>{var{match:n,at:o=e.selection,compare:i,merge:c}=r,{hanging:u=!1,mode:f="lowest",split:d=!1,voids:p=!1}=r;if(o){if(n==null&&(n=re.isPath(o)?pa(e,o):R=>dt.isElement(R)&&P.isBlock(e,R)),!u&&Ne.isRange(o)&&(o=P.unhangRange(e,o,{voids:p})),d&&Ne.isRange(o)){if(Ne.isCollapsed(o)&&P.leaf(e,o.anchor)[0].text.length>0)return;var v=P.rangeRef(e,o,{affinity:"inward"}),[g,x]=Ne.edges(o),w=f==="lowest"?"lowest":"highest",C=P.isEnd(e,x,x.path);qe.splitNodes(e,{at:x,match:n,mode:w,voids:p,always:!C});var m=P.isStart(e,g,g.path);qe.splitNodes(e,{at:g,match:n,mode:w,voids:p,always:!m}),o=v.unref(),r.at==null&&qe.select(e,o)}i||(i=(R,I)=>R!==I);for(var[A,S]of P.nodes(e,{at:o,match:n,mode:f,voids:p})){var D={},$={};if(S.length!==0){var F=!1;for(var B in t)B==="children"||B==="text"||i(t[B],A[B])&&(F=!0,A.hasOwnProperty(B)&&(D[B]=A[B]),c?t[B]!=null&&($[B]=c(A[B],t[B])):t[B]!=null&&($[B]=t[B]));F&&e.apply({type:"set_node",path:S,properties:D,newProperties:$})}}}})},G7=(e,t)=>{if(Ne.isCollapsed(t))return t.anchor;var[,r]=Ne.edges(t),n=P.pointRef(e,r);return qe.delete(e,{at:t}),n.unref()},Y7=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};P.withoutNormalizing(e,()=>{var{mode:r="lowest",voids:n=!1}=t,{match:o,at:i=e.selection,height:c=0,always:u=!1}=t;if(o==null&&(o=J=>dt.isElement(J)&&P.isBlock(e,J)),Ne.isRange(i)&&(i=G7(e,i)),re.isPath(i)){var f=i,d=P.point(e,f),[p]=P.parent(e,f);o=J=>J===p,c=d.path.length-f.length+1,i=d,u=!0}if(i){var v=P.pointRef(e,i,{affinity:"backward"}),g;try{var[x]=P.nodes(e,{at:i,match:o,mode:r,voids:n});if(!x)return;var w=P.void(e,{at:i,mode:"highest"}),C=0;if(!n&&w){var[m,A]=w;if(dt.isElement(m)&&e.isInline(m)){var S=P.after(e,A);if(!S){var D={text:""},$=re.next(A);qe.insertNodes(e,D,{at:$,voids:n}),S=P.point(e,$)}i=S,u=!0}var F=i.path.length-A.length;c=F+1,u=!0}g=P.pointRef(e,i);var B=i.path.length-c,[,R]=x,I=i.path.slice(0,B),T=c===0?i.offset:i.path[B]+C;for(var[W,H]of P.levels(e,{at:I,reverse:!0,voids:n})){var Z=!1;if(H.length<R.length||H.length===0||!n&&dt.isElement(W)&&P.isVoid(e,W))break;var Y=v.current,j=P.isEnd(e,Y,H);if(u||!v||!P.isEdge(e,Y,H)){Z=!0;var K=Qe.extractProps(W);e.apply({type:"split_node",path:H,position:T,properties:K})}T=H[H.length-1]+(Z||j?1:0)}if(t.at==null){var U=g.current||P.end(e,[]);qe.select(e,U)}}finally{var G;v.unref(),(G=g)===null||G===void 0||G.unref()}}})},Z7=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Array.isArray(t)||(t=[t]);var n={};for(var o of t)n[o]=null;qe.setNodes(e,n,r)},J7=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};P.withoutNormalizing(e,()=>{var{mode:r="lowest",split:n=!1,voids:o=!1}=t,{at:i=e.selection,match:c}=t;if(i){c==null&&(c=re.isPath(i)?pa(e,i):g=>dt.isElement(g)&&P.isBlock(e,g)),re.isPath(i)&&(i=P.range(e,i));var u=Ne.isRange(i)?P.rangeRef(e,i):null,f=P.nodes(e,{at:i,match:c,mode:r,voids:o}),d=Array.from(f,g=>{var[,x]=g;return P.pathRef(e,x)}).reverse(),p=function(){var g=v.unref(),[x]=P.node(e,g),w=P.range(e,g);n&&u&&(w=Ne.intersection(u.current,w)),qe.liftNodes(e,{at:w,match:C=>dt.isAncestor(x)&&x.children.includes(C),voids:o})};for(var v of d)p();u&&u.unref()}})};function kf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Ef(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kf(Object(r),!0).forEach(function(n){rn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Q7=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};P.withoutNormalizing(e,()=>{var{mode:n="lowest",split:o=!1,voids:i=!1}=r,{match:c,at:u=e.selection}=r;if(u){if(c==null&&(re.isPath(u)?c=pa(e,u):e.isInline(t)?c=w=>dt.isElement(w)&&P.isInline(e,w)||ct.isText(w):c=w=>dt.isElement(w)&&P.isBlock(e,w)),o&&Ne.isRange(u)){var[f,d]=Ne.edges(u),p=P.rangeRef(e,u,{affinity:"inward"});qe.splitNodes(e,{at:d,match:c,voids:i}),qe.splitNodes(e,{at:f,match:c,voids:i}),u=p.unref(),r.at==null&&qe.select(e,u)}var v=Array.from(P.nodes(e,{at:u,match:e.isInline(t)?w=>dt.isElement(w)&&P.isBlock(e,w):w=>P.isEditor(w),mode:"lowest",voids:i})),g=function(){var w=Ne.isRange(u)?Ne.intersection(u,P.range(e,x)):u;if(!w)return 0;var C=Array.from(P.nodes(e,{at:w,match:c,mode:n,voids:i}));if(C.length>0){var[m]=C,A=C[C.length-1],[,S]=m,[,D]=A;if(S.length===0&&D.length===0)return 0;var $=re.equals(S,D)?re.parent(S):re.common(S,D),F=P.range(e,S,D),B=P.node(e,$),[R]=B,I=$.length+1,T=re.next(D.slice(0,I)),W=Ef(Ef({},t),{},{children:[]});qe.insertNodes(e,W,{at:T,voids:i}),qe.moveNodes(e,{at:F,match:H=>dt.isAncestor(R)&&R.children.includes(H),to:T.concat(0),voids:i})}};for(var[,x]of v)g()}})},e8=()=>{var e={children:[],operations:[],selection:null,marks:null,isElementReadOnly:()=>!1,isInline:()=>!1,isSelectable:()=>!0,isVoid:()=>!1,markableVoid:()=>!1,onChange:()=>{},apply:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return k6(e,...r)},addMark:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return N6(e,...r)},deleteBackward:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return $6(e,...r)},deleteForward:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return M6(e,...r)},deleteFragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return R6(e,...r)},getFragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S6(e,...r)},insertBreak:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return V6(e,...r)},insertSoftBreak:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return X6(e,...r)},insertFragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return M7(e,...r)},insertNode:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return U6(e,...r)},insertText:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Y6(e,...r)},normalizeNode:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return A6(e,...r)},removeMark:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S7(e,...r)},getDirtyPaths:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return E6(e,...r)},shouldNormalize:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return B6(e,...r)},above:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return F6(e,...r)},after:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return T6(e,...r)},before:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return O6(e,...r)},collapse:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return R7(e,...r)},delete:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return $7(e,...r)},deselect:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return P7(e,...r)},edges:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return P6(e,...r)},elementReadOnly:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return z6(e,...r)},end:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return _6(e,...r)},first:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return I6(e,...r)},fragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return j6(e,...r)},getMarks:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return l7(e,...r)},hasBlocks:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return H6(e,...r)},hasInlines:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return q6(e,...r)},hasPath:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return K6(e,...r)},hasTexts:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return W6(e,...r)},insertNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return L7(e,...r)},isBlock:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Z6(e,...r)},isEdge:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return J6(e,...r)},isEmpty:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Q6(e,...r)},isEnd:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return e7(e,...r)},isNormalizing:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return t7(e,...r)},isStart:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return r7(e,...r)},last:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return n7(e,...r)},leaf:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return o7(e,...r)},levels:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return a7(e,...r)},liftNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return H7(e,...r)},mergeNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return W7(e,...r)},move:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return z7(e,...r)},moveNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return V7(e,...r)},next:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return u7(e,...r)},node:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return c7(e,...r)},nodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return d7(e,...r)},normalize:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return f7(e,...r)},parent:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return h7(e,...r)},path:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return g7(e,...r)},pathRef:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return p7(e,...r)},pathRefs:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return m7(e,...r)},point:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return y7(e,...r)},pointRef:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return v7(e,...r)},pointRefs:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return b7(e,...r)},positions:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return x7(e,...r)},previous:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return w7(e,...r)},range:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return k7(e,...r)},rangeRef:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return C7(e,...r)},rangeRefs:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return D7(e,...r)},removeNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return U7(e,...r)},select:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return _7(e,...r)},setNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return X7(e,...r)},setNormalizing:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return A7(e,...r)},setPoint:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return I7(e,...r)},setSelection:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return j7(e,...r)},splitNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Y7(e,...r)},start:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return B7(e,...r)},string:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return F7(e,...r)},unhangRange:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return N7(e,...r)},unsetNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Z7(e,...r)},unwrapNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return J7(e,...r)},void:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return L6(e,...r)},withoutNormalizing:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return T7(e,...r)},wrapNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Q7(e,...r)},shouldMergeNodesRemovePrevNode:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return O7(e,...r)}};return e},vl,Sf;function t8(){if(Sf)return vl;Sf=1,vl=o;var e="\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC",t="A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u0300-\u0590\u0800-\u1FFF\u200E\u2C00-\uFB1C\uFE00-\uFE6F\uFEFD-\uFFFF",r=new RegExp("^[^"+t+"]*["+e+"]"),n=new RegExp("^[^"+e+"]*["+t+"]");function o(i){return i=String(i||""),r.test(i)?"rtl":n.test(i)?"ltr":"neutral"}return vl}var r8=t8();const cp=ri(r8);var bl,Af;function bu(){if(Af)return bl;Af=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return bl=e,bl}var yl,Bf;function n8(){if(Bf)return yl;Bf=1;var e=typeof Ko=="object"&&Ko&&Ko.Object===Object&&Ko;return yl=e,yl}var xl,Ff;function dp(){if(Ff)return xl;Ff=1;var e=n8(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return xl=r,xl}var wl,Nf;function o8(){if(Nf)return wl;Nf=1;var e=dp(),t=function(){return e.Date.now()};return wl=t,wl}var Cl,Tf;function a8(){if(Tf)return Cl;Tf=1;var e=/\s/;function t(r){for(var n=r.length;n--&&e.test(r.charAt(n)););return n}return Cl=t,Cl}var Dl,Of;function i8(){if(Of)return Dl;Of=1;var e=a8(),t=/^\s+/;function r(n){return n&&n.slice(0,e(n)+1).replace(t,"")}return Dl=r,Dl}var kl,$f;function fp(){if($f)return kl;$f=1;var e=dp(),t=e.Symbol;return kl=t,kl}var El,Mf;function s8(){if(Mf)return El;Mf=1;var e=fp(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,o=e?e.toStringTag:void 0;function i(c){var u=r.call(c,o),f=c[o];try{c[o]=void 0;var d=!0}catch{}var p=n.call(c);return d&&(u?c[o]=f:delete c[o]),p}return El=i,El}var Sl,Rf;function l8(){if(Rf)return Sl;Rf=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return Sl=r,Sl}var Al,Pf;function u8(){if(Pf)return Al;Pf=1;var e=fp(),t=s8(),r=l8(),n="[object Null]",o="[object Undefined]",i=e?e.toStringTag:void 0;function c(u){return u==null?u===void 0?o:n:i&&i in Object(u)?t(u):r(u)}return Al=c,Al}var Bl,zf;function c8(){if(zf)return Bl;zf=1;function e(t){return t!=null&&typeof t=="object"}return Bl=e,Bl}var Fl,_f;function d8(){if(_f)return Fl;_f=1;var e=u8(),t=c8(),r="[object Symbol]";function n(o){return typeof o=="symbol"||t(o)&&e(o)==r}return Fl=n,Fl}var Nl,If;function f8(){if(If)return Nl;If=1;var e=i8(),t=bu(),r=d8(),n=NaN,o=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,c=/^0o[0-7]+$/i,u=parseInt;function f(d){if(typeof d=="number")return d;if(r(d))return n;if(t(d)){var p=typeof d.valueOf=="function"?d.valueOf():d;d=t(p)?p+"":p}if(typeof d!="string")return d===0?d:+d;d=e(d);var v=i.test(d);return v||c.test(d)?u(d.slice(2),v?2:8):o.test(d)?n:+d}return Nl=f,Nl}var Tl,jf;function hp(){if(jf)return Tl;jf=1;var e=bu(),t=o8(),r=f8(),n="Expected a function",o=Math.max,i=Math.min;function c(u,f,d){var p,v,g,x,w,C,m=0,A=!1,S=!1,D=!0;if(typeof u!="function")throw new TypeError(n);f=r(f)||0,e(d)&&(A=!!d.leading,S="maxWait"in d,g=S?o(r(d.maxWait)||0,f):g,D="trailing"in d?!!d.trailing:D);function $(Y){var j=p,K=v;return p=v=void 0,m=Y,x=u.apply(K,j),x}function F(Y){return m=Y,w=setTimeout(I,f),A?$(Y):x}function B(Y){var j=Y-C,K=Y-m,U=f-j;return S?i(U,g-K):U}function R(Y){var j=Y-C,K=Y-m;return C===void 0||j>=f||j<0||S&&K>=g}function I(){var Y=t();if(R(Y))return T(Y);w=setTimeout(I,B(Y))}function T(Y){return w=void 0,D&&p?$(Y):(p=v=void 0,x)}function W(){w!==void 0&&clearTimeout(w),m=0,p=C=v=w=void 0}function H(){return w===void 0?x:T(t())}function Z(){var Y=t(),j=R(Y);if(p=arguments,v=this,C=Y,j){if(w===void 0)return F(C);if(S)return clearTimeout(w),w=setTimeout(I,f),$(C)}return w===void 0&&(w=setTimeout(I,f)),x}return Z.cancel=W,Z.flush=H,Z}return Tl=c,Tl}var h8=hp();const p8=ri(h8);var Ol,Lf;function m8(){if(Lf)return Ol;Lf=1;var e=hp(),t=bu(),r="Expected a function";function n(o,i,c){var u=!0,f=!0;if(typeof o!="function")throw new TypeError(r);return t(c)&&(u="leading"in c?!!c.leading:u,f="trailing"in c?!!c.trailing:f),e(o,i,{leading:u,maxWait:i,trailing:f})}return Ol=n,Ol}var g8=m8();const v8=ri(g8),Hf=e=>typeof e=="object"&&e!=null&&e.nodeType===1,qf=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",Ci=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const r=getComputedStyle(e,null);return qf(r.overflowY,t)||qf(r.overflowX,t)||(n=>{const o=(i=>{if(!i.ownerDocument||!i.ownerDocument.defaultView)return null;try{return i.ownerDocument.defaultView.frameElement}catch{return null}})(n);return!!o&&(o.clientHeight<n.scrollHeight||o.clientWidth<n.scrollWidth)})(e)}return!1},Di=(e,t,r,n,o,i,c,u)=>i<e&&c>t||i>e&&c<t?0:i<=e&&u<=r||c>=t&&u>=r?i-e-n:c>t&&u<r||i<e&&u>r?c-t+o:0,b8=e=>e.parentElement??(e.getRootNode().host||null),Kf=(e,t)=>{var r,n,o,i;if(typeof document>"u")return[];const{scrollMode:c,block:u,inline:f,boundary:d,skipOverflowHiddenElements:p}=t,v=typeof d=="function"?d:U=>U!==d;if(!Hf(e))throw new TypeError("Invalid target");const g=document.scrollingElement||document.documentElement,x=[];let w=e;for(;Hf(w)&&v(w);){if(w=b8(w),w===g){x.push(w);break}w!=null&&w===document.body&&Ci(w)&&!Ci(document.documentElement)||w!=null&&Ci(w,p)&&x.push(w)}const C=(n=(r=window.visualViewport)==null?void 0:r.width)!=null?n:innerWidth,m=(i=(o=window.visualViewport)==null?void 0:o.height)!=null?i:innerHeight,{scrollX:A,scrollY:S}=window,{height:D,width:$,top:F,right:B,bottom:R,left:I}=e.getBoundingClientRect(),{top:T,right:W,bottom:H,left:Z}=(U=>{const G=window.getComputedStyle(U);return{top:parseFloat(G.scrollMarginTop)||0,right:parseFloat(G.scrollMarginRight)||0,bottom:parseFloat(G.scrollMarginBottom)||0,left:parseFloat(G.scrollMarginLeft)||0}})(e);let Y=u==="start"||u==="nearest"?F-T:u==="end"?R+H:F+D/2-T+H,j=f==="center"?I+$/2-Z+W:f==="end"?B+W:I-Z;const K=[];for(let U=0;U<x.length;U++){const G=x[U],{height:J,width:z,top:ie,right:ge,bottom:xe,left:Ae}=G.getBoundingClientRect();if(c==="if-needed"&&F>=0&&I>=0&&R<=m&&B<=C&&(G===g&&!Ci(G)||F>=ie&&R<=xe&&I>=Ae&&B<=ge))return K;const Fe=getComputedStyle(G),be=parseInt(Fe.borderLeftWidth,10),X=parseInt(Fe.borderTopWidth,10),fe=parseInt(Fe.borderRightWidth,10),ce=parseInt(Fe.borderBottomWidth,10);let se=0,oe=0;const he="offsetWidth"in G?G.offsetWidth-G.clientWidth-be-fe:0,we="offsetHeight"in G?G.offsetHeight-G.clientHeight-X-ce:0,Ce="offsetWidth"in G?G.offsetWidth===0?0:z/G.offsetWidth:0,ke="offsetHeight"in G?G.offsetHeight===0?0:J/G.offsetHeight:0;if(g===G)se=u==="start"?Y:u==="end"?Y-m:u==="nearest"?Di(S,S+m,m,X,ce,S+Y,S+Y+D,D):Y-m/2,oe=f==="start"?j:f==="center"?j-C/2:f==="end"?j-C:Di(A,A+C,C,be,fe,A+j,A+j+$,$),se=Math.max(0,se+S),oe=Math.max(0,oe+A);else{se=u==="start"?Y-ie-X:u==="end"?Y-xe+ce+we:u==="nearest"?Di(ie,xe,J,X,ce+we,Y,Y+D,D):Y-(ie+J/2)+we/2,oe=f==="start"?j-Ae-be:f==="center"?j-(Ae+z/2)+he/2:f==="end"?j-ge+fe+he:Di(Ae,ge,z,be,fe+he,j,j+$,$);const{scrollLeft:Se,scrollTop:Te}=G;se=ke===0?0:Math.max(0,Math.min(Te+se/ke,G.scrollHeight-J/ke+we)),oe=Ce===0?0:Math.max(0,Math.min(Se+oe/Ce,G.scrollWidth-z/Ce+he)),Y+=Te-se,j+=Se-oe}K.push({el:G,top:se,left:oe})}return K},y8=e=>e===!1?{block:"end",inline:"nearest"}:(t=>t===Object(t)&&Object.keys(t).length!==0)(e)?e:{block:"start",inline:"nearest"};function x8(e,t){if(!e.isConnected||!(o=>{let i=o;for(;i&&i.parentNode;){if(i.parentNode===document)return!0;i=i.parentNode instanceof ShadowRoot?i.parentNode.host:i.parentNode}return!1})(e))return;const r=(o=>{const i=window.getComputedStyle(o);return{top:parseFloat(i.scrollMarginTop)||0,right:parseFloat(i.scrollMarginRight)||0,bottom:parseFloat(i.scrollMarginBottom)||0,left:parseFloat(i.scrollMarginLeft)||0}})(e);if((o=>typeof o=="object"&&typeof o.behavior=="function")(t))return t.behavior(Kf(e,t));const n=typeof t=="boolean"||t==null?void 0:t.behavior;for(const{el:o,top:i,left:c}of Kf(e,y8(t))){const u=i-r.top+r.bottom,f=c-r.left+r.right;o.scroll({top:u,left:f,behavior:n})}}var Eo=[],w8=function(){return Eo.some(function(e){return e.activeTargets.length>0})},C8=function(){return Eo.some(function(e){return e.skippedTargets.length>0})},Wf="ResizeObserver loop completed with undelivered notifications.",D8=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:Wf}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=Wf),window.dispatchEvent(e)},Ka;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Ka||(Ka={}));var So=function(e){return Object.freeze(e)},k8=(function(){function e(t,r){this.inlineSize=t,this.blockSize=r,So(this)}return e})(),pp=(function(){function e(t,r,n,o){return this.x=t,this.y=r,this.width=n,this.height=o,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,So(this)}return e.prototype.toJSON=function(){var t=this,r=t.x,n=t.y,o=t.top,i=t.right,c=t.bottom,u=t.left,f=t.width,d=t.height;return{x:r,y:n,top:o,right:i,bottom:c,left:u,width:f,height:d}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e})(),yu=function(e){return e instanceof SVGElement&&"getBBox"in e},mp=function(e){if(yu(e)){var t=e.getBBox(),r=t.width,n=t.height;return!r&&!n}var o=e,i=o.offsetWidth,c=o.offsetHeight;return!(i||c||e.getClientRects().length)},Vf=function(e){var t;if(e instanceof Element)return!0;var r=(t=e==null?void 0:e.ownerDocument)===null||t===void 0?void 0:t.defaultView;return!!(r&&e instanceof r.Element)},E8=function(e){switch(e.tagName){case"INPUT":if(e.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},$a=typeof window<"u"?window:{},ki=new WeakMap,Uf=/auto|scroll/,S8=/^tb|vertical/,A8=/msie|trident/i.test($a.navigator&&$a.navigator.userAgent),$n=function(e){return parseFloat(e||"0")},Zo=function(e,t,r){return e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=!1),new k8((r?t:e)||0,(r?e:t)||0)},Xf=So({devicePixelContentBoxSize:Zo(),borderBoxSize:Zo(),contentBoxSize:Zo(),contentRect:new pp(0,0,0,0)}),gp=function(e,t){if(t===void 0&&(t=!1),ki.has(e)&&!t)return ki.get(e);if(mp(e))return ki.set(e,Xf),Xf;var r=getComputedStyle(e),n=yu(e)&&e.ownerSVGElement&&e.getBBox(),o=!A8&&r.boxSizing==="border-box",i=S8.test(r.writingMode||""),c=!n&&Uf.test(r.overflowY||""),u=!n&&Uf.test(r.overflowX||""),f=n?0:$n(r.paddingTop),d=n?0:$n(r.paddingRight),p=n?0:$n(r.paddingBottom),v=n?0:$n(r.paddingLeft),g=n?0:$n(r.borderTopWidth),x=n?0:$n(r.borderRightWidth),w=n?0:$n(r.borderBottomWidth),C=n?0:$n(r.borderLeftWidth),m=v+d,A=f+p,S=C+x,D=g+w,$=u?e.offsetHeight-D-e.clientHeight:0,F=c?e.offsetWidth-S-e.clientWidth:0,B=o?m+S:0,R=o?A+D:0,I=n?n.width:$n(r.width)-B-F,T=n?n.height:$n(r.height)-R-$,W=I+m+F+S,H=T+A+$+D,Z=So({devicePixelContentBoxSize:Zo(Math.round(I*devicePixelRatio),Math.round(T*devicePixelRatio),i),borderBoxSize:Zo(W,H,i),contentBoxSize:Zo(I,T,i),contentRect:new pp(v,f,I,T)});return ki.set(e,Z),Z},vp=function(e,t,r){var n=gp(e,r),o=n.borderBoxSize,i=n.contentBoxSize,c=n.devicePixelContentBoxSize;switch(t){case Ka.DEVICE_PIXEL_CONTENT_BOX:return c;case Ka.BORDER_BOX:return o;default:return i}},B8=(function(){function e(t){var r=gp(t);this.target=t,this.contentRect=r.contentRect,this.borderBoxSize=So([r.borderBoxSize]),this.contentBoxSize=So([r.contentBoxSize]),this.devicePixelContentBoxSize=So([r.devicePixelContentBoxSize])}return e})(),bp=function(e){if(mp(e))return 1/0;for(var t=0,r=e.parentNode;r;)t+=1,r=r.parentNode;return t},F8=function(){var e=1/0,t=[];Eo.forEach(function(i){if(i.activeTargets.length!==0){var c=[];i.activeTargets.forEach(function(u){var f=new B8(u.target),d=bp(u.target);c.push(f),u.lastReportedSize=vp(u.target,u.observedBox),d<e&&(e=d)}),t.push(function(){i.callback.call(i.observer,c,i.observer)}),i.activeTargets.splice(0,i.activeTargets.length)}});for(var r=0,n=t;r<n.length;r++){var o=n[r];o()}return e},Gf=function(e){Eo.forEach(function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach(function(r){r.isActive()&&(bp(r.target)>e?t.activeTargets.push(r):t.skippedTargets.push(r))})})},N8=function(){var e=0;for(Gf(e);w8();)e=F8(),Gf(e);return C8()&&D8(),e>0},$l,yp=[],T8=function(){return yp.splice(0).forEach(function(e){return e()})},O8=function(e){if(!$l){var t=0,r=document.createTextNode(""),n={characterData:!0};new MutationObserver(function(){return T8()}).observe(r,n),$l=function(){r.textContent="".concat(t?t--:t++)}}yp.push(e),$l()},$8=function(e){O8(function(){requestAnimationFrame(e)})},Ri=0,M8=function(){return!!Ri},R8=250,P8={attributes:!0,characterData:!0,childList:!0,subtree:!0},Yf=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Zf=function(e){return e===void 0&&(e=0),Date.now()+e},Ml=!1,z8=(function(){function e(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return e.prototype.run=function(t){var r=this;if(t===void 0&&(t=R8),!Ml){Ml=!0;var n=Zf(t);$8(function(){var o=!1;try{o=N8()}finally{if(Ml=!1,t=n-Zf(),!M8())return;o?r.run(1e3):t>0?r.run(t):r.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var t=this,r=function(){return t.observer&&t.observer.observe(document.body,P8)};document.body?r():$a.addEventListener("DOMContentLoaded",r)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Yf.forEach(function(r){return $a.addEventListener(r,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),Yf.forEach(function(r){return $a.removeEventListener(r,t.listener,!0)}),this.stopped=!0)},e})(),S0=new z8,Jf=function(e){!Ri&&e>0&&S0.start(),Ri+=e,!Ri&&S0.stop()},_8=function(e){return!yu(e)&&!E8(e)&&getComputedStyle(e).display==="inline"},I8=(function(){function e(t,r){this.target=t,this.observedBox=r||Ka.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=vp(this.target,this.observedBox,!0);return _8(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e})(),j8=(function(){function e(t,r){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=r}return e})(),Ei=new WeakMap,Qf=function(e,t){for(var r=0;r<e.length;r+=1)if(e[r].target===t)return r;return-1},Si=(function(){function e(){}return e.connect=function(t,r){var n=new j8(t,r);Ei.set(t,n)},e.observe=function(t,r,n){var o=Ei.get(t),i=o.observationTargets.length===0;Qf(o.observationTargets,r)<0&&(i&&Eo.push(o),o.observationTargets.push(new I8(r,n&&n.box)),Jf(1),S0.schedule())},e.unobserve=function(t,r){var n=Ei.get(t),o=Qf(n.observationTargets,r),i=n.observationTargets.length===1;o>=0&&(i&&Eo.splice(Eo.indexOf(n),1),n.observationTargets.splice(o,1),Jf(-1))},e.disconnect=function(t){var r=this,n=Ei.get(t);n.observationTargets.slice().forEach(function(o){return r.unobserve(t,o.target)}),n.activeTargets.splice(0,n.activeTargets.length)},e})(),L8=(function(){function e(t){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof t!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Si.connect(this,t)}return e.prototype.observe=function(t,r){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Vf(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Si.observe(this,t,r)},e.prototype.unobserve=function(t){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Vf(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Si.unobserve(this,t)},e.prototype.disconnect=function(){Si.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e})(),Cn={},eh;function H8(){if(eh)return Cn;eh=1,Object.defineProperty(Cn,"__esModule",{value:!0});for(var e=typeof window<"u"&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),t={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},r={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:e?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},n={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,escape:27," ":32,pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,insert:45,delete:46,meta:91,numlock:144,scrolllock:145,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},o=1;o<20;o++)n["f"+o]=111+o;function i(g,x,w){x&&!("byKey"in x)&&(w=x,x=null),Array.isArray(g)||(g=[g]);var C=g.map(function(S){return f(S,x)}),m=function(S){return C.some(function(D){return d(D,S)})},A=w==null?m:m(w);return A}function c(g,x){return i(g,x)}function u(g,x){return i(g,{byKey:!0},x)}function f(g,x){var w=x&&x.byKey,C={};g=g.replace("++","+add");var m=g.split("+"),A=m.length;for(var S in t)C[t[S]]=!1;var D=!0,$=!1,F=void 0;try{for(var B=m[Symbol.iterator](),R;!(D=(R=B.next()).done);D=!0){var I=R.value,T=I.endsWith("?")&&I.length>1;T&&(I=I.slice(0,-1));var W=v(I),H=t[W];if(I.length>1&&!H&&!r[I]&&!n[W])throw new TypeError('Unknown modifier: "'+I+'"');(A===1||!H)&&(w?C.key=W:C.which=p(I)),H&&(C[H]=T?null:!0)}}catch(Z){$=!0,F=Z}finally{try{!D&&B.return&&B.return()}finally{if($)throw F}}return C}function d(g,x){for(var w in g){var C=g[w],m=void 0;if(C!=null&&(w==="key"&&x.key!=null?m=x.key.toLowerCase():w==="which"?m=C===91&&x.which===93?91:x.which:m=x[w],!(m==null&&C===!1)&&m!==C))return!1}return!0}function p(g){g=v(g);var x=n[g]||g.toUpperCase().charCodeAt(0);return x}function v(g){return g=g.toLowerCase(),g=r[g]||g,g}return Cn.default=i,Cn.isHotkey=i,Cn.isCodeHotkey=c,Cn.isKeyHotkey=u,Cn.parseHotkey=f,Cn.compareHotkey=d,Cn.toKeyCode=p,Cn.toKeyName=v,Cn}var Rl=H8();function q8(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,i;for(i=0;i<n.length;i++)o=n[i],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function na(e,t){if(e==null)return{};var r=q8(e,t),n,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Wa(e){"@babel/helpers - typeof";return Wa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wa(e)}function K8(e,t){if(Wa(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Wa(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function W8(e){var t=K8(e,"string");return Wa(t)==="symbol"?t:String(t)}function bn(e,t,r){return t=W8(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var xu=vo(null),bo=()=>{var e=go(xu);if(!e)throw new Error("The `useSlateStatic` hook must be used inside the <Slate> component's context.");return e},Pl,zl,xp=parseInt(He.version.split(".")[0],10),wp=typeof navigator<"u"&&typeof window<"u"&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,th=typeof navigator<"u"&&/Mac OS X/.test(navigator.userAgent),Qr=typeof navigator<"u"&&/Android/.test(navigator.userAgent),Vo=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),wo=typeof navigator<"u"&&/AppleWebKit(?!.*Chrome)/i.test(navigator.userAgent),V8=typeof navigator<"u"&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),Cp=typeof navigator<"u"&&/Chrome/i.test(navigator.userAgent),U8=typeof navigator<"u"&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),X8=Qr&&typeof navigator<"u"&&/Chrome?\/(?:[0-5]?\d)(?:\.)/i.test(navigator.userAgent),G8=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox\/(?:[0-7][0-9]|[0-8][0-6])(?:\.)).*/i.test(navigator.userAgent),Y8=typeof navigator<"u"&&/.*UCBrowser/.test(navigator.userAgent),Z8=typeof navigator<"u"&&/.*Wechat/.test(navigator.userAgent)&&!/.*MacWechat/.test(navigator.userAgent),Pi=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&/Version\/(\d+)/.test(navigator.userAgent)&&(Pl=navigator.userAgent.match(/Version\/(\d+)/))!==null&&Pl!==void 0&&Pl[1]&&parseInt((zl=navigator.userAgent.match(/Version\/(\d+)/))===null||zl===void 0?void 0:zl[1],10)<17;var ro=(!U8||!X8)&&!V8&&typeof globalThis<"u"&&globalThis.InputEvent&&typeof globalThis.InputEvent.prototype.getTargetRanges=="function",Jo=new WeakMap,wu=new WeakMap,Cu=new WeakMap,Dp=new WeakMap,zi=new WeakMap,A0=new WeakMap,Va=new WeakMap,Ao=new WeakMap,os=new WeakMap,ys=new WeakMap,B0=new WeakMap,co=new WeakMap,Co=new WeakMap,Ma=new WeakMap,F0=new WeakMap,Du=new WeakMap,En=new WeakMap,Un=new WeakMap,an=new WeakMap,io=new WeakMap,so=new WeakMap,kp=new WeakMap,oa=Symbol("placeholder"),Ep=Symbol("mark-placeholder"),Sp=globalThis.Node,J8=globalThis.Text,ku=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView||null,Q8=e=>mo(e)&&e.nodeType===8,vn=e=>mo(e)&&e.nodeType===1,mo=e=>{var t=ku(e);return!!t&&e instanceof t.Node},N0=e=>{var t=e&&e.anchorNode&&ku(e.anchorNode);return!!t&&e instanceof t.Selection},Ap=e=>mo(e)&&e.nodeType===3,eb=e=>e.clipboardData&&e.clipboardData.getData("text/plain")!==""&&e.clipboardData.types.length===1,tb=e=>{var[t,r]=e;if(vn(t)&&t.childNodes.length){var n=r===t.childNodes.length,o=n?r-1:r;for([t,o]=Bp(t,o,n?"backward":"forward"),n=o<r;vn(t)&&t.childNodes.length;){var i=n?t.childNodes.length-1:0;t=nb(t,i,n?"backward":"forward")}r=n&&t.textContent!=null?t.textContent.length:0}return[t,r]},rb=e=>{for(var t=e&&e.parentNode;t;){if(t.toString()==="[object ShadowRoot]")return!0;t=t.parentNode}return!1},Bp=(e,t,r)=>{for(var{childNodes:n}=e,o=n[t],i=t,c=!1,u=!1;(Q8(o)||vn(o)&&o.childNodes.length===0||vn(o)&&o.getAttribute("contenteditable")==="false")&&!(c&&u);){if(i>=n.length){c=!0,i=t-1,r="backward";continue}if(i<0){u=!0,i=t+1,r="forward";continue}o=n[i],t=i,i+=r==="forward"?1:-1}return[o,t]},nb=(e,t,r)=>{var[n]=Bp(e,t,r);return n},Fp=e=>{var t="";if(Ap(e)&&e.nodeValue)return e.nodeValue;if(vn(e)){for(var r of Array.from(e.childNodes))t+=Fp(r);var n=getComputedStyle(e).getPropertyValue("display");(n==="block"||n==="list"||e.tagName==="BR")&&(t+=`
|
|
78
|
-
`)}return t},ob=/data-slate-fragment="(.+?)"/m,ab=e=>{var t=e.getData("text/html"),[,r]=t.match(ob)||[];return r},Ra=e=>e.getSelection!=null?e.getSelection():document.getSelection(),Eu=(e,t,r)=>{var{target:n}=t;if(vn(n)&&n.matches('[contentEditable="false"]'))return!1;var{document:o}=$e.getWindow(e);if(o.contains(n))return $e.hasDOMNode(e,n,{editable:!0});var i=r.find(c=>{var{addedNodes:u,removedNodes:f}=c;for(var d of u)if(d===n||d.contains(n))return!0;for(var p of f)if(p===n||p.contains(n))return!0});return!i||i===t?!1:Eu(e,i,r)},ib=()=>{for(var e=document.activeElement;(t=e)!==null&&t!==void 0&&t.shadowRoot&&(r=e.shadowRoot)!==null&&r!==void 0&&r.activeElement;){var t,r,n;e=(n=e)===null||n===void 0||(n=n.shadowRoot)===null||n===void 0?void 0:n.activeElement}return e},rh=(e,t)=>!!(e.compareDocumentPosition(t)&Sp.DOCUMENT_POSITION_PRECEDING),sb=(e,t)=>!!(e.compareDocumentPosition(t)&Sp.DOCUMENT_POSITION_FOLLOWING),lb=0;class ub{constructor(){bn(this,"id",void 0),this.id="".concat(lb++)}}var $e={androidPendingDiffs:e=>an.get(e),androidScheduleFlush:e=>{var t;(t=Du.get(e))===null||t===void 0||t()},blur:e=>{var t=$e.toDOMNode(e,e),r=$e.findDocumentOrShadowRoot(e);co.set(e,!1),r.activeElement===t&&t.blur()},deselect:e=>{var{selection:t}=e,r=$e.findDocumentOrShadowRoot(e),n=Ra(r);n&&n.rangeCount>0&&n.removeAllRanges(),t&&qe.deselect(e)},findDocumentOrShadowRoot:e=>{var t=$e.toDOMNode(e,e),r=t.getRootNode();return r instanceof Document||r instanceof ShadowRoot?r:t.ownerDocument},findEventRange:(e,t)=>{"nativeEvent"in t&&(t=t.nativeEvent);var{clientX:r,clientY:n,target:o}=t;if(r==null||n==null)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(t));var i=$e.toSlateNode(e,t.target),c=$e.findPath(e,i);if(dt.isElement(i)&&P.isVoid(e,i)){var u=o.getBoundingClientRect(),f=e.isInline(i)?r-u.left<u.left+u.width-r:n-u.top<u.top+u.height-n,d=P.point(e,c,{edge:f?"start":"end"}),p=f?P.before(e,d):P.after(e,d);if(p){var v=P.range(e,p);return v}}var g,{document:x}=$e.getWindow(e);if(x.caretRangeFromPoint)g=x.caretRangeFromPoint(r,n);else{var w=x.caretPositionFromPoint(r,n);w&&(g=x.createRange(),g.setStart(w.offsetNode,w.offset),g.setEnd(w.offsetNode,w.offset))}if(!g)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(t));var C=$e.toSlateRange(e,g,{exactMatch:!1,suppressThrow:!1});return C},findKey:(e,t)=>{var r=os.get(t);return r||(r=new ub,os.set(t,r)),r},findPath:(e,t)=>{for(var r=[],n=t;;){var o=Cu.get(n);if(o==null){if(P.isEditor(n))return r;break}var i=wu.get(n);if(i==null)break;r.unshift(i),n=o}throw new Error("Unable to find the path for Slate node: ".concat(Hr.stringify(t)))},focus:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{retries:5};if(!co.get(e)){if(t.retries<=0)throw new Error("Could not set focus, editor seems stuck with pending operations");if(e.operations.length>0){setTimeout(()=>{$e.focus(e,{retries:t.retries-1})},10);return}var r=$e.toDOMNode(e,e),n=$e.findDocumentOrShadowRoot(e);if(n.activeElement!==r){if(e.selection&&n instanceof Document){var o=Ra(n),i=$e.toDOMRange(e,e.selection);o==null||o.removeAllRanges(),o==null||o.addRange(i)}e.selection||qe.select(e,P.start(e,[])),co.set(e,!0),r.focus({preventScroll:!0})}}},getWindow:e=>{var t=Dp.get(e);if(!t)throw new Error("Unable to find a host window element for this editor");return t},hasDOMNode:function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{editable:n=!1}=r,o=$e.toDOMNode(e,e),i;try{i=vn(t)?t:t.parentElement}catch(c){if(c instanceof Error&&!c.message.includes('Permission denied to access property "nodeType"'))throw c}return i?i.closest("[data-slate-editor]")===o&&(!n||i.isContentEditable?!0:typeof i.isContentEditable=="boolean"&&i.closest('[contenteditable="false"]')===o||!!i.getAttribute("data-slate-zero-width")):!1},hasEditableTarget:(e,t)=>mo(t)&&$e.hasDOMNode(e,t,{editable:!0}),hasRange:(e,t)=>{var{anchor:r,focus:n}=t;return P.hasPath(e,r.path)&&P.hasPath(e,n.path)},hasSelectableTarget:(e,t)=>$e.hasEditableTarget(e,t)||$e.isTargetInsideNonReadonlyVoid(e,t),hasTarget:(e,t)=>mo(t)&&$e.hasDOMNode(e,t),insertData:(e,t)=>{e.insertData(t)},insertFragmentData:(e,t)=>e.insertFragmentData(t),insertTextData:(e,t)=>e.insertTextData(t),isComposing:e=>!!Co.get(e),isFocused:e=>!!co.get(e),isReadOnly:e=>!!B0.get(e),isTargetInsideNonReadonlyVoid:(e,t)=>{if(B0.get(e))return!1;var r=$e.hasTarget(e,t)&&$e.toSlateNode(e,t);return dt.isElement(r)&&P.isVoid(e,r)},setFragmentData:(e,t,r)=>e.setFragmentData(t,r),toDOMNode:(e,t)=>{var r=ys.get(e),n=P.isEditor(t)?zi.get(e):r==null?void 0:r.get($e.findKey(e,t));if(!n)throw new Error("Cannot resolve a DOM node from Slate node: ".concat(Hr.stringify(t)));return n},toDOMPoint:(e,t)=>{var[r]=P.node(e,t.path),n=$e.toDOMNode(e,r),o;P.void(e,{at:t})&&(t={path:t.path,offset:0});for(var i="[data-slate-string], [data-slate-zero-width]",c=Array.from(n.querySelectorAll(i)),u=0,f=0;f<c.length;f++){var d=c[f],p=d.childNodes[0];if(!(p==null||p.textContent==null)){var{length:v}=p.textContent,g=d.getAttribute("data-slate-length"),x=g==null?v:parseInt(g,10),w=u+x,C=c[f+1];if(t.offset===w&&C!==null&&C!==void 0&&C.hasAttribute("data-slate-mark-placeholder")){var m,A=C.childNodes[0];o=[A instanceof J8?A:C,(m=C.textContent)!==null&&m!==void 0&&m.startsWith("\uFEFF")?1:0];break}if(t.offset<=w){var S=Math.min(v,Math.max(0,t.offset-u));o=[p,S];break}u=w}}if(!o)throw new Error("Cannot resolve a DOM point from Slate point: ".concat(Hr.stringify(t)));return o},toDOMRange:(e,t)=>{var{anchor:r,focus:n}=t,o=Ne.isBackward(t),i=$e.toDOMPoint(e,r),c=Ne.isCollapsed(t)?i:$e.toDOMPoint(e,n),u=$e.getWindow(e),f=u.document.createRange(),[d,p]=o?c:i,[v,g]=o?i:c,x=vn(d)?d:d.parentElement,w=!!x.getAttribute("data-slate-zero-width"),C=vn(v)?v:v.parentElement,m=!!C.getAttribute("data-slate-zero-width");return f.setStart(d,w?1:p),f.setEnd(v,m?1:g),f},toSlateNode:(e,t)=>{var r=vn(t)?t:t.parentElement;r&&!r.hasAttribute("data-slate-node")&&(r=r.closest("[data-slate-node]"));var n=r?Va.get(r):null;if(!n)throw new Error("Cannot resolve a Slate node from DOM node: ".concat(r));return n},toSlatePoint:(e,t,r)=>{var{exactMatch:n,suppressThrow:o,searchDirection:i="backward"}=r,[c,u]=n?t:tb(t),f=c.parentNode,d=null,p=0;if(f){var v,g,x=$e.toDOMNode(e,e),w=f.closest('[data-slate-void="true"]'),C=w&&x.contains(w)?w:null,m=f.closest('[contenteditable="false"]'),A=m&&x.contains(m)?m:null,S=f.closest("[data-slate-leaf]"),D=null;if(S){if(d=S.closest('[data-slate-node="text"]'),d){var $=$e.getWindow(e),F=$.document.createRange();F.setStart(d,0),F.setEnd(c,u);var B=F.cloneContents(),R=[...Array.prototype.slice.call(B.querySelectorAll("[data-slate-zero-width]")),...Array.prototype.slice.call(B.querySelectorAll("[contenteditable=false]"))];R.forEach(Ae=>{if(Qr&&!n&&Ae.hasAttribute("data-slate-zero-width")&&Ae.textContent.length>0&&Ae.textContext!=="\uFEFF"){Ae.textContent.startsWith("\uFEFF")&&(Ae.textContent=Ae.textContent.slice(1));return}Ae.parentNode.removeChild(Ae)}),p=B.textContent.length,D=d}}else if(C){for(var I=C.querySelectorAll("[data-slate-leaf]"),T=0;T<I.length;T++){var W=I[T];if($e.hasDOMNode(e,W)){S=W;break}}S?(d=S.closest('[data-slate-node="text"]'),D=S,p=D.textContent.length,D.querySelectorAll("[data-slate-zero-width]").forEach(Ae=>{p-=Ae.textContent.length})):p=1}else if(A){var H=Ae=>Ae?Ae.querySelectorAll("[data-slate-leaf]:not(:scope [data-slate-editor] [data-slate-leaf])"):[],Z=A.closest('[data-slate-node="element"]');if(i==="forward"){var Y,j=[...H(Z),...H(Z==null?void 0:Z.nextElementSibling)];S=(Y=j.find(Ae=>sb(A,Ae)))!==null&&Y!==void 0?Y:null}else{var K,U=[...H(Z==null?void 0:Z.previousElementSibling),...H(Z)];S=(K=U.findLast(Ae=>rh(A,Ae)))!==null&&K!==void 0?K:null}S&&(d=S.closest('[data-slate-node="text"]'),D=S,i==="forward"?p=0:(p=D.textContent.length,D.querySelectorAll("[data-slate-zero-width]").forEach(Ae=>{p-=Ae.textContent.length})))}D&&p===D.textContent.length&&Qr&&D.getAttribute("data-slate-zero-width")==="z"&&(v=D.textContent)!==null&&v!==void 0&&v.startsWith("\uFEFF")&&(f.hasAttribute("data-slate-zero-width")||Vo&&(g=D.textContent)!==null&&g!==void 0&&g.endsWith(`
|
|
79
|
-
|
|
80
|
-
`))&&p--}if(Qr&&!d&&!n){var G=f.hasAttribute("data-slate-node")?f:f.closest("[data-slate-node]");if(G&&$e.hasDOMNode(e,G,{editable:!0})){var J=$e.toSlateNode(e,G),{path:z,offset:ie}=P.start(e,$e.findPath(e,J));return G.querySelector("[data-slate-leaf]")||(ie=u),{path:z,offset:ie}}}if(!d){if(o)return null;throw new Error("Cannot resolve a Slate point from DOM point: ".concat(t))}var ge=$e.toSlateNode(e,d),xe=$e.findPath(e,ge);return{path:xe,offset:p}},toSlateRange:(e,t,r)=>{var n,{exactMatch:o,suppressThrow:i}=r,c=N0(t)?t.anchorNode:t.startContainer,u,f,d,p,v;if(c)if(N0(t)){if(Vo&&t.rangeCount>1){d=t.focusNode;var g=t.getRangeAt(0),x=t.getRangeAt(t.rangeCount-1);if(d instanceof HTMLTableRowElement&&g.startContainer instanceof HTMLTableRowElement&&x.startContainer instanceof HTMLTableRowElement){let B=function(R){return R.childElementCount>0?B(R.children[0]):R};var w=g.startContainer,C=x.startContainer,m=B(w.children[g.startOffset]),A=B(C.children[x.startOffset]);p=0,A.childNodes.length>0?u=A.childNodes[0]:u=A,m.childNodes.length>0?d=m.childNodes[0]:d=m,A instanceof HTMLElement?f=A.innerHTML.length:f=0}else g.startContainer===d?(u=x.endContainer,f=x.endOffset,p=g.startOffset):(u=g.startContainer,f=g.endOffset,p=x.startOffset)}else u=t.anchorNode,f=t.anchorOffset,d=t.focusNode,p=t.focusOffset;Cp&&rb(u)||Vo?v=t.anchorNode===t.focusNode&&t.anchorOffset===t.focusOffset:v=t.isCollapsed}else u=t.startContainer,f=t.startOffset,d=t.endContainer,p=t.endOffset,v=t.collapsed;if(u==null||d==null||f==null||p==null)throw new Error("Cannot resolve a Slate range from DOM range: ".concat(t));Vo&&(n=d.textContent)!==null&&n!==void 0&&n.endsWith(`
|
|
81
|
-
|
|
82
|
-
`)&&p===d.textContent.length&&p--;var S=$e.toSlatePoint(e,[u,f],{exactMatch:o,suppressThrow:i});if(!S)return null;var D=rh(u,d)||u===d&&p<f,$=v?S:$e.toSlatePoint(e,[d,p],{exactMatch:o,suppressThrow:i,searchDirection:D?"forward":"backward"});if(!$)return null;var F={anchor:S,focus:$};return Ne.isExpanded(F)&&Ne.isForward(F)&&vn(d)&&P.void(e,{at:F.focus,mode:"highest"})&&(F=P.unhangRange(e,F,{voids:!0})),F}};function cb(e,t){var{path:r,diff:n}=t;if(!P.hasPath(e,r))return!1;var o=Qe.get(e,r);if(!ct.isText(o))return!1;if(n.start!==o.text.length||n.text.length===0)return o.text.slice(n.start,n.start+n.text.length)===n.text;var i=re.next(r);if(!P.hasPath(e,i))return!1;var c=Qe.get(e,i);return ct.isText(c)&&c.text.startsWith(n.text)}function Np(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return r.reduce((o,i)=>o.slice(0,i.start)+i.text+o.slice(i.end),e)}function db(e,t){for(var r=Math.min(e.length,t.length),n=0;n<r;n++)if(e.charAt(n)!==t.charAt(n))return n;return r}function fb(e,t,r){for(var n=Math.min(e.length,t.length,r),o=0;o<n;o++)if(e.charAt(e.length-o-1)!==t.charAt(t.length-o-1))return o;return n}function Tp(e,t){var{start:r,end:n,text:o}=t,i=e.slice(r,n),c=db(i,o),u=Math.min(i.length-c,o.length-c),f=fb(i,o,u),d={start:r+c,end:n-f,text:o.slice(c,o.length-f)};return d.start===d.end&&d.text.length===0?null:d}function hb(e,t,r){var n=Math.min(t.start,r.start),o=Math.max(0,Math.min(t.start+t.text.length,r.end)-r.start),i=Np(e,t,r),c=Math.max(r.start+r.text.length,t.start+t.text.length+(t.start+t.text.length>r.start?r.text.length:0)-o),u=i.slice(n,c),f=Math.max(t.end,r.end-t.text.length+(t.end-t.start));return Tp(e,{start:n,end:f,text:u})}function pb(e){var{path:t,diff:r}=e;return{anchor:{path:t,offset:r.start},focus:{path:t,offset:r.end}}}function T0(e,t){var{path:r,offset:n}=t;if(!P.hasPath(e,r))return null;var o=Qe.get(e,r);if(!ct.isText(o))return null;var i=P.above(e,{match:u=>dt.isElement(u)&&P.isBlock(e,u),at:r});if(!i)return null;for(;n>o.text.length;){var c=P.next(e,{at:r,match:ct.isText});if(!c||!re.isDescendant(c[1],i[1]))return null;n-=o.text.length,o=c[0],r=c[1]}return{path:r,offset:n}}function nh(e,t){var r=T0(e,t.anchor);if(!r)return null;if(Ne.isCollapsed(t))return{anchor:r,focus:r};var n=T0(e,t.focus);return n?{anchor:r,focus:n}:null}function O0(e,t,r){var n=an.get(e),o=n==null?void 0:n.find(p=>{var{path:v}=p;return re.equals(v,t.path)});if(!o||t.offset<=o.diff.start)return Lt.transform(t,r,{affinity:"backward"});var{diff:i}=o;if(t.offset<=i.start+i.text.length){var c={path:t.path,offset:i.start},u=Lt.transform(c,r,{affinity:"backward"});return u?{path:u.path,offset:u.offset+t.offset-i.start}:null}var f={path:t.path,offset:t.offset-i.text.length+i.end-i.start},d=Lt.transform(f,r,{affinity:"backward"});return d?r.type==="split_node"&&re.equals(r.path,t.path)&&f.offset<r.position&&i.start<r.position?d:{path:d.path,offset:d.offset+i.text.length-i.end+i.start}:null}function oh(e,t,r){var n=O0(e,t.anchor,r);if(!n)return null;if(Ne.isCollapsed(t))return{anchor:n,focus:n};var o=O0(e,t.focus,r);return o?{anchor:n,focus:o}:null}function mb(e,t){var{path:r,diff:n,id:o}=e;switch(t.type){case"insert_text":return!re.equals(t.path,r)||t.offset>=n.end?e:t.offset<=n.start?{diff:{start:t.text.length+n.start,end:t.text.length+n.end,text:n.text},id:o,path:r}:{diff:{start:n.start,end:n.end+t.text.length,text:n.text},id:o,path:r};case"remove_text":return!re.equals(t.path,r)||t.offset>=n.end?e:t.offset+t.text.length<=n.start?{diff:{start:n.start-t.text.length,end:n.end-t.text.length,text:n.text},id:o,path:r}:{diff:{start:n.start,end:n.end-t.text.length,text:n.text},id:o,path:r};case"split_node":return!re.equals(t.path,r)||t.position>=n.end?{diff:n,id:o,path:re.transform(r,t,{affinity:"backward"})}:t.position>n.start?{diff:{start:n.start,end:Math.min(t.position,n.end),text:n.text},id:o,path:r}:{diff:{start:n.start-t.position,end:n.end-t.position,text:n.text},id:o,path:re.transform(r,t,{affinity:"forward"})};case"merge_node":return re.equals(t.path,r)?{diff:{start:n.start+t.position,end:n.end+t.position,text:n.text},id:o,path:re.transform(r,t)}:{diff:n,id:o,path:re.transform(r,t)}}var i=re.transform(r,t);return i?{diff:n,path:i,id:o}:null}function ah(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Ai(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ah(Object(r),!0).forEach(function(n){bn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ah(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var gb=25,vb=200,bb=function(){},yb=e=>(e==null?void 0:e.constructor.name)==="DataTransfer";function xb(e){var{editor:t,scheduleOnDOMSelectionChange:r,onDOMSelectionChange:n}=e,o=!1,i=null,c=null,u=null,f=0,d=!1,p=()=>{var Z=so.get(t);if(so.delete(t),Z){var{selection:Y}=t,j=nh(t,Z);j&&(!Y||!Ne.equals(j,Y))&&qe.select(t,j)}},v=()=>{var Z=io.get(t);if(io.delete(t),!!Z){if(Z.at){var Y=Lt.isPoint(Z.at)?T0(t,Z.at):nh(t,Z.at);if(!Y)return;var j=P.range(t,Y);(!t.selection||!Ne.equals(t.selection,j))&&qe.select(t,Y)}Z.run()}},g=()=>{if(c&&(clearTimeout(c),c=null),u&&(clearTimeout(u),u=null),!$()&&!D()){p();return}o||(o=!0,setTimeout(()=>o=!1)),D()&&(o="action");var Z=t.selection&&P.rangeRef(t,t.selection,{affinity:"forward"});Un.set(t,t.marks),bb("flush",io.get(t),an.get(t));for(var Y=$(),j;j=(K=an.get(t))===null||K===void 0?void 0:K[0];){var K,U,G=En.get(t);G!==void 0&&(En.delete(t),t.marks=G),G&&d===!1&&(d=null);var J=pb(j);(!t.selection||!Ne.equals(t.selection,J))&&qe.select(t,J),j.diff.text?P.insertText(t,j.diff.text):P.deleteFragment(t),an.set(t,(U=an.get(t))===null||U===void 0?void 0:U.filter(ge=>{var{id:xe}=ge;return xe!==j.id})),cb(t,j)||(Y=!1,io.delete(t),Un.delete(t),o="action",so.delete(t),r.cancel(),n.cancel(),Z==null||Z.unref())}var z=Z==null?void 0:Z.unref();if(z&&!so.get(t)&&(!t.selection||!Ne.equals(z,t.selection))&&qe.select(t,z),D()){v();return}Y&&r(),r.flush(),n.flush(),p();var ie=Un.get(t);Un.delete(t),ie!==void 0&&(t.marks=ie,t.onChange())},x=Z=>{i&&clearTimeout(i),i=setTimeout(()=>{Co.set(t,!1),g()},gb)},w=Z=>{Co.set(t,!0),i&&(clearTimeout(i),i=null)},C=function(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,Y=A0.get(t);if(Y){if($()||Z){Y.style.display="none";return}Y.style.removeProperty("display")}},m=(Z,Y)=>{var j,K=(j=an.get(t))!==null&&j!==void 0?j:[];an.set(t,K);var U=Qe.leaf(t,Z),G=K.findIndex(ie=>re.equals(ie.path,Z));if(G<0){var J=Tp(U.text,Y);J&&K.push({path:Z,diff:Y,id:f++}),C();return}var z=hb(U.text,K[G].diff,Y);if(!z){K.splice(G,1),C();return}K[G]=Ai(Ai({},K[G]),{},{diff:z})},A=function(Z){var{at:Y}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};d=!1,so.delete(t),r.cancel(),n.cancel(),D()&&g(),io.set(t,{at:Y,run:Z}),u=setTimeout(g)},S=Z=>{var Y;if(c&&(clearTimeout(c),c=null),!Jo.get(t)){var{inputType:j}=Z,K=null,U=Z.dataTransfer||Z.data||void 0;d!==!1&&j!=="insertText"&&j!=="insertCompositionText"&&(d=!1);var[G]=Z.getTargetRanges();G&&(K=$e.toSlateRange(t,G,{exactMatch:!1,suppressThrow:!0}));var J=$e.getWindow(t),z=J.getSelection();if(!K&&z&&(G=z,K=$e.toSlateRange(t,z,{exactMatch:!1,suppressThrow:!0})),K=(Y=K)!==null&&Y!==void 0?Y:t.selection,!!K){var ie=!0;if(j.startsWith("delete")){if(Ne.isExpanded(K)){var[ge,xe]=Ne.edges(K),Ae=Qe.leaf(t,ge.path);if(Ae.text.length===ge.offset&&xe.offset===0){var Fe=P.next(t,{at:ge.path,match:ct.isText});Fe&&re.equals(Fe[1],xe.path)&&(K={anchor:xe,focus:xe})}}var be=j.endsWith("Backward")?"backward":"forward",[X,fe]=Ne.edges(K),[ce,se]=P.leaf(t,X.path),oe={text:"",start:X.offset,end:fe.offset},he=an.get(t),we=he==null?void 0:he.find(bt=>re.equals(bt.path,se)),Ce=we?[we.diff,oe]:[oe],ke=Np(ce.text,...Ce);if(ke.length===0&&(ie=!1),Ne.isExpanded(K)){if(ie&&re.equals(K.anchor.path,K.focus.path)){var Se={path:K.anchor.path,offset:X.offset},Te=P.range(t,Se,Se);return R(Te),m(K.anchor.path,{text:"",end:fe.offset,start:X.offset})}return A(()=>P.deleteFragment(t,{direction:be}),{at:K})}}switch(j){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":return A(()=>P.deleteFragment(t),{at:K});case"deleteContent":case"deleteContentForward":{var{anchor:Ie}=K;if(ie&&Ne.isCollapsed(K)){var We=Qe.leaf(t,Ie.path);if(Ie.offset<We.text.length)return m(Ie.path,{text:"",start:Ie.offset,end:Ie.offset+1})}return A(()=>P.deleteForward(t),{at:K})}case"deleteContentBackward":{var ut,{anchor:ot}=K,Oe=N0(G)?G.isCollapsed:!!((ut=G)!==null&&ut!==void 0&&ut.collapsed);return ie&&Oe&&Ne.isCollapsed(K)&&ot.offset>0?m(ot.path,{text:"",start:ot.offset-1,end:ot.offset}):A(()=>P.deleteBackward(t),{at:K})}case"deleteEntireSoftLine":return A(()=>{P.deleteBackward(t,{unit:"line"}),P.deleteForward(t,{unit:"line"})},{at:K});case"deleteHardLineBackward":return A(()=>P.deleteBackward(t,{unit:"block"}),{at:K});case"deleteSoftLineBackward":return A(()=>P.deleteBackward(t,{unit:"line"}),{at:K});case"deleteHardLineForward":return A(()=>P.deleteForward(t,{unit:"block"}),{at:K});case"deleteSoftLineForward":return A(()=>P.deleteForward(t,{unit:"line"}),{at:K});case"deleteWordBackward":return A(()=>P.deleteBackward(t,{unit:"word"}),{at:K});case"deleteWordForward":return A(()=>P.deleteForward(t,{unit:"word"}),{at:K});case"insertLineBreak":return A(()=>P.insertSoftBreak(t),{at:K});case"insertParagraph":return A(()=>P.insertBreak(t),{at:K});case"insertCompositionText":case"deleteCompositionText":case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":{if(yb(U))return A(()=>$e.insertData(t,U),{at:K});var je=U??"";if(En.get(t)&&(je=je.replace("\uFEFF","")),j==="insertText"&&/.*\n.*\n$/.test(je)&&(je=je.slice(0,-1)),je.includes(`
|
|
83
|
-
`))return A(()=>{var bt=je.split(`
|
|
84
|
-
`);bt.forEach((At,yt)=>{At&&P.insertText(t,At),yt!==bt.length-1&&P.insertSoftBreak(t)})},{at:K});if(re.equals(K.anchor.path,K.focus.path)){var[Ve,ft]=Ne.edges(K),tt={start:Ve.offset,end:ft.offset,text:je};if(je&&d&&j==="insertCompositionText"){var nt=d.start+d.text.search(/\S|$/),Tt=tt.start+tt.text.search(/\S|$/);Tt===nt+1&&tt.end===d.start+d.text.length?(tt.start-=1,d=null,W()):d=!1}else j==="insertText"?d===null?d=tt:d&&Ne.isCollapsed(K)&&d.end+d.text.length===Ve.offset?d=Ai(Ai({},d),{},{text:d.text+je}):d=!1:d=!1;if(ie){m(Ve.path,tt);return}}return A(()=>P.insertText(t,je),{at:K})}}}}},D=()=>!!io.get(t),$=()=>{var Z;return!!((Z=an.get(t))!==null&&Z!==void 0&&Z.length)},F=()=>D()||$(),B=()=>o,R=Z=>{so.set(t,Z),c&&(clearTimeout(c),c=null);var{selection:Y}=t;if(Z){var j=!Y||!re.equals(Y.anchor.path,Z.anchor.path),K=!Y||!re.equals(Y.anchor.path.slice(0,-1),Z.anchor.path.slice(0,-1));(j&&d||K)&&(d=!1),(j||$())&&(c=setTimeout(g,vb))}},I=()=>{(D()||!$())&&g()},T=Z=>{$()||(C(!0),setTimeout(C))},W=()=>{D()||(u=setTimeout(g))},H=Z=>{if(!($()||D())&&Z.some(j=>Eu(t,j,Z))){var Y;(Y=kp.get(t))===null||Y===void 0||Y()}};return{flush:g,scheduleFlush:W,hasPendingDiffs:$,hasPendingAction:D,hasPendingChanges:F,isFlushing:B,handleUserSelect:R,handleCompositionEnd:x,handleCompositionStart:w,handleDOMBeforeInput:S,handleKeyDown:T,handleDomMutations:H,handleInput:I}}function wb(){var e=Ht(!1);return Jt(()=>(e.current=!0,()=>{e.current=!1}),[]),e.current}var Ua=Pi?Bg:Jt;function Cb(e,t,r){var[n]=St(()=>new MutationObserver(t));Ua(()=>{n.takeRecords()}),Jt(()=>{if(!e.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");return n.observe(e.current,r),()=>n.disconnect()},[n,e,r])}var Db=["node"];function ih(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function kb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ih(Object(r),!0).forEach(function(n){bn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ih(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Eb={subtree:!0,childList:!0,characterData:!0},Sb=Qr?e=>{var{node:t}=e,r=na(e,Db);if(!Qr)return null;var n=bo(),o=wb(),[i]=St(()=>xb(kb({editor:n},r)));return Cb(t,i.handleDomMutations,Eb),Du.set(n,i.scheduleFlush),o&&i.flush(),i}:()=>null,Ab=["anchor","focus"],Bb=["anchor","focus"],Fb=(e,t)=>Object.keys(e).length===Object.keys(t).length&&Object.keys(e).every(r=>t.hasOwnProperty(r)&&e[r]===t[r]),Op=(e,t)=>{var r=na(e,Ab),n=na(t,Bb);return e[oa]===t[oa]&&Fb(r,n)},Nb=(e,t)=>{if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++){var n=e[r],o=t[r];if(!Ne.equals(n,o)||!Op(n,o))return!1}return!0},Tb=(e,t)=>{if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++){var n=e[r],o=t[r];if(n.anchor.offset!==o.anchor.offset||n.focus.offset!==o.focus.offset||!Op(n,o))return!1}return!0};function sh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Ob(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?sh(Object(r),!0).forEach(function(n){bn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var $b=e=>{var{isLast:t,leaf:r,parent:n,text:o}=e,i=bo(),c=$e.findPath(i,o),u=re.parent(c),f=!!r[Ep];return i.isVoid(n)?He.createElement(_l,{length:Qe.string(n).length}):r.text===""&&n.children[n.children.length-1]===o&&!i.isInline(n)&&P.string(i,u)===""?He.createElement(_l,{isLineBreak:!0,isMarkPlaceholder:f}):r.text===""?He.createElement(_l,{isMarkPlaceholder:f}):t&&r.text.slice(-1)===`
|
|
85
|
-
`?He.createElement(lh,{isTrailing:!0,text:r.text}):He.createElement(lh,{text:r.text})},lh=e=>{var{text:t,isTrailing:r=!1}=e,n=Ht(null),o=()=>"".concat(t??"").concat(r?`
|
|
86
|
-
`:""),[i]=St(o);return Ua(()=>{var c=o();n.current&&n.current.textContent!==c&&(n.current.textContent=c)}),He.createElement(Mb,{ref:n},i)},Mb=Tg(Za((e,t)=>He.createElement("span",{"data-slate-string":!0,ref:t},e.children))),_l=e=>{var{length:t=0,isLineBreak:r=!1,isMarkPlaceholder:n=!1}=e,o={"data-slate-zero-width":r?"n":"z","data-slate-length":t};return n&&(o["data-slate-mark-placeholder"]=!0),He.createElement("span",Ob({},o),!(Qr||wp)||!r?"\uFEFF":null,r?He.createElement("br",null):null)};function uh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function $p(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?uh(Object(r),!0).forEach(function(n){bn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Rb=Qr?300:0;function Pb(e,t){e.current&&(e.current.disconnect(),t&&(e.current=null))}function ch(e){e.current&&(clearTimeout(e.current),e.current=null)}var zb=e=>{var{leaf:t,isLast:r,text:n,parent:o,renderPlaceholder:i,renderLeaf:c=S=>He.createElement(Ib,$p({},S))}=e,u=bo(),f=Ht(null),d=Ht(null),[p,v]=St(!1),g=Ht(null),x=Bt(S=>{if(Pb(f,S==null),S==null){var D;A0.delete(u),(D=t.onPlaceholderResize)===null||D===void 0||D.call(t,null)}else{if(A0.set(u,S),!f.current){var $=window.ResizeObserver||L8;f.current=new $(()=>{var F;(F=t.onPlaceholderResize)===null||F===void 0||F.call(t,S)})}f.current.observe(S),d.current=S}},[d,t,u]),w=He.createElement($b,{isLast:r,leaf:t,parent:o,text:n}),C=!!t[oa];if(Jt(()=>(C?g.current||(g.current=setTimeout(()=>{v(!0),g.current=null},Rb)):(ch(g),v(!1)),()=>ch(g)),[C,v]),C&&p){var m={children:t.placeholder,attributes:{"data-slate-placeholder":!0,style:{position:"absolute",top:0,pointerEvents:"none",width:"100%",maxWidth:"100%",display:"block",opacity:"0.333",userSelect:"none",textDecoration:"none",WebkitUserModify:wo?"inherit":void 0},contentEditable:!1,ref:x}};w=He.createElement(He.Fragment,null,i(m),w)}var A={"data-slate-leaf":!0};return c({attributes:A,children:w,leaf:t,text:n})},_b=He.memo(zb,(e,t)=>t.parent===e.parent&&t.isLast===e.isLast&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&t.text===e.text&&ct.equals(t.leaf,e.leaf)&&t.leaf[oa]===e.leaf[oa]),Ib=e=>{var{attributes:t,children:r}=e;return He.createElement("span",$p({},t),r)},jb=e=>{for(var{decorations:t,isLast:r,parent:n,renderPlaceholder:o,renderLeaf:i,text:c}=e,u=bo(),f=Ht(null),d=ct.decorations(c,t),p=$e.findKey(u,c),v=[],g=0;g<d.length;g++){var x=d[g];v.push(He.createElement(_b,{isLast:r&&g===d.length-1,key:"".concat(p.id,"-").concat(g),renderPlaceholder:o,leaf:x,text:c,parent:n,renderLeaf:i}))}var w=Bt(C=>{var m=ys.get(u);C?(m==null||m.set(p,C),Ao.set(c,C),Va.set(C,c)):(m==null||m.delete(p),Ao.delete(c),f.current&&Va.delete(f.current)),f.current=C},[f,u,p,c]);return He.createElement("span",{"data-slate-node":"text",ref:w},v)},Mp=He.memo(jb,(e,t)=>t.parent===e.parent&&t.isLast===e.isLast&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&t.text===e.text&&Tb(t.decorations,e.decorations));function dh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function $0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dh(Object(r),!0).forEach(function(n){bn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Lb=e=>{var{decorations:t,element:r,renderElement:n=S=>He.createElement(qb,$0({},S)),renderPlaceholder:o,renderLeaf:i,selection:c}=e,u=bo(),f=Vb(),d=u.isInline(r),p=$e.findKey(u,r),v=Bt(S=>{var D=ys.get(u);S?(D==null||D.set(p,S),Ao.set(r,S),Va.set(S,r)):(D==null||D.delete(p),Ao.delete(r))},[u,p,r]),g=Pp({decorations:t,node:r,renderElement:n,renderPlaceholder:o,renderLeaf:i,selection:c}),x={"data-slate-node":"element",ref:v};if(d&&(x["data-slate-inline"]=!0),!d&&P.hasInlines(u,r)){var w=Qe.string(r),C=cp(w);C==="rtl"&&(x.dir=C)}if(P.isVoid(u,r)){x["data-slate-void"]=!0,!f&&d&&(x.contentEditable=!1);var m=d?"span":"div",[[A]]=Qe.texts(r);g=He.createElement(m,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},He.createElement(Mp,{renderPlaceholder:o,decorations:[],isLast:!1,parent:r,text:A})),wu.set(A,0),Cu.set(A,r)}return n({attributes:x,children:g,element:r})},Hb=He.memo(Lb,(e,t)=>e.element===t.element&&e.renderElement===t.renderElement&&e.renderLeaf===t.renderLeaf&&e.renderPlaceholder===t.renderPlaceholder&&Nb(e.decorations,t.decorations)&&(e.selection===t.selection||!!e.selection&&!!t.selection&&Ne.equals(e.selection,t.selection))),qb=e=>{var{attributes:t,children:r,element:n}=e,o=bo(),i=o.isInline(n)?"span":"div";return He.createElement(i,$0($0({},t),{},{style:{position:"relative"}}),r)},Rp=vo(()=>[]),Kb=()=>go(Rp),Wb=vo(!1),Pp=e=>{var{decorations:t,node:r,renderElement:n,renderPlaceholder:o,renderLeaf:i,selection:c}=e,u=Kb(),f=bo();Jo.set(f,!1);for(var d=$e.findPath(f,r),p=[],v=dt.isElement(r)&&!f.isInline(r)&&P.hasInlines(f,r),g=0;g<r.children.length;g++){var x=d.concat(g),w=r.children[g],C=$e.findKey(f,w),m=P.range(f,x),A=c&&Ne.intersection(m,c),S=u([w,x]);for(var D of t){var $=Ne.intersection(D,m);$&&S.push($)}dt.isElement(w)?p.push(He.createElement(Wb.Provider,{key:"provider-".concat(C.id),value:!!A},He.createElement(Hb,{decorations:S,element:w,key:C.id,renderElement:n,renderPlaceholder:o,renderLeaf:i,selection:A}))):p.push(He.createElement(Mp,{decorations:S,key:C.id,isLast:v&&g===r.children.length-1,parent:r,renderPlaceholder:o,renderLeaf:i,text:w})),wu.set(w,g),Cu.set(w,r)}return p},zp=vo(!1),Vb=()=>go(zp),_p=vo(null),Ip=()=>{var e=go(_p);if(!e)throw new Error("The `useSlate` hook must be used inside the <Slate> component's context.");var{editor:t}=e;return t};function Ub(){var e=bo(),t=Ht(!1),r=Ht(0),n=Bt(()=>{if(!t.current){t.current=!0;var o=$e.getWindow(e);o.cancelAnimationFrame(r.current),r.current=o.requestAnimationFrame(()=>{t.current=!1})}},[e]);return Jt(()=>()=>cancelAnimationFrame(r.current),[]),{receivedUserInput:t,onUserInput:n}}var Xb=3,Gb={bold:"mod+b",compose:["down","left","right","up","backspace","enter"],moveBackward:"left",moveForward:"right",moveWordBackward:"ctrl+left",moveWordForward:"ctrl+right",deleteBackward:"shift?+backspace",deleteForward:"shift?+delete",extendBackward:"shift+left",extendForward:"shift+right",italic:"mod+i",insertSoftBreak:"shift+enter",splitBlock:"enter",undo:"mod+z"},Yb={moveLineBackward:"opt+up",moveLineForward:"opt+down",moveWordBackward:"opt+left",moveWordForward:"opt+right",deleteBackward:["ctrl+backspace","ctrl+h"],deleteForward:["ctrl+delete","ctrl+d"],deleteLineBackward:"cmd+shift?+backspace",deleteLineForward:["cmd+shift?+delete","ctrl+k"],deleteWordBackward:"opt+shift?+backspace",deleteWordForward:"opt+shift?+delete",extendLineBackward:"opt+shift+up",extendLineForward:"opt+shift+down",redo:"cmd+shift+z",transposeCharacter:"ctrl+t"},Zb={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},Sr=e=>{var t=Gb[e],r=Yb[e],n=Zb[e],o=t&&Rl.isHotkey(t),i=r&&Rl.isHotkey(r),c=n&&Rl.isHotkey(n);return u=>!!(o&&o(u)||th&&i&&i(u)||!th&&c&&c(u))},Br={isBold:Sr("bold"),isCompose:Sr("compose"),isMoveBackward:Sr("moveBackward"),isMoveForward:Sr("moveForward"),isDeleteBackward:Sr("deleteBackward"),isDeleteForward:Sr("deleteForward"),isDeleteLineBackward:Sr("deleteLineBackward"),isDeleteLineForward:Sr("deleteLineForward"),isDeleteWordBackward:Sr("deleteWordBackward"),isDeleteWordForward:Sr("deleteWordForward"),isExtendBackward:Sr("extendBackward"),isExtendForward:Sr("extendForward"),isExtendLineBackward:Sr("extendLineBackward"),isExtendLineForward:Sr("extendLineForward"),isItalic:Sr("italic"),isMoveLineBackward:Sr("moveLineBackward"),isMoveLineForward:Sr("moveLineForward"),isMoveWordBackward:Sr("moveWordBackward"),isMoveWordForward:Sr("moveWordForward"),isRedo:Sr("redo"),isSoftBreak:Sr("insertSoftBreak"),isSplitBlock:Sr("splitBlock"),isTransposeCharacter:Sr("transposeCharacter"),isUndo:Sr("undo")},Jb=(e,t)=>{var r=[],n=()=>{r=[]},o=c=>{if(t.current){var u=c.filter(f=>Eu(e,f,c));r.push(...u)}};function i(){r.length>0&&(r.reverse().forEach(c=>{c.type!=="characterData"&&(c.removedNodes.forEach(u=>{c.target.insertBefore(u,c.nextSibling)}),c.addedNodes.forEach(u=>{c.target.removeChild(u)}))}),n())}return{registerMutations:o,restoreDOM:i,clear:n}},Qb={subtree:!0,childList:!0,characterData:!0,characterDataOldValue:!0};class jp extends Ng{constructor(){super(...arguments),bn(this,"context",null),bn(this,"manager",null),bn(this,"mutationObserver",null)}observe(){var t,{node:r}=this.props;if(!r.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");(t=this.mutationObserver)===null||t===void 0||t.observe(r.current,Qb)}componentDidMount(){var{receivedUserInput:t}=this.props,r=this.context;this.manager=Jb(r,t),this.mutationObserver=new MutationObserver(this.manager.registerMutations),this.observe()}getSnapshotBeforeUpdate(){var t,r,n,o=(t=this.mutationObserver)===null||t===void 0?void 0:t.takeRecords();if(o!=null&&o.length){var i;(i=this.manager)===null||i===void 0||i.registerMutations(o)}return(r=this.mutationObserver)===null||r===void 0||r.disconnect(),(n=this.manager)===null||n===void 0||n.restoreDOM(),null}componentDidUpdate(){var t;(t=this.manager)===null||t===void 0||t.clear(),this.observe()}componentWillUnmount(){var t;(t=this.mutationObserver)===null||t===void 0||t.disconnect()}render(){return this.props.children}}bn(jp,"contextType",xu);var ey=Qr?jp:e=>{var{children:t}=e;return He.createElement(He.Fragment,null,t)},ty=vo(!1),ry=["autoFocus","decorate","onDOMBeforeInput","placeholder","readOnly","renderElement","renderLeaf","renderPlaceholder","scrollSelectionIntoView","style","as","disableDefaultStyles"],ny=["text"];function fh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Rn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?fh(Object(r),!0).forEach(function(n){bn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var oy=e=>He.createElement(He.Fragment,null,Pp(e)),Il=Za((e,t)=>{var r=Bt(X=>He.createElement(ay,Rn({},X)),[]),{autoFocus:n,decorate:o=iy,onDOMBeforeInput:i,placeholder:c,readOnly:u=!1,renderElement:f,renderLeaf:d,renderPlaceholder:p=r,scrollSelectionIntoView:v=sy,style:g={},as:x="div",disableDefaultStyles:w=!1}=e,C=na(e,ry),m=Ip(),[A,S]=St(!1),D=Ht(null),$=Ht([]),[F,B]=St(),R=Ht(!1),{onUserInput:I,receivedUserInput:T}=Ub(),[,W]=Fg(X=>X+1,0);kp.set(m,W),B0.set(m,u);var H=ht(()=>({isDraggingInternally:!1,isUpdatingSelection:!1,latestElement:null,hasMarkPlaceholder:!1}),[]);Jt(()=>{D.current&&n&&D.current.focus()},[n]);var Z=Ht(),Y=ht(()=>v8(()=>{if(Jo.get(m)){Y();return}var X=$e.toDOMNode(m,m),fe=X.getRootNode();if(!R.current&&wo&&fe instanceof ShadowRoot){R.current=!0;var ce=ib();ce?document.execCommand("indent"):qe.deselect(m),R.current=!1;return}var se=Z.current;if((Qr||!$e.isComposing(m))&&(!H.isUpdatingSelection||se!=null&&se.isFlushing())&&!H.isDraggingInternally){var oe=$e.findDocumentOrShadowRoot(m),{activeElement:he}=oe,we=$e.toDOMNode(m,m),Ce=Ra(oe);if(he===we?(H.latestElement=he,co.set(m,!0)):co.delete(m),!Ce)return qe.deselect(m);var{anchorNode:ke,focusNode:Se}=Ce,Te=$e.hasEditableTarget(m,ke)||$e.isTargetInsideNonReadonlyVoid(m,ke),Ie=$e.hasTarget(m,Se);if(Te&&Ie){var We=$e.toSlateRange(m,Ce,{exactMatch:!1,suppressThrow:!0});We&&(!$e.isComposing(m)&&!(se!=null&&se.hasPendingChanges())&&!(se!=null&&se.isFlushing())?qe.select(m,We):se==null||se.handleUserSelect(We))}u&&(!Te||!Ie)&&qe.deselect(m)}},100),[m,u,H]),j=ht(()=>p8(Y,0),[Y]);Z.current=Sb({node:D,onDOMSelectionChange:Y,scheduleOnDOMSelectionChange:j}),Ua(()=>{var X,fe,ce;D.current&&(ce=ku(D.current))?(Dp.set(m,ce),zi.set(m,D.current),Ao.set(m,D.current),Va.set(D.current,m)):Ao.delete(m);var{selection:se}=m,oe=$e.findDocumentOrShadowRoot(m),he=Ra(oe);if(!(!he||!$e.isFocused(m)||(X=Z.current)!==null&&X!==void 0&&X.hasPendingAction())){var we=Te=>{var Ie=he.type!=="None";if(!(!se&&!Ie)){var We=he.focusNode,ut;if(Vo&&he.rangeCount>1){var ot=he.getRangeAt(0),Oe=he.getRangeAt(he.rangeCount-1);ot.startContainer===We?ut=Oe.endContainer:ut=ot.startContainer}else ut=he.anchorNode;var je=zi.get(m),Ve=!1;if(je.contains(ut)&&je.contains(We)&&(Ve=!0),Ie&&Ve&&se&&!Te){var ft=$e.toSlateRange(m,he,{exactMatch:!0,suppressThrow:!0});if(ft&&Ne.equals(ft,se)){var tt;if(!H.hasMarkPlaceholder||(tt=ut)!==null&&tt!==void 0&&(tt=tt.parentElement)!==null&&tt!==void 0&&tt.hasAttribute("data-slate-mark-placeholder"))return}}if(se&&!$e.hasRange(m,se)){m.selection=$e.toSlateRange(m,he,{exactMatch:!1,suppressThrow:!0});return}H.isUpdatingSelection=!0;var nt=se&&$e.toDOMRange(m,se);return nt?($e.isComposing(m)&&!Qr?he.collapseToEnd():Ne.isBackward(se)?he.setBaseAndExtent(nt.endContainer,nt.endOffset,nt.startContainer,nt.startOffset):he.setBaseAndExtent(nt.startContainer,nt.startOffset,nt.endContainer,nt.endOffset),v(m,nt)):he.removeAllRanges(),nt}};he.rangeCount<=1&&we();var Ce=((fe=Z.current)===null||fe===void 0?void 0:fe.isFlushing())==="action";if(!Qr||!Ce){setTimeout(()=>{H.isUpdatingSelection=!1});return}var ke=null,Se=requestAnimationFrame(()=>{if(Ce){var Te=Ie=>{try{var We=$e.toDOMNode(m,m);We.focus(),we(Ie)}catch{}};Te(),ke=setTimeout(()=>{Te(!0),H.isUpdatingSelection=!1})}});return()=>{cancelAnimationFrame(Se),ke&&clearTimeout(ke)}}});var K=Bt(X=>{var fe=$e.toDOMNode(m,m),ce=fe.getRootNode();if(R!=null&&R.current&&wo&&ce instanceof ShadowRoot){var se=X.getTargetRanges(),oe=se[0],he=new window.Range;he.setStart(oe.startContainer,oe.startOffset),he.setEnd(oe.endContainer,oe.endOffset);var we=$e.toSlateRange(m,he,{exactMatch:!1,suppressThrow:!1});qe.select(m,we),X.preventDefault(),X.stopImmediatePropagation();return}if(I(),!u&&$e.hasEditableTarget(m,X.target)&&!ly(X,i)){var Ce;if(Z.current)return Z.current.handleDOMBeforeInput(X);j.flush(),Y.flush();var{selection:ke}=m,{inputType:Se}=X,Te=X.dataTransfer||X.data||void 0,Ie=Se==="insertCompositionText"||Se==="deleteCompositionText";if(Ie&&$e.isComposing(m))return;var We=!1;if(Se==="insertText"&&ke&&Ne.isCollapsed(ke)&&X.data&&X.data.length===1&&/[a-z ]/i.test(X.data)&&ke.anchor.offset!==0&&(We=!0,m.marks&&(We=!1),!Jo.get(m))){var ut,ot,{anchor:Oe}=ke,[je,Ve]=$e.toDOMPoint(m,Oe),ft=(ut=je.parentElement)===null||ut===void 0?void 0:ut.closest("a"),tt=$e.getWindow(m);if(We&&ft&&$e.hasDOMNode(m,ft)){var nt,Tt=tt==null?void 0:tt.document.createTreeWalker(ft,NodeFilter.SHOW_TEXT).lastChild();Tt===je&&((nt=Tt.textContent)===null||nt===void 0?void 0:nt.length)===Ve&&(We=!1)}if(We&&je.parentElement&&(tt==null||(ot=tt.getComputedStyle(je.parentElement))===null||ot===void 0?void 0:ot.whiteSpace)==="pre"){var bt=P.above(m,{at:Oe.path,match:zt=>dt.isElement(zt)&&P.isBlock(m,zt)});bt&&Qe.string(bt[0]).includes(" ")&&(We=!1)}}if((!Se.startsWith("delete")||Se.startsWith("deleteBy"))&&!Jo.get(m)){var[At]=X.getTargetRanges();if(At){var yt=$e.toSlateRange(m,At,{exactMatch:!1,suppressThrow:!1});if(!ke||!Ne.equals(ke,yt)){We=!1;var Me=!Ie&&m.selection&&P.rangeRef(m,m.selection);qe.select(m,yt),Me&&Ma.set(m,Me)}}}if(Ie)return;if(We||X.preventDefault(),ke&&Ne.isExpanded(ke)&&Se.startsWith("delete")){var ue=Se.endsWith("Backward")?"backward":"forward";P.deleteFragment(m,{direction:ue});return}switch(Se){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":{P.deleteFragment(m);break}case"deleteContent":case"deleteContentForward":{P.deleteForward(m);break}case"deleteContentBackward":{P.deleteBackward(m);break}case"deleteEntireSoftLine":{P.deleteBackward(m,{unit:"line"}),P.deleteForward(m,{unit:"line"});break}case"deleteHardLineBackward":{P.deleteBackward(m,{unit:"block"});break}case"deleteSoftLineBackward":{P.deleteBackward(m,{unit:"line"});break}case"deleteHardLineForward":{P.deleteForward(m,{unit:"block"});break}case"deleteSoftLineForward":{P.deleteForward(m,{unit:"line"});break}case"deleteWordBackward":{P.deleteBackward(m,{unit:"word"});break}case"deleteWordForward":{P.deleteForward(m,{unit:"word"});break}case"insertLineBreak":P.insertSoftBreak(m);break;case"insertParagraph":{P.insertBreak(m);break}case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":{Se==="insertFromComposition"&&$e.isComposing(m)&&(S(!1),Co.set(m,!1)),(Te==null?void 0:Te.constructor.name)==="DataTransfer"?$e.insertData(m,Te):typeof Te=="string"&&(We?$.current.push(()=>P.insertText(m,Te)):P.insertText(m,Te));break}}var mt=(Ce=Ma.get(m))===null||Ce===void 0?void 0:Ce.unref();Ma.delete(m),mt&&(!m.selection||!Ne.equals(m.selection,mt))&&qe.select(m,mt)}},[m,Y,I,i,u,j]),U=Bt(X=>{X==null?(Y.cancel(),j.cancel(),zi.delete(m),Ao.delete(m),D.current&&ro&&D.current.removeEventListener("beforeinput",K)):ro&&X.addEventListener("beforeinput",K),D.current=X,typeof t=="function"?t(X):t&&(t.current=X)},[Y,j,m,K,t]);Ua(()=>{var X=$e.getWindow(m);X.document.addEventListener("selectionchange",j);var fe=()=>{H.isDraggingInternally=!1};return X.document.addEventListener("dragend",fe),X.document.addEventListener("drop",fe),()=>{X.document.removeEventListener("selectionchange",j),X.document.removeEventListener("dragend",fe),X.document.removeEventListener("drop",fe)}},[j,H]);var G=o([m,[]]),J=c&&m.children.length===1&&Array.from(Qe.texts(m)).length===1&&Qe.string(m)===""&&!A,z=Bt(X=>{if(X&&J){var fe;B((fe=X.getBoundingClientRect())===null||fe===void 0?void 0:fe.height)}else B(void 0)},[J]);if(J){var ie=P.start(m,[]);G.push({[oa]:!0,placeholder:c,onPlaceholderResize:z,anchor:ie,focus:ie})}var{marks:ge}=m;if(H.hasMarkPlaceholder=!1,m.selection&&Ne.isCollapsed(m.selection)&&ge){var{anchor:xe}=m.selection,Ae=Qe.leaf(m,xe.path),Fe=na(Ae,ny);if(!ct.equals(Ae,ge,{loose:!0})){H.hasMarkPlaceholder=!0;var be=Object.fromEntries(Object.keys(Fe).map(X=>[X,null]));G.push(Rn(Rn(Rn({[Ep]:!0},be),ge),{},{anchor:xe,focus:xe}))}}return Jt(()=>{setTimeout(()=>{var{selection:X}=m;if(X){var{anchor:fe}=X,ce=Qe.leaf(m,fe.path);if(ge&&!ct.equals(ce,ge,{loose:!0})){En.set(m,ge);return}}En.delete(m)})}),He.createElement(zp.Provider,{value:u},He.createElement(ty.Provider,{value:A},He.createElement(Rp.Provider,{value:o},He.createElement(ey,{node:D,receivedUserInput:T},He.createElement(x,Rn(Rn({role:u?void 0:"textbox","aria-multiline":u?void 0:!0},C),{},{spellCheck:ro||!Pi?C.spellCheck:!1,autoCorrect:ro||!Pi?C.autoCorrect:"false",autoCapitalize:ro||!Pi?C.autoCapitalize:"false","data-slate-editor":!0,"data-slate-node":"value",contentEditable:!u,zindex:-1,suppressContentEditableWarning:!0,ref:U,style:Rn(Rn({},w?{}:Rn({position:"relative",whiteSpace:"pre-wrap",wordWrap:"break-word"},F?{minHeight:F}:{})),g),onBeforeInput:Bt(X=>{if(!ro&&!u&&!Jr(X,C.onBeforeInput)&&$e.hasSelectableTarget(m,X.target)&&(X.preventDefault(),!$e.isComposing(m))){var fe=X.data;P.insertText(m,fe)}},[C.onBeforeInput,m,u]),onInput:Bt(X=>{if(!Jr(X,C.onInput)){if(Z.current){Z.current.handleInput();return}for(var fe of $.current)fe();if($.current=[],!$e.isFocused(m)){var ce=X.nativeEvent,se=m;if(ce.inputType==="historyUndo"&&typeof se.undo=="function"){se.undo();return}if(ce.inputType==="historyRedo"&&typeof se.redo=="function"){se.redo();return}}}},[C.onInput,m]),onBlur:Bt(X=>{if(!(u||H.isUpdatingSelection||!$e.hasSelectableTarget(m,X.target)||Jr(X,C.onBlur))){var fe=$e.findDocumentOrShadowRoot(m);if(H.latestElement!==fe.activeElement){var{relatedTarget:ce}=X,se=$e.toDOMNode(m,m);if(ce!==se&&!(vn(ce)&&ce.hasAttribute("data-slate-spacer"))){if(ce!=null&&mo(ce)&&$e.hasDOMNode(m,ce)){var oe=$e.toSlateNode(m,ce);if(dt.isElement(oe)&&!m.isVoid(oe))return}if(wo){var he=Ra(fe);he==null||he.removeAllRanges()}co.delete(m)}}}},[u,H.isUpdatingSelection,H.latestElement,m,C.onBlur]),onClick:Bt(X=>{if($e.hasTarget(m,X.target)&&!Jr(X,C.onClick)&&mo(X.target)){var fe=$e.toSlateNode(m,X.target),ce=$e.findPath(m,fe);if(!P.hasPath(m,ce)||Qe.get(m,ce)!==fe)return;if(X.detail===Xb&&ce.length>=1){var se=ce;if(!(dt.isElement(fe)&&P.isBlock(m,fe))){var oe,he=P.above(m,{match:We=>dt.isElement(We)&&P.isBlock(m,We),at:ce});se=(oe=he==null?void 0:he[1])!==null&&oe!==void 0?oe:ce.slice(0,1)}var we=P.range(m,se);qe.select(m,we);return}if(u)return;var Ce=P.start(m,ce),ke=P.end(m,ce),Se=P.void(m,{at:Ce}),Te=P.void(m,{at:ke});if(Se&&Te&&re.equals(Se[1],Te[1])){var Ie=P.range(m,Ce);qe.select(m,Ie)}}},[m,C.onClick,u]),onCompositionEnd:Bt(X=>{if($e.hasSelectableTarget(m,X.target)){var fe;if($e.isComposing(m)&&Promise.resolve().then(()=>{S(!1),Co.set(m,!1)}),(fe=Z.current)===null||fe===void 0||fe.handleCompositionEnd(X),Jr(X,C.onCompositionEnd)||Qr)return;if(!wo&&!G8&&!wp&&!Z8&&!Y8&&X.data){var ce=En.get(m);En.delete(m),ce!==void 0&&(Un.set(m,m.marks),m.marks=ce),P.insertText(m,X.data);var se=Un.get(m);Un.delete(m),se!==void 0&&(m.marks=se)}}},[C.onCompositionEnd,m]),onCompositionUpdate:Bt(X=>{$e.hasSelectableTarget(m,X.target)&&!Jr(X,C.onCompositionUpdate)&&($e.isComposing(m)||(S(!0),Co.set(m,!0)))},[C.onCompositionUpdate,m]),onCompositionStart:Bt(X=>{if($e.hasSelectableTarget(m,X.target)){var fe;if((fe=Z.current)===null||fe===void 0||fe.handleCompositionStart(X),Jr(X,C.onCompositionStart)||Qr)return;S(!0);var{selection:ce}=m;if(ce&&Ne.isExpanded(ce)){P.deleteFragment(m);return}}},[C.onCompositionStart,m]),onCopy:Bt(X=>{$e.hasSelectableTarget(m,X.target)&&!Jr(X,C.onCopy)&&!hh(X)&&(X.preventDefault(),$e.setFragmentData(m,X.clipboardData,"copy"))},[C.onCopy,m]),onCut:Bt(X=>{if(!u&&$e.hasSelectableTarget(m,X.target)&&!Jr(X,C.onCut)&&!hh(X)){X.preventDefault(),$e.setFragmentData(m,X.clipboardData,"cut");var{selection:fe}=m;if(fe)if(Ne.isExpanded(fe))P.deleteFragment(m);else{var ce=Qe.parent(m,fe.anchor.path);P.isVoid(m,ce)&&qe.delete(m)}}},[u,m,C.onCut]),onDragOver:Bt(X=>{if($e.hasTarget(m,X.target)&&!Jr(X,C.onDragOver)){var fe=$e.toSlateNode(m,X.target);dt.isElement(fe)&&P.isVoid(m,fe)&&X.preventDefault()}},[C.onDragOver,m]),onDragStart:Bt(X=>{if(!u&&$e.hasTarget(m,X.target)&&!Jr(X,C.onDragStart)){var fe=$e.toSlateNode(m,X.target),ce=$e.findPath(m,fe),se=dt.isElement(fe)&&P.isVoid(m,fe)||P.void(m,{at:ce,voids:!0});if(se){var oe=P.range(m,ce);qe.select(m,oe)}H.isDraggingInternally=!0,$e.setFragmentData(m,X.dataTransfer,"drag")}},[u,m,C.onDragStart,H]),onDrop:Bt(X=>{if(!u&&$e.hasTarget(m,X.target)&&!Jr(X,C.onDrop)){X.preventDefault();var fe=m.selection,ce=$e.findEventRange(m,X),se=X.dataTransfer;qe.select(m,ce),H.isDraggingInternally&&fe&&!Ne.equals(fe,ce)&&!P.void(m,{at:ce,voids:!0})&&qe.delete(m,{at:fe}),$e.insertData(m,se),$e.isFocused(m)||$e.focus(m)}},[u,m,C.onDrop,H]),onDragEnd:Bt(X=>{!u&&H.isDraggingInternally&&C.onDragEnd&&$e.hasTarget(m,X.target)&&C.onDragEnd(X)},[u,H,C,m]),onFocus:Bt(X=>{if(!u&&!H.isUpdatingSelection&&$e.hasEditableTarget(m,X.target)&&!Jr(X,C.onFocus)){var fe=$e.toDOMNode(m,m),ce=$e.findDocumentOrShadowRoot(m);if(H.latestElement=ce.activeElement,Vo&&X.target!==fe){fe.focus();return}co.set(m,!0)}},[u,H,m,C.onFocus]),onKeyDown:Bt(X=>{if(!u&&$e.hasEditableTarget(m,X.target)){var fe;(fe=Z.current)===null||fe===void 0||fe.handleKeyDown(X);var{nativeEvent:ce}=X;if($e.isComposing(m)&&ce.isComposing===!1&&(Co.set(m,!1),S(!1)),Jr(X,C.onKeyDown)||$e.isComposing(m))return;var{selection:se}=m,oe=m.children[se!==null?se.focus.path[0]:0],he=cp(Qe.string(oe))==="rtl";if(Br.isRedo(ce)){X.preventDefault();var we=m;typeof we.redo=="function"&&we.redo();return}if(Br.isUndo(ce)){X.preventDefault();var Ce=m;typeof Ce.undo=="function"&&Ce.undo();return}if(Br.isMoveLineBackward(ce)){X.preventDefault(),qe.move(m,{unit:"line",reverse:!0});return}if(Br.isMoveLineForward(ce)){X.preventDefault(),qe.move(m,{unit:"line"});return}if(Br.isExtendLineBackward(ce)){X.preventDefault(),qe.move(m,{unit:"line",edge:"focus",reverse:!0});return}if(Br.isExtendLineForward(ce)){X.preventDefault(),qe.move(m,{unit:"line",edge:"focus"});return}if(Br.isMoveBackward(ce)){X.preventDefault(),se&&Ne.isCollapsed(se)?qe.move(m,{reverse:!he}):qe.collapse(m,{edge:he?"end":"start"});return}if(Br.isMoveForward(ce)){X.preventDefault(),se&&Ne.isCollapsed(se)?qe.move(m,{reverse:he}):qe.collapse(m,{edge:he?"start":"end"});return}if(Br.isMoveWordBackward(ce)){X.preventDefault(),se&&Ne.isExpanded(se)&&qe.collapse(m,{edge:"focus"}),qe.move(m,{unit:"word",reverse:!he});return}if(Br.isMoveWordForward(ce)){X.preventDefault(),se&&Ne.isExpanded(se)&&qe.collapse(m,{edge:"focus"}),qe.move(m,{unit:"word",reverse:he});return}if(ro){if((Cp||wo)&&se&&(Br.isDeleteBackward(ce)||Br.isDeleteForward(ce))&&Ne.isCollapsed(se)){var ke=Qe.parent(m,se.anchor.path);if(dt.isElement(ke)&&P.isVoid(m,ke)&&(P.isInline(m,ke)||P.isBlock(m,ke))){X.preventDefault(),P.deleteBackward(m,{unit:"block"});return}}}else{if(Br.isBold(ce)||Br.isItalic(ce)||Br.isTransposeCharacter(ce)){X.preventDefault();return}if(Br.isSoftBreak(ce)){X.preventDefault(),P.insertSoftBreak(m);return}if(Br.isSplitBlock(ce)){X.preventDefault(),P.insertBreak(m);return}if(Br.isDeleteBackward(ce)){X.preventDefault(),se&&Ne.isExpanded(se)?P.deleteFragment(m,{direction:"backward"}):P.deleteBackward(m);return}if(Br.isDeleteForward(ce)){X.preventDefault(),se&&Ne.isExpanded(se)?P.deleteFragment(m,{direction:"forward"}):P.deleteForward(m);return}if(Br.isDeleteLineBackward(ce)){X.preventDefault(),se&&Ne.isExpanded(se)?P.deleteFragment(m,{direction:"backward"}):P.deleteBackward(m,{unit:"line"});return}if(Br.isDeleteLineForward(ce)){X.preventDefault(),se&&Ne.isExpanded(se)?P.deleteFragment(m,{direction:"forward"}):P.deleteForward(m,{unit:"line"});return}if(Br.isDeleteWordBackward(ce)){X.preventDefault(),se&&Ne.isExpanded(se)?P.deleteFragment(m,{direction:"backward"}):P.deleteBackward(m,{unit:"word"});return}if(Br.isDeleteWordForward(ce)){X.preventDefault(),se&&Ne.isExpanded(se)?P.deleteFragment(m,{direction:"forward"}):P.deleteForward(m,{unit:"word"});return}}}},[u,m,C.onKeyDown]),onPaste:Bt(X=>{!u&&$e.hasEditableTarget(m,X.target)&&!Jr(X,C.onPaste)&&(!ro||eb(X.nativeEvent)||wo)&&(X.preventDefault(),$e.insertData(m,X.clipboardData))},[u,m,C.onPaste])}),He.createElement(oy,{decorations:G,node:m,renderElement:f,renderPlaceholder:p,renderLeaf:d,selection:m.selection}))))))}),ay=e=>{var{attributes:t,children:r}=e;return He.createElement("span",Rn({},t),r,Qr&&He.createElement("br",null))},iy=()=>[],sy=(e,t)=>{if(t.getBoundingClientRect&&(!e.selection||e.selection&&Ne.isCollapsed(e.selection))){var r=t.startContainer.parentElement;r.getBoundingClientRect=t.getBoundingClientRect.bind(t),x8(r,{scrollMode:"if-needed"}),delete r.getBoundingClientRect}},Jr=(e,t)=>{if(!t)return!1;var r=t(e);return r??(e.isDefaultPrevented()||e.isPropagationStopped())},hh=e=>mo(e.target)&&(e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement),ly=(e,t)=>{if(!t)return!1;var r=t(e);return r??e.defaultPrevented},uy=vo(!1),cy=vo({});function dy(e){var t=Ht([]).current,r=Ht({editor:e}).current,n=Bt(i=>{r.editor=i,t.forEach(c=>c(i))},[t,r]),o=ht(()=>({getSlate:()=>r.editor,addEventListener:i=>(t.push(i),()=>{t.splice(t.indexOf(i),1)})}),[t,r]);return{selectorContext:o,onChange:n}}var fy=["editor","children","onChange","onSelectionChange","onValueChange","initialValue"],jl=e=>{var{editor:t,children:r,onChange:n,onSelectionChange:o,onValueChange:i,initialValue:c}=e,u=na(e,fy),[f,d]=He.useState(()=>{if(!Qe.isNodeList(c))throw new Error("[Slate] initialValue is invalid! Expected a list of elements but got: ".concat(Hr.stringify(c)));if(!P.isEditor(t))throw new Error("[Slate] editor is invalid! You passed: ".concat(Hr.stringify(t)));return t.children=c,Object.assign(t,u),{v:0,editor:t}}),{selectorContext:p,onChange:v}=dy(t),g=Bt(C=>{var m;switch(n&&n(t.children),C==null||(m=C.operation)===null||m===void 0?void 0:m.type){case"set_selection":o==null||o(t.selection);break;default:i==null||i(t.children)}d(A=>({v:A.v+1,editor:t})),v(t)},[t,v,n,o,i]);Jt(()=>(F0.set(t,g),()=>{F0.set(t,()=>{})}),[t,g]);var[x,w]=St($e.isFocused(t));return Jt(()=>{w($e.isFocused(t))},[t]),Ua(()=>{var C=()=>w($e.isFocused(t));return xp>=17?(document.addEventListener("focusin",C),document.addEventListener("focusout",C),()=>{document.removeEventListener("focusin",C),document.removeEventListener("focusout",C)}):(document.addEventListener("focus",C,!0),document.addEventListener("blur",C,!0),()=>{document.removeEventListener("focus",C,!0),document.removeEventListener("blur",C,!0)})},[]),He.createElement(cy.Provider,{value:p},He.createElement(_p.Provider,{value:f},He.createElement(xu.Provider,{value:f.editor},He.createElement(uy.Provider,{value:x},r))))},ph=(e,t)=>{var r=(t.top+t.bottom)/2;return e.top<=r&&e.bottom>=r},mh=(e,t,r)=>{var n=$e.toDOMRange(e,t).getBoundingClientRect(),o=$e.toDOMRange(e,r).getBoundingClientRect();return ph(n,o)&&ph(o,n)},hy=(e,t)=>{var r=P.range(e,Ne.end(t)),n=Array.from(P.positions(e,{at:t})),o=0,i=n.length,c=Math.floor(i/2);if(mh(e,P.range(e,n[o]),r))return P.range(e,n[o],r);if(n.length<2)return P.range(e,n[n.length-1],r);for(;c!==n.length&&c!==o;)mh(e,P.range(e,n[c]),r)?i=c:o=c,c=Math.floor((o+i)/2);return P.range(e,n[i],r)};function gh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function vh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?gh(Object(r),!0).forEach(function(n){bn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var py=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"x-slate-fragment",r=e,{apply:n,onChange:o,deleteBackward:i,addMark:c,removeMark:u}=r;return ys.set(r,new WeakMap),r.addMark=(f,d)=>{var p,v;(p=Du.get(r))===null||p===void 0||p(),!En.get(r)&&(v=an.get(r))!==null&&v!==void 0&&v.length&&En.set(r,null),Un.delete(r),c(f,d)},r.removeMark=f=>{var d;!En.get(r)&&(d=an.get(r))!==null&&d!==void 0&&d.length&&En.set(r,null),Un.delete(r),u(f)},r.deleteBackward=f=>{if(f!=="line")return i(f);if(r.selection&&Ne.isCollapsed(r.selection)){var d=P.above(r,{match:x=>dt.isElement(x)&&P.isBlock(r,x),at:r.selection});if(d){var[,p]=d,v=P.range(r,p,r.selection.anchor),g=hy(r,v);Ne.isCollapsed(g)||qe.delete(r,{at:g})}}},r.apply=f=>{var d=[],p=[],v=an.get(r);if(v!=null&&v.length){var g=v.map(Y=>mb(Y,f)).filter(Boolean);an.set(r,g)}var x=so.get(r);x&&so.set(r,oh(r,x,f));var w=io.get(r);if(w!=null&&w.at){var C=Lt.isPoint(w==null?void 0:w.at)?O0(r,w.at,f):oh(r,w.at,f);io.set(r,C?vh(vh({},w),{},{at:C}):null)}switch(f.type){case"insert_text":case"remove_text":case"set_node":case"split_node":{d.push(...jo(r,f.path));break}case"set_selection":{var m;(m=Ma.get(r))===null||m===void 0||m.unref(),Ma.delete(r);break}case"insert_node":case"remove_node":{d.push(...jo(r,re.parent(f.path)));break}case"merge_node":{var A=re.previous(f.path);d.push(...jo(r,A));break}case"move_node":{var S=re.common(re.parent(f.path),re.parent(f.newPath));d.push(...jo(r,S));var D;re.isBefore(f.path,f.newPath)?(d.push(...jo(r,re.parent(f.path))),D=f.newPath):(d.push(...jo(r,re.parent(f.newPath))),D=f.path);var $=Qe.get(e,re.parent(D)),F=$e.findKey(r,$),B=P.pathRef(r,re.parent(D));p.push([B,F]);break}}switch(n(f),f.type){case"insert_node":case"remove_node":case"merge_node":case"move_node":case"split_node":Jo.set(r,!0)}for(var[R,I]of d){var[T]=P.node(r,R);os.set(T,I)}for(var[W,H]of p){if(W.current){var[Z]=P.node(r,W.current);os.set(Z,H)}W.unref()}},r.setFragmentData=f=>{var{selection:d}=r;if(d){var[p,v]=Ne.edges(d),g=P.void(r,{at:p.path}),x=P.void(r,{at:v.path});if(!(Ne.isCollapsed(d)&&!g)){var w=$e.toDOMRange(r,d),C=w.cloneContents(),m=C.childNodes[0];if(C.childNodes.forEach(T=>{T.textContent&&T.textContent.trim()!==""&&(m=T)}),x){var[A]=x,S=w.cloneRange(),D=$e.toDOMNode(r,A);S.setEndAfter(D),C=S.cloneContents()}if(g&&(m=C.querySelector("[data-slate-spacer]")),Array.from(C.querySelectorAll("[data-slate-zero-width]")).forEach(T=>{var W=T.getAttribute("data-slate-zero-width")==="n";T.textContent=W?`
|
|
87
|
-
`:""}),Ap(m)){var $=m.ownerDocument.createElement("span");$.style.whiteSpace="pre",$.appendChild(m),C.appendChild($),m=$}var F=r.getFragment(),B=JSON.stringify(F),R=window.btoa(encodeURIComponent(B));m.setAttribute("data-slate-fragment",R),f.setData("application/".concat(t),R);var I=C.ownerDocument.createElement("div");return I.appendChild(C),I.setAttribute("hidden","true"),C.ownerDocument.body.appendChild(I),f.setData("text/html",I.innerHTML),f.setData("text/plain",Fp(I)),C.ownerDocument.body.removeChild(I),f}}},r.insertData=f=>{r.insertFragmentData(f)||r.insertTextData(f)},r.insertFragmentData=f=>{var d=f.getData("application/".concat(t))||ab(f);if(d){var p=decodeURIComponent(window.atob(d)),v=JSON.parse(p);return r.insertFragment(v),!0}return!1},r.insertTextData=f=>{var d=f.getData("text/plain");if(d){var p=d.split(/\r\n|\r|\n/),v=!1;for(var g of p)v&&qe.splitNodes(r,{always:!0}),r.insertText(g),v=!0;return!0}return!1},r.onChange=f=>{var d=xp<18?r0.unstable_batchedUpdates:p=>p();d(()=>{var p=F0.get(r);p&&p(f),o(f)})},r},jo=(e,t)=>{var r=[];for(var[n,o]of P.levels(e,{at:t})){var i=$e.findKey(e,n);r.push([o,i])}return r};function Su(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ro=Su();function Lp(e){Ro=e}var Pa={exec:()=>null};function ur(e,t=""){let r=typeof e=="string"?e:e.source;const n={replace:(o,i)=>{let c=typeof i=="string"?i:i.source;return c=c.replace(en.caret,"$1"),r=r.replace(o,c),n},getRegex:()=>new RegExp(r,t)};return n}var en={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},my=/^(?:[ \t]*(?:\n|$))+/,gy=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,vy=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,oi=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,by=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Au=/(?:[*+-]|\d{1,9}[.)])/,Hp=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,qp=ur(Hp).replace(/bull/g,Au).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),yy=ur(Hp).replace(/bull/g,Au).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Bu=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,xy=/^[^\n]+/,Fu=/(?!\s*\])(?:\\.|[^\[\]\\])+/,wy=ur(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Fu).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Cy=ur(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Au).getRegex(),xs="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Nu=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Dy=ur("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Nu).replace("tag",xs).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Kp=ur(Bu).replace("hr",oi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",xs).getRegex(),ky=ur(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Kp).getRegex(),Tu={blockquote:ky,code:gy,def:wy,fences:vy,heading:by,hr:oi,html:Dy,lheading:qp,list:Cy,newline:my,paragraph:Kp,table:Pa,text:xy},bh=ur("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",oi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",xs).getRegex(),Ey={...Tu,lheading:yy,table:bh,paragraph:ur(Bu).replace("hr",oi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",bh).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",xs).getRegex()},Sy={...Tu,html:ur(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Nu).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Pa,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ur(Bu).replace("hr",oi).replace("heading",` *#{1,6} *[^
|
|
88
|
-
]`).replace("lheading",qp).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Ay=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,By=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Wp=/^( {2,}|\\)\n(?!\s*$)/,Fy=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ws=/[\p{P}\p{S}]/u,Ou=/[\s\p{P}\p{S}]/u,Vp=/[^\s\p{P}\p{S}]/u,Ny=ur(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Ou).getRegex(),Up=/(?!~)[\p{P}\p{S}]/u,Ty=/(?!~)[\s\p{P}\p{S}]/u,Oy=/(?:[^\s\p{P}\p{S}]|~)/u,$y=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,Xp=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,My=ur(Xp,"u").replace(/punct/g,ws).getRegex(),Ry=ur(Xp,"u").replace(/punct/g,Up).getRegex(),Gp="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Py=ur(Gp,"gu").replace(/notPunctSpace/g,Vp).replace(/punctSpace/g,Ou).replace(/punct/g,ws).getRegex(),zy=ur(Gp,"gu").replace(/notPunctSpace/g,Oy).replace(/punctSpace/g,Ty).replace(/punct/g,Up).getRegex(),_y=ur("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Vp).replace(/punctSpace/g,Ou).replace(/punct/g,ws).getRegex(),Iy=ur(/\\(punct)/,"gu").replace(/punct/g,ws).getRegex(),jy=ur(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Ly=ur(Nu).replace("(?:-->|$)","-->").getRegex(),Hy=ur("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Ly).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),as=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,qy=ur(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",as).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Yp=ur(/^!?\[(label)\]\[(ref)\]/).replace("label",as).replace("ref",Fu).getRegex(),Zp=ur(/^!?\[(ref)\](?:\[\])?/).replace("ref",Fu).getRegex(),Ky=ur("reflink|nolink(?!\\()","g").replace("reflink",Yp).replace("nolink",Zp).getRegex(),$u={_backpedal:Pa,anyPunctuation:Iy,autolink:jy,blockSkip:$y,br:Wp,code:By,del:Pa,emStrongLDelim:My,emStrongRDelimAst:Py,emStrongRDelimUnd:_y,escape:Ay,link:qy,nolink:Zp,punctuation:Ny,reflink:Yp,reflinkSearch:Ky,tag:Hy,text:Fy,url:Pa},Wy={...$u,link:ur(/^!?\[(label)\]\((.*?)\)/).replace("label",as).getRegex(),reflink:ur(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",as).getRegex()},M0={...$u,emStrongRDelimAst:zy,emStrongLDelim:Ry,url:ur(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},Vy={...M0,br:ur(Wp).replace("{2,}","*").getRegex(),text:ur(M0.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Bi={normal:Tu,gfm:Ey,pedantic:Sy},ka={normal:$u,gfm:M0,breaks:Vy,pedantic:Wy},Uy={"&":"&","<":"<",">":">",'"':""","'":"'"},yh=e=>Uy[e];function Pn(e,t){if(t){if(en.escapeTest.test(e))return e.replace(en.escapeReplace,yh)}else if(en.escapeTestNoEncode.test(e))return e.replace(en.escapeReplaceNoEncode,yh);return e}function xh(e){try{e=encodeURI(e).replace(en.percentDecode,"%")}catch{return null}return e}function wh(e,t){var i;const r=e.replace(en.findPipe,(c,u,f)=>{let d=!1,p=u;for(;--p>=0&&f[p]==="\\";)d=!d;return d?"|":" |"}),n=r.split(en.splitPipe);let o=0;if(n[0].trim()||n.shift(),n.length>0&&!((i=n.at(-1))!=null&&i.trim())&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;o<n.length;o++)n[o]=n[o].trim().replace(en.slashPipe,"|");return n}function Ea(e,t,r){const n=e.length;if(n===0)return"";let o=0;for(;o<n&&e.charAt(n-o-1)===t;)o++;return e.slice(0,n-o)}function Xy(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let n=0;n<e.length;n++)if(e[n]==="\\")n++;else if(e[n]===t[0])r++;else if(e[n]===t[1]&&(r--,r<0))return n;return r>0?-2:-1}function Ch(e,t,r,n,o){const i=t.href,c=t.title||null,u=e[1].replace(o.other.outputLinkReplace,"$1");n.state.inLink=!0;const f={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:i,title:c,text:u,tokens:n.inlineTokens(u)};return n.state.inLink=!1,f}function Gy(e,t,r){const n=e.match(r.other.indentCodeCompensation);if(n===null)return t;const o=n[1];return t.split(`
|
|
89
|
-
`).map(i=>{const c=i.match(r.other.beginningSpace);if(c===null)return i;const[u]=c;return u.length>=o.length?i.slice(o.length):i}).join(`
|
|
90
|
-
`)}var is=class{constructor(e){vr(this,"options"),vr(this,"rules"),vr(this,"lexer"),this.options=e||Ro}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const r=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?r:Ea(r,`
|
|
91
|
-
`)}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const r=t[0],n=Gy(r,t[3]||"",this.rules);return{type:"code",raw:r,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let r=t[2].trim();if(this.rules.other.endingHash.test(r)){const n=Ea(r,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(r=n.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Ea(t[0],`
|
|
92
|
-
`)}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let r=Ea(t[0],`
|
|
93
|
-
`).split(`
|
|
94
|
-
`),n="",o="";const i=[];for(;r.length>0;){let c=!1;const u=[];let f;for(f=0;f<r.length;f++)if(this.rules.other.blockquoteStart.test(r[f]))u.push(r[f]),c=!0;else if(!c)u.push(r[f]);else break;r=r.slice(f);const d=u.join(`
|
|
95
|
-
`),p=d.replace(this.rules.other.blockquoteSetextReplace,`
|
|
96
|
-
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
|
|
97
|
-
${d}`:d,o=o?`${o}
|
|
98
|
-
${p}`:p;const v=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(p,i,!0),this.lexer.state.top=v,r.length===0)break;const g=i.at(-1);if((g==null?void 0:g.type)==="code")break;if((g==null?void 0:g.type)==="blockquote"){const x=g,w=x.raw+`
|
|
99
|
-
`+r.join(`
|
|
100
|
-
`),C=this.blockquote(w);i[i.length-1]=C,n=n.substring(0,n.length-x.raw.length)+C.raw,o=o.substring(0,o.length-x.text.length)+C.text;break}else if((g==null?void 0:g.type)==="list"){const x=g,w=x.raw+`
|
|
101
|
-
`+r.join(`
|
|
102
|
-
`),C=this.list(w);i[i.length-1]=C,n=n.substring(0,n.length-g.raw.length)+C.raw,o=o.substring(0,o.length-x.raw.length)+C.raw,r=w.substring(i.at(-1).raw.length).split(`
|
|
103
|
-
`);continue}}return{type:"blockquote",raw:n,tokens:i,text:o}}}list(e){let t=this.rules.block.list.exec(e);if(t){let r=t[1].trim();const n=r.length>1,o={type:"list",raw:"",ordered:n,start:n?+r.slice(0,-1):"",loose:!1,items:[]};r=n?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=n?r:"[*+-]");const i=this.rules.other.listItemRegex(r);let c=!1;for(;e;){let f=!1,d="",p="";if(!(t=i.exec(e))||this.rules.block.hr.test(e))break;d=t[0],e=e.substring(d.length);let v=t[2].split(`
|
|
104
|
-
`,1)[0].replace(this.rules.other.listReplaceTabs,A=>" ".repeat(3*A.length)),g=e.split(`
|
|
105
|
-
`,1)[0],x=!v.trim(),w=0;if(this.options.pedantic?(w=2,p=v.trimStart()):x?w=t[1].length+1:(w=t[2].search(this.rules.other.nonSpaceChar),w=w>4?1:w,p=v.slice(w),w+=t[1].length),x&&this.rules.other.blankLine.test(g)&&(d+=g+`
|
|
106
|
-
`,e=e.substring(g.length+1),f=!0),!f){const A=this.rules.other.nextBulletRegex(w),S=this.rules.other.hrRegex(w),D=this.rules.other.fencesBeginRegex(w),$=this.rules.other.headingBeginRegex(w),F=this.rules.other.htmlBeginRegex(w);for(;e;){const B=e.split(`
|
|
107
|
-
`,1)[0];let R;if(g=B,this.options.pedantic?(g=g.replace(this.rules.other.listReplaceNesting," "),R=g):R=g.replace(this.rules.other.tabCharGlobal," "),D.test(g)||$.test(g)||F.test(g)||A.test(g)||S.test(g))break;if(R.search(this.rules.other.nonSpaceChar)>=w||!g.trim())p+=`
|
|
108
|
-
`+R.slice(w);else{if(x||v.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||D.test(v)||$.test(v)||S.test(v))break;p+=`
|
|
109
|
-
`+g}!x&&!g.trim()&&(x=!0),d+=B+`
|
|
110
|
-
`,e=e.substring(B.length+1),v=R.slice(w)}}o.loose||(c?o.loose=!0:this.rules.other.doubleBlankLine.test(d)&&(c=!0));let C=null,m;this.options.gfm&&(C=this.rules.other.listIsTask.exec(p),C&&(m=C[0]!=="[ ] ",p=p.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:d,task:!!C,checked:m,loose:!1,text:p,tokens:[]}),o.raw+=d}const u=o.items.at(-1);if(u)u.raw=u.raw.trimEnd(),u.text=u.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let f=0;f<o.items.length;f++)if(this.lexer.state.top=!1,o.items[f].tokens=this.lexer.blockTokens(o.items[f].text,[]),!o.loose){const d=o.items[f].tokens.filter(v=>v.type==="space"),p=d.length>0&&d.some(v=>this.rules.other.anyLine.test(v.raw));o.loose=p}if(o.loose)for(let f=0;f<o.items.length;f++)o.items[f].loose=!0;return o}}html(e){const t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){const t=this.rules.block.def.exec(e);if(t){const r=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:r,raw:t[0],href:n,title:o}}}table(e){var c;const t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;const r=wh(t[1]),n=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=(c=t[3])!=null&&c.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
111
|
-
`):[],i={type:"table",raw:t[0],header:[],align:[],rows:[]};if(r.length===n.length){for(const u of n)this.rules.other.tableAlignRight.test(u)?i.align.push("right"):this.rules.other.tableAlignCenter.test(u)?i.align.push("center"):this.rules.other.tableAlignLeft.test(u)?i.align.push("left"):i.align.push(null);for(let u=0;u<r.length;u++)i.header.push({text:r[u],tokens:this.lexer.inline(r[u]),header:!0,align:i.align[u]});for(const u of o)i.rows.push(wh(u,i.header.length).map((f,d)=>({text:f,tokens:this.lexer.inline(f),header:!1,align:i.align[d]})));return i}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const r=t[1].charAt(t[1].length-1)===`
|
|
112
|
-
`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:r,tokens:this.lexer.inline(r)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const r=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;const i=Ea(r.slice(0,-1),"\\");if((r.length-i.length)%2===0)return}else{const i=Xy(t[2],"()");if(i===-2)return;if(i>-1){const c=(t[0].indexOf("!")===0?5:4)+t[1].length+i;t[2]=t[2].substring(0,i),t[0]=t[0].substring(0,c).trim(),t[3]=""}}let n=t[2],o="";if(this.options.pedantic){const i=this.rules.other.pedanticHrefTitle.exec(n);i&&(n=i[1],o=i[3])}else o=t[3]?t[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?n=n.slice(1):n=n.slice(1,-1)),Ch(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){const n=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=t[n.toLowerCase()];if(!o){const i=r[0].charAt(0);return{type:"text",raw:i,text:i}}return Ch(r,o,r[0],this.lexer,this.rules)}}emStrong(e,t,r=""){let n=this.rules.inline.emStrongLDelim.exec(e);if(!(!n||n[3]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[2])||!r||this.rules.inline.punctuation.exec(r))){const o=[...n[0]].length-1;let i,c,u=o,f=0;const d=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,t=t.slice(-1*e.length+o);(n=d.exec(t))!=null;){if(i=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!i)continue;if(c=[...i].length,n[3]||n[4]){u+=c;continue}else if((n[5]||n[6])&&o%3&&!((o+c)%3)){f+=c;continue}if(u-=c,u>0)continue;c=Math.min(c,c+u+f);const p=[...n[0]][0].length,v=e.slice(0,o+n.index+p+c);if(Math.min(o,c)%2){const x=v.slice(1,-1);return{type:"em",raw:v,text:x,tokens:this.lexer.inlineTokens(x)}}const g=v.slice(2,-2);return{type:"strong",raw:v,text:g,tokens:this.lexer.inlineTokens(g)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let r=t[2].replace(this.rules.other.newLineCharGlobal," ");const n=this.rules.other.nonSpaceChar.test(r),o=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return n&&o&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:t[0],text:r}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let r,n;return t[2]==="@"?(r=t[1],n="mailto:"+r):(r=t[1],n=r),{type:"link",raw:t[0],text:r,href:n,tokens:[{type:"text",raw:r,text:r}]}}}url(e){var r;let t;if(t=this.rules.inline.url.exec(e)){let n,o;if(t[2]==="@")n=t[0],o="mailto:"+n;else{let i;do i=t[0],t[0]=((r=this.rules.inline._backpedal.exec(t[0]))==null?void 0:r[0])??"";while(i!==t[0]);n=t[0],t[1]==="www."?o="http://"+t[0]:o=t[0]}return{type:"link",raw:t[0],text:n,href:o,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){const r=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:r}}}},Xn=class R0{constructor(t){vr(this,"tokens"),vr(this,"options"),vr(this,"state"),vr(this,"tokenizer"),vr(this,"inlineQueue"),this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Ro,this.options.tokenizer=this.options.tokenizer||new is,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const r={other:en,block:Bi.normal,inline:ka.normal};this.options.pedantic?(r.block=Bi.pedantic,r.inline=ka.pedantic):this.options.gfm&&(r.block=Bi.gfm,this.options.breaks?r.inline=ka.breaks:r.inline=ka.gfm),this.tokenizer.rules=r}static get rules(){return{block:Bi,inline:ka}}static lex(t,r){return new R0(r).lex(t)}static lexInline(t,r){return new R0(r).inlineTokens(t)}lex(t){t=t.replace(en.carriageReturn,`
|
|
113
|
-
`),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){const n=this.inlineQueue[r];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],n=!1){var o,i,c;for(this.options.pedantic&&(t=t.replace(en.tabCharGlobal," ").replace(en.spaceLine,""));t;){let u;if((i=(o=this.options.extensions)==null?void 0:o.block)!=null&&i.some(d=>(u=d.call({lexer:this},t,r))?(t=t.substring(u.raw.length),r.push(u),!0):!1))continue;if(u=this.tokenizer.space(t)){t=t.substring(u.raw.length);const d=r.at(-1);u.raw.length===1&&d!==void 0?d.raw+=`
|
|
114
|
-
`:r.push(u);continue}if(u=this.tokenizer.code(t)){t=t.substring(u.raw.length);const d=r.at(-1);(d==null?void 0:d.type)==="paragraph"||(d==null?void 0:d.type)==="text"?(d.raw+=`
|
|
115
|
-
`+u.raw,d.text+=`
|
|
116
|
-
`+u.text,this.inlineQueue.at(-1).src=d.text):r.push(u);continue}if(u=this.tokenizer.fences(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.heading(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.hr(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.blockquote(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.list(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.html(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.def(t)){t=t.substring(u.raw.length);const d=r.at(-1);(d==null?void 0:d.type)==="paragraph"||(d==null?void 0:d.type)==="text"?(d.raw+=`
|
|
117
|
-
`+u.raw,d.text+=`
|
|
118
|
-
`+u.raw,this.inlineQueue.at(-1).src=d.text):this.tokens.links[u.tag]||(this.tokens.links[u.tag]={href:u.href,title:u.title});continue}if(u=this.tokenizer.table(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.lheading(t)){t=t.substring(u.raw.length),r.push(u);continue}let f=t;if((c=this.options.extensions)!=null&&c.startBlock){let d=1/0;const p=t.slice(1);let v;this.options.extensions.startBlock.forEach(g=>{v=g.call({lexer:this},p),typeof v=="number"&&v>=0&&(d=Math.min(d,v))}),d<1/0&&d>=0&&(f=t.substring(0,d+1))}if(this.state.top&&(u=this.tokenizer.paragraph(f))){const d=r.at(-1);n&&(d==null?void 0:d.type)==="paragraph"?(d.raw+=`
|
|
119
|
-
`+u.raw,d.text+=`
|
|
120
|
-
`+u.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=d.text):r.push(u),n=f.length!==t.length,t=t.substring(u.raw.length);continue}if(u=this.tokenizer.text(t)){t=t.substring(u.raw.length);const d=r.at(-1);(d==null?void 0:d.type)==="text"?(d.raw+=`
|
|
121
|
-
`+u.raw,d.text+=`
|
|
122
|
-
`+u.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=d.text):r.push(u);continue}if(t){const d="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(d);break}else throw new Error(d)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){var u,f,d;let n=t,o=null;if(this.tokens.links){const p=Object.keys(this.tokens.links);if(p.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)p.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,o.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(o=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)n=n.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let i=!1,c="";for(;t;){i||(c=""),i=!1;let p;if((f=(u=this.options.extensions)==null?void 0:u.inline)!=null&&f.some(g=>(p=g.call({lexer:this},t,r))?(t=t.substring(p.raw.length),r.push(p),!0):!1))continue;if(p=this.tokenizer.escape(t)){t=t.substring(p.raw.length),r.push(p);continue}if(p=this.tokenizer.tag(t)){t=t.substring(p.raw.length),r.push(p);continue}if(p=this.tokenizer.link(t)){t=t.substring(p.raw.length),r.push(p);continue}if(p=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(p.raw.length);const g=r.at(-1);p.type==="text"&&(g==null?void 0:g.type)==="text"?(g.raw+=p.raw,g.text+=p.text):r.push(p);continue}if(p=this.tokenizer.emStrong(t,n,c)){t=t.substring(p.raw.length),r.push(p);continue}if(p=this.tokenizer.codespan(t)){t=t.substring(p.raw.length),r.push(p);continue}if(p=this.tokenizer.br(t)){t=t.substring(p.raw.length),r.push(p);continue}if(p=this.tokenizer.del(t)){t=t.substring(p.raw.length),r.push(p);continue}if(p=this.tokenizer.autolink(t)){t=t.substring(p.raw.length),r.push(p);continue}if(!this.state.inLink&&(p=this.tokenizer.url(t))){t=t.substring(p.raw.length),r.push(p);continue}let v=t;if((d=this.options.extensions)!=null&&d.startInline){let g=1/0;const x=t.slice(1);let w;this.options.extensions.startInline.forEach(C=>{w=C.call({lexer:this},x),typeof w=="number"&&w>=0&&(g=Math.min(g,w))}),g<1/0&&g>=0&&(v=t.substring(0,g+1))}if(p=this.tokenizer.inlineText(v)){t=t.substring(p.raw.length),p.raw.slice(-1)!=="_"&&(c=p.raw.slice(-1)),i=!0;const g=r.at(-1);(g==null?void 0:g.type)==="text"?(g.raw+=p.raw,g.text+=p.text):r.push(p);continue}if(t){const g="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(g);break}else throw new Error(g)}}return r}},ss=class{constructor(e){vr(this,"options"),vr(this,"parser"),this.options=e||Ro}space(e){return""}code({text:e,lang:t,escaped:r}){var i;const n=(i=(t||"").match(en.notSpaceStart))==null?void 0:i[0],o=e.replace(en.endingNewline,"")+`
|
|
123
|
-
`;return n?'<pre><code class="language-'+Pn(n)+'">'+(r?o:Pn(o,!0))+`</code></pre>
|
|
124
|
-
`:"<pre><code>"+(r?o:Pn(o,!0))+`</code></pre>
|
|
125
|
-
`}blockquote({tokens:e}){return`<blockquote>
|
|
126
|
-
${this.parser.parse(e)}</blockquote>
|
|
127
|
-
`}html({text:e}){return e}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
128
|
-
`}hr(e){return`<hr>
|
|
129
|
-
`}list(e){const t=e.ordered,r=e.start;let n="";for(let c=0;c<e.items.length;c++){const u=e.items[c];n+=this.listitem(u)}const o=t?"ol":"ul",i=t&&r!==1?' start="'+r+'"':"";return"<"+o+i+`>
|
|
130
|
-
`+n+"</"+o+`>
|
|
131
|
-
`}listitem(e){var r;let t="";if(e.task){const n=this.checkbox({checked:!!e.checked});e.loose?((r=e.tokens[0])==null?void 0:r.type)==="paragraph"?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=n+" "+Pn(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):t+=n+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`<li>${t}</li>
|
|
132
|
-
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
133
|
-
`}table(e){let t="",r="";for(let o=0;o<e.header.length;o++)r+=this.tablecell(e.header[o]);t+=this.tablerow({text:r});let n="";for(let o=0;o<e.rows.length;o++){const i=e.rows[o];r="";for(let c=0;c<i.length;c++)r+=this.tablecell(i[c]);n+=this.tablerow({text:r})}return n&&(n=`<tbody>${n}</tbody>`),`<table>
|
|
134
|
-
<thead>
|
|
135
|
-
`+t+`</thead>
|
|
136
|
-
`+n+`</table>
|
|
137
|
-
`}tablerow({text:e}){return`<tr>
|
|
138
|
-
${e}</tr>
|
|
139
|
-
`}tablecell(e){const t=this.parser.parseInline(e.tokens),r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+t+`</${r}>
|
|
140
|
-
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Pn(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:r}){const n=this.parser.parseInline(r),o=xh(e);if(o===null)return n;e=o;let i='<a href="'+e+'"';return t&&(i+=' title="'+Pn(t)+'"'),i+=">"+n+"</a>",i}image({href:e,title:t,text:r,tokens:n}){n&&(r=this.parser.parseInline(n,this.parser.textRenderer));const o=xh(e);if(o===null)return Pn(r);e=o;let i=`<img src="${e}" alt="${r}"`;return t&&(i+=` title="${Pn(t)}"`),i+=">",i}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Pn(e.text)}},Mu=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},Gn=class P0{constructor(t){vr(this,"options"),vr(this,"renderer"),vr(this,"textRenderer"),this.options=t||Ro,this.options.renderer=this.options.renderer||new ss,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Mu}static parse(t,r){return new P0(r).parse(t)}static parseInline(t,r){return new P0(r).parseInline(t)}parse(t,r=!0){var o,i;let n="";for(let c=0;c<t.length;c++){const u=t[c];if((i=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&i[u.type]){const d=u,p=this.options.extensions.renderers[d.type].call({parser:this},d);if(p!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(d.type)){n+=p||"";continue}}const f=u;switch(f.type){case"space":{n+=this.renderer.space(f);continue}case"hr":{n+=this.renderer.hr(f);continue}case"heading":{n+=this.renderer.heading(f);continue}case"code":{n+=this.renderer.code(f);continue}case"table":{n+=this.renderer.table(f);continue}case"blockquote":{n+=this.renderer.blockquote(f);continue}case"list":{n+=this.renderer.list(f);continue}case"html":{n+=this.renderer.html(f);continue}case"paragraph":{n+=this.renderer.paragraph(f);continue}case"text":{let d=f,p=this.renderer.text(d);for(;c+1<t.length&&t[c+1].type==="text";)d=t[++c],p+=`
|
|
141
|
-
`+this.renderer.text(d);r?n+=this.renderer.paragraph({type:"paragraph",raw:p,text:p,tokens:[{type:"text",raw:p,text:p,escaped:!0}]}):n+=p;continue}default:{const d='Token with "'+f.type+'" type was not found.';if(this.options.silent)return console.error(d),"";throw new Error(d)}}}return n}parseInline(t,r=this.renderer){var o,i;let n="";for(let c=0;c<t.length;c++){const u=t[c];if((i=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&i[u.type]){const d=this.options.extensions.renderers[u.type].call({parser:this},u);if(d!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(u.type)){n+=d||"";continue}}const f=u;switch(f.type){case"escape":{n+=r.text(f);break}case"html":{n+=r.html(f);break}case"link":{n+=r.link(f);break}case"image":{n+=r.image(f);break}case"strong":{n+=r.strong(f);break}case"em":{n+=r.em(f);break}case"codespan":{n+=r.codespan(f);break}case"br":{n+=r.br(f);break}case"del":{n+=r.del(f);break}case"text":{n+=r.text(f);break}default:{const d='Token with "'+f.type+'" type was not found.';if(this.options.silent)return console.error(d),"";throw new Error(d)}}}return n}},Ll,_i=(Ll=class{constructor(e){vr(this,"options"),vr(this,"block"),this.options=e||Ro}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?Xn.lex:Xn.lexInline}provideParser(){return this.block?Gn.parse:Gn.parseInline}},vr(Ll,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),Ll),Yy=class{constructor(...e){vr(this,"defaults",Su()),vr(this,"options",this.setOptions),vr(this,"parse",this.parseMarkdown(!0)),vr(this,"parseInline",this.parseMarkdown(!1)),vr(this,"Parser",Gn),vr(this,"Renderer",ss),vr(this,"TextRenderer",Mu),vr(this,"Lexer",Xn),vr(this,"Tokenizer",is),vr(this,"Hooks",_i),this.use(...e)}walkTokens(e,t){var n,o;let r=[];for(const i of e)switch(r=r.concat(t.call(this,i)),i.type){case"table":{const c=i;for(const u of c.header)r=r.concat(this.walkTokens(u.tokens,t));for(const u of c.rows)for(const f of u)r=r.concat(this.walkTokens(f.tokens,t));break}case"list":{const c=i;r=r.concat(this.walkTokens(c.items,t));break}default:{const c=i;(o=(n=this.defaults.extensions)==null?void 0:n.childTokens)!=null&&o[c.type]?this.defaults.extensions.childTokens[c.type].forEach(u=>{const f=c[u].flat(1/0);r=r.concat(this.walkTokens(f,t))}):c.tokens&&(r=r.concat(this.walkTokens(c.tokens,t)))}}return r}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(r=>{const n={...r};if(n.async=this.defaults.async||n.async||!1,r.extensions&&(r.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){const i=t.renderers[o.name];i?t.renderers[o.name]=function(...c){let u=o.renderer.apply(this,c);return u===!1&&(u=i.apply(this,c)),u}:t.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const i=t[o.level];i?i.unshift(o.tokenizer):t[o.level]=[o.tokenizer],o.start&&(o.level==="block"?t.startBlock?t.startBlock.push(o.start):t.startBlock=[o.start]:o.level==="inline"&&(t.startInline?t.startInline.push(o.start):t.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(t.childTokens[o.name]=o.childTokens)}),n.extensions=t),r.renderer){const o=this.defaults.renderer||new ss(this.defaults);for(const i in r.renderer){if(!(i in o))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;const c=i,u=r.renderer[c],f=o[c];o[c]=(...d)=>{let p=u.apply(o,d);return p===!1&&(p=f.apply(o,d)),p||""}}n.renderer=o}if(r.tokenizer){const o=this.defaults.tokenizer||new is(this.defaults);for(const i in r.tokenizer){if(!(i in o))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;const c=i,u=r.tokenizer[c],f=o[c];o[c]=(...d)=>{let p=u.apply(o,d);return p===!1&&(p=f.apply(o,d)),p}}n.tokenizer=o}if(r.hooks){const o=this.defaults.hooks||new _i;for(const i in r.hooks){if(!(i in o))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;const c=i,u=r.hooks[c],f=o[c];_i.passThroughHooks.has(i)?o[c]=d=>{if(this.defaults.async)return Promise.resolve(u.call(o,d)).then(v=>f.call(o,v));const p=u.call(o,d);return f.call(o,p)}:o[c]=(...d)=>{let p=u.apply(o,d);return p===!1&&(p=f.apply(o,d)),p}}n.hooks=o}if(r.walkTokens){const o=this.defaults.walkTokens,i=r.walkTokens;n.walkTokens=function(c){let u=[];return u.push(i.call(this,c)),o&&(u=u.concat(o.call(this,c))),u}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return Xn.lex(e,t??this.defaults)}parser(e,t){return Gn.parse(e,t??this.defaults)}parseMarkdown(e){return(t,r)=>{const n={...r},o={...this.defaults,...n},i=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&n.async===!1)return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return i(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=e);const c=o.hooks?o.hooks.provideLexer():e?Xn.lex:Xn.lexInline,u=o.hooks?o.hooks.provideParser():e?Gn.parse:Gn.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(t):t).then(f=>c(f,o)).then(f=>o.hooks?o.hooks.processAllTokens(f):f).then(f=>o.walkTokens?Promise.all(this.walkTokens(f,o.walkTokens)).then(()=>f):f).then(f=>u(f,o)).then(f=>o.hooks?o.hooks.postprocess(f):f).catch(i);try{o.hooks&&(t=o.hooks.preprocess(t));let f=c(t,o);o.hooks&&(f=o.hooks.processAllTokens(f)),o.walkTokens&&this.walkTokens(f,o.walkTokens);let d=u(f,o);return o.hooks&&(d=o.hooks.postprocess(d)),d}catch(f){return i(f)}}}onError(e,t){return r=>{if(r.message+=`
|
|
142
|
-
Please report this to https://github.com/markedjs/marked.`,e){const n="<p>An error occurred:</p><pre>"+Pn(r.message+"",!0)+"</pre>";return t?Promise.resolve(n):n}if(t)return Promise.reject(r);throw r}}},Mo=new Yy;function ar(e,t){return Mo.parse(e,t)}ar.options=ar.setOptions=function(e){return Mo.setOptions(e),ar.defaults=Mo.defaults,Lp(ar.defaults),ar};ar.getDefaults=Su;ar.defaults=Ro;ar.use=function(...e){return Mo.use(...e),ar.defaults=Mo.defaults,Lp(ar.defaults),ar};ar.walkTokens=function(e,t){return Mo.walkTokens(e,t)};ar.parseInline=Mo.parseInline;ar.Parser=Gn;ar.parser=Gn.parse;ar.Renderer=ss;ar.TextRenderer=Mu;ar.Lexer=Xn;ar.lexer=Xn.lex;ar.Tokenizer=is;ar.Hooks=_i;ar.parse=ar;ar.options;ar.setOptions;ar.use;ar.walkTokens;ar.parseInline;Gn.parse;Xn.lex;var ln=function(){return ln=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},ln.apply(this,arguments)};function Xa(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}var Dr="-ms-",za="-moz-",lr="-webkit-",Jp="comm",Cs="rule",Ru="decl",Zy="@import",Qp="@keyframes",Jy="@layer",em=Math.abs,Pu=String.fromCharCode,z0=Object.assign;function Qy(e,t){return Lr(e,0)^45?(((t<<2^Lr(e,0))<<2^Lr(e,1))<<2^Lr(e,2))<<2^Lr(e,3):0}function tm(e){return e.trim()}function Vn(e,t){return(e=t.exec(e))?e[0]:e}function It(e,t,r){return e.replace(t,r)}function Ii(e,t,r){return e.indexOf(t,r)}function Lr(e,t){return e.charCodeAt(t)|0}function aa(e,t,r){return e.slice(t,r)}function zn(e){return e.length}function rm(e){return e.length}function Aa(e,t){return t.push(e),e}function ex(e,t){return e.map(t).join("")}function Dh(e,t){return e.filter(function(r){return!Vn(r,t)})}var Ds=1,ia=1,nm=0,yn=0,Pr=0,ma="";function ks(e,t,r,n,o,i,c,u){return{value:e,root:t,parent:r,type:n,props:o,children:i,line:Ds,column:ia,length:c,return:"",siblings:u}}function oo(e,t){return z0(ks("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function Lo(e){for(;e.root;)e=oo(e.root,{children:[e]});Aa(e,e.siblings)}function tx(){return Pr}function rx(){return Pr=yn>0?Lr(ma,--yn):0,ia--,Pr===10&&(ia=1,Ds--),Pr}function Sn(){return Pr=yn<nm?Lr(ma,yn++):0,ia++,Pr===10&&(ia=1,Ds++),Pr}function Bo(){return Lr(ma,yn)}function ji(){return yn}function Es(e,t){return aa(ma,e,t)}function _0(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function nx(e){return Ds=ia=1,nm=zn(ma=e),yn=0,[]}function ox(e){return ma="",e}function Hl(e){return tm(Es(yn-1,I0(e===91?e+2:e===40?e+1:e)))}function ax(e){for(;(Pr=Bo())&&Pr<33;)Sn();return _0(e)>2||_0(Pr)>3?"":" "}function ix(e,t){for(;--t&&Sn()&&!(Pr<48||Pr>102||Pr>57&&Pr<65||Pr>70&&Pr<97););return Es(e,ji()+(t<6&&Bo()==32&&Sn()==32))}function I0(e){for(;Sn();)switch(Pr){case e:return yn;case 34:case 39:e!==34&&e!==39&&I0(Pr);break;case 40:e===41&&I0(e);break;case 92:Sn();break}return yn}function sx(e,t){for(;Sn()&&e+Pr!==57&&!(e+Pr===84&&Bo()===47););return"/*"+Es(t,yn-1)+"*"+Pu(e===47?e:Sn())}function lx(e){for(;!_0(Bo());)Sn();return Es(e,yn)}function ux(e){return ox(Li("",null,null,null,[""],e=nx(e),0,[0],e))}function Li(e,t,r,n,o,i,c,u,f){for(var d=0,p=0,v=c,g=0,x=0,w=0,C=1,m=1,A=1,S=0,D="",$=o,F=i,B=n,R=D;m;)switch(w=S,S=Sn()){case 40:if(w!=108&&Lr(R,v-1)==58){Ii(R+=It(Hl(S),"&","&\f"),"&\f",em(d?u[d-1]:0))!=-1&&(A=-1);break}case 34:case 39:case 91:R+=Hl(S);break;case 9:case 10:case 13:case 32:R+=ax(w);break;case 92:R+=ix(ji()-1,7);continue;case 47:switch(Bo()){case 42:case 47:Aa(cx(sx(Sn(),ji()),t,r,f),f);break;default:R+="/"}break;case 123*C:u[d++]=zn(R)*A;case 125*C:case 59:case 0:switch(S){case 0:case 125:m=0;case 59+p:A==-1&&(R=It(R,/\f/g,"")),x>0&&zn(R)-v&&Aa(x>32?Eh(R+";",n,r,v-1,f):Eh(It(R," ","")+";",n,r,v-2,f),f);break;case 59:R+=";";default:if(Aa(B=kh(R,t,r,d,p,o,u,D,$=[],F=[],v,i),i),S===123)if(p===0)Li(R,t,B,B,$,i,v,u,F);else switch(g===99&&Lr(R,3)===110?100:g){case 100:case 108:case 109:case 115:Li(e,B,B,n&&Aa(kh(e,B,B,0,0,o,u,D,o,$=[],v,F),F),o,F,v,u,n?$:F);break;default:Li(R,B,B,B,[""],F,0,u,F)}}d=p=x=0,C=A=1,D=R="",v=c;break;case 58:v=1+zn(R),x=w;default:if(C<1){if(S==123)--C;else if(S==125&&C++==0&&rx()==125)continue}switch(R+=Pu(S),S*C){case 38:A=p>0?1:(R+="\f",-1);break;case 44:u[d++]=(zn(R)-1)*A,A=1;break;case 64:Bo()===45&&(R+=Hl(Sn())),g=Bo(),p=v=zn(D=R+=lx(ji())),S++;break;case 45:w===45&&zn(R)==2&&(C=0)}}return i}function kh(e,t,r,n,o,i,c,u,f,d,p,v){for(var g=o-1,x=o===0?i:[""],w=rm(x),C=0,m=0,A=0;C<n;++C)for(var S=0,D=aa(e,g+1,g=em(m=c[C])),$=e;S<w;++S)($=tm(m>0?x[S]+" "+D:It(D,/&\f/g,x[S])))&&(f[A++]=$);return ks(e,t,r,o===0?Cs:u,f,d,p,v)}function cx(e,t,r,n){return ks(e,t,r,Jp,Pu(tx()),aa(e,2,-2),0,n)}function Eh(e,t,r,n,o){return ks(e,t,r,Ru,aa(e,0,n),aa(e,n+1,-1),n,o)}function om(e,t,r){switch(Qy(e,t)){case 5103:return lr+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return lr+e+e;case 4789:return za+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return lr+e+za+e+Dr+e+e;case 5936:switch(Lr(e,t+11)){case 114:return lr+e+Dr+It(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return lr+e+Dr+It(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return lr+e+Dr+It(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return lr+e+Dr+e+e;case 6165:return lr+e+Dr+"flex-"+e+e;case 5187:return lr+e+It(e,/(\w+).+(:[^]+)/,lr+"box-$1$2"+Dr+"flex-$1$2")+e;case 5443:return lr+e+Dr+"flex-item-"+It(e,/flex-|-self/g,"")+(Vn(e,/flex-|baseline/)?"":Dr+"grid-row-"+It(e,/flex-|-self/g,""))+e;case 4675:return lr+e+Dr+"flex-line-pack"+It(e,/align-content|flex-|-self/g,"")+e;case 5548:return lr+e+Dr+It(e,"shrink","negative")+e;case 5292:return lr+e+Dr+It(e,"basis","preferred-size")+e;case 6060:return lr+"box-"+It(e,"-grow","")+lr+e+Dr+It(e,"grow","positive")+e;case 4554:return lr+It(e,/([^-])(transform)/g,"$1"+lr+"$2")+e;case 6187:return It(It(It(e,/(zoom-|grab)/,lr+"$1"),/(image-set)/,lr+"$1"),e,"")+e;case 5495:case 3959:return It(e,/(image-set\([^]*)/,lr+"$1$`$1");case 4968:return It(It(e,/(.+:)(flex-)?(.*)/,lr+"box-pack:$3"+Dr+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+lr+e+e;case 4200:if(!Vn(e,/flex-|baseline/))return Dr+"grid-column-align"+aa(e,t)+e;break;case 2592:case 3360:return Dr+It(e,"template-","")+e;case 4384:case 3616:return r&&r.some(function(n,o){return t=o,Vn(n.props,/grid-\w+-end/)})?~Ii(e+(r=r[t].value),"span",0)?e:Dr+It(e,"-start","")+e+Dr+"grid-row-span:"+(~Ii(r,"span",0)?Vn(r,/\d+/):+Vn(r,/\d+/)-+Vn(e,/\d+/))+";":Dr+It(e,"-start","")+e;case 4896:case 4128:return r&&r.some(function(n){return Vn(n.props,/grid-\w+-start/)})?e:Dr+It(It(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return It(e,/(.+)-inline(.+)/,lr+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(zn(e)-1-t>6)switch(Lr(e,t+1)){case 109:if(Lr(e,t+4)!==45)break;case 102:return It(e,/(.+:)(.+)-([^]+)/,"$1"+lr+"$2-$3$1"+za+(Lr(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Ii(e,"stretch",0)?om(It(e,"stretch","fill-available"),t,r)+e:e}break;case 5152:case 5920:return It(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(n,o,i,c,u,f,d){return Dr+o+":"+i+d+(c?Dr+o+"-span:"+(u?f:+f-+i)+d:"")+e});case 4949:if(Lr(e,t+6)===121)return It(e,":",":"+lr)+e;break;case 6444:switch(Lr(e,Lr(e,14)===45?18:11)){case 120:return It(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+lr+(Lr(e,14)===45?"inline-":"")+"box$3$1"+lr+"$2$3$1"+Dr+"$2box$3")+e;case 100:return It(e,":",":"+Dr)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return It(e,"scroll-","scroll-snap-")+e}return e}function ls(e,t){for(var r="",n=0;n<e.length;n++)r+=t(e[n],n,e,t)||"";return r}function dx(e,t,r,n){switch(e.type){case Jy:if(e.children.length)break;case Zy:case Ru:return e.return=e.return||e.value;case Jp:return"";case Qp:return e.return=e.value+"{"+ls(e.children,n)+"}";case Cs:if(!zn(e.value=e.props.join(",")))return""}return zn(r=ls(e.children,n))?e.return=e.value+"{"+r+"}":""}function fx(e){var t=rm(e);return function(r,n,o,i){for(var c="",u=0;u<t;u++)c+=e[u](r,n,o,i)||"";return c}}function hx(e){return function(t){t.root||(t=t.return)&&e(t)}}function px(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case Ru:e.return=om(e.value,e.length,r);return;case Qp:return ls([oo(e,{value:It(e.value,"@","@"+lr)})],n);case Cs:if(e.length)return ex(r=e.props,function(o){switch(Vn(o,n=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":Lo(oo(e,{props:[It(o,/:(read-\w+)/,":"+za+"$1")]})),Lo(oo(e,{props:[o]})),z0(e,{props:Dh(r,n)});break;case"::placeholder":Lo(oo(e,{props:[It(o,/:(plac\w+)/,":"+lr+"input-$1")]})),Lo(oo(e,{props:[It(o,/:(plac\w+)/,":"+za+"$1")]})),Lo(oo(e,{props:[It(o,/:(plac\w+)/,Dr+"input-$1")]})),Lo(oo(e,{props:[o]})),z0(e,{props:Dh(r,n)});break}return""})}}var mx={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},sa=typeof process<"u"&&dn!==void 0&&(dn.REACT_APP_SC_ATTR||dn.SC_ATTR)||"data-styled",am="active",im="data-styled-version",Ss="6.1.19",zu=`/*!sc*/
|
|
143
|
-
`,us=typeof window<"u"&&typeof document<"u",gx=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof process<"u"&&dn!==void 0&&dn.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&dn.REACT_APP_SC_DISABLE_SPEEDY!==""?dn.REACT_APP_SC_DISABLE_SPEEDY!=="false"&&dn.REACT_APP_SC_DISABLE_SPEEDY:typeof process<"u"&&dn!==void 0&&dn.SC_DISABLE_SPEEDY!==void 0&&dn.SC_DISABLE_SPEEDY!==""&&dn.SC_DISABLE_SPEEDY!=="false"&&dn.SC_DISABLE_SPEEDY),As=Object.freeze([]),la=Object.freeze({});function vx(e,t,r){return r===void 0&&(r=la),e.theme!==r.theme&&e.theme||t||r.theme}var sm=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),bx=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,yx=/(^-|-$)/g;function Sh(e){return e.replace(bx,"-").replace(yx,"")}var xx=/(a)(d)/gi,Fi=52,Ah=function(e){return String.fromCharCode(e+(e>25?39:97))};function j0(e){var t,r="";for(t=Math.abs(e);t>Fi;t=t/Fi|0)r=Ah(t%Fi)+r;return(Ah(t%Fi)+r).replace(xx,"$1-$2")}var ql,lm=5381,Uo=function(e,t){for(var r=t.length;r;)e=33*e^t.charCodeAt(--r);return e},um=function(e){return Uo(lm,e)};function cm(e){return j0(um(e)>>>0)}function wx(e){return e.displayName||e.name||"Component"}function Kl(e){return typeof e=="string"&&!0}var dm=typeof Symbol=="function"&&Symbol.for,fm=dm?Symbol.for("react.memo"):60115,Cx=dm?Symbol.for("react.forward_ref"):60112,Dx={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},kx={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},hm={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Ex=((ql={})[Cx]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},ql[fm]=hm,ql);function Bh(e){return("type"in(t=e)&&t.type.$$typeof)===fm?hm:"$$typeof"in e?Ex[e.$$typeof]:Dx;var t}var Sx=Object.defineProperty,Ax=Object.getOwnPropertyNames,Fh=Object.getOwnPropertySymbols,Bx=Object.getOwnPropertyDescriptor,Fx=Object.getPrototypeOf,Nh=Object.prototype;function pm(e,t,r){if(typeof t!="string"){if(Nh){var n=Fx(t);n&&n!==Nh&&pm(e,n,r)}var o=Ax(t);Fh&&(o=o.concat(Fh(t)));for(var i=Bh(e),c=Bh(t),u=0;u<o.length;++u){var f=o[u];if(!(f in kx||r&&r[f]||c&&f in c||i&&f in i)){var d=Bx(t,f);try{Sx(e,f,d)}catch{}}}}return e}function ua(e){return typeof e=="function"}function _u(e){return typeof e=="object"&&"styledComponentId"in e}function Do(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function L0(e,t){if(e.length===0)return"";for(var r=e[0],n=1;n<e.length;n++)r+=e[n];return r}function Ga(e){return e!==null&&typeof e=="object"&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function H0(e,t,r){if(r===void 0&&(r=!1),!r&&!Ga(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var n=0;n<t.length;n++)e[n]=H0(e[n],t[n]);else if(Ga(t))for(var n in t)e[n]=H0(e[n],t[n]);return e}function Iu(e,t){Object.defineProperty(e,"toString",{value:t})}function ai(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e," for more information.").concat(t.length>0?" Args: ".concat(t.join(", ")):""))}var Nx=(function(){function e(t){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=t}return e.prototype.indexOfGroup=function(t){for(var r=0,n=0;n<t;n++)r+=this.groupSizes[n];return r},e.prototype.insertRules=function(t,r){if(t>=this.groupSizes.length){for(var n=this.groupSizes,o=n.length,i=o;t>=i;)if((i<<=1)<0)throw ai(16,"".concat(t));this.groupSizes=new Uint32Array(i),this.groupSizes.set(n),this.length=i;for(var c=o;c<i;c++)this.groupSizes[c]=0}for(var u=this.indexOfGroup(t+1),f=(c=0,r.length);c<f;c++)this.tag.insertRule(u,r[c])&&(this.groupSizes[t]++,u++)},e.prototype.clearGroup=function(t){if(t<this.length){var r=this.groupSizes[t],n=this.indexOfGroup(t),o=n+r;this.groupSizes[t]=0;for(var i=n;i<o;i++)this.tag.deleteRule(n)}},e.prototype.getGroup=function(t){var r="";if(t>=this.length||this.groupSizes[t]===0)return r;for(var n=this.groupSizes[t],o=this.indexOfGroup(t),i=o+n,c=o;c<i;c++)r+="".concat(this.tag.getRule(c)).concat(zu);return r},e})(),Hi=new Map,cs=new Map,qi=1,Ni=function(e){if(Hi.has(e))return Hi.get(e);for(;cs.has(qi);)qi++;var t=qi++;return Hi.set(e,t),cs.set(t,e),t},Tx=function(e,t){qi=t+1,Hi.set(e,t),cs.set(t,e)},Ox="style[".concat(sa,"][").concat(im,'="').concat(Ss,'"]'),$x=new RegExp("^".concat(sa,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),Mx=function(e,t,r){for(var n,o=r.split(","),i=0,c=o.length;i<c;i++)(n=o[i])&&e.registerName(t,n)},Rx=function(e,t){for(var r,n=((r=t.textContent)!==null&&r!==void 0?r:"").split(zu),o=[],i=0,c=n.length;i<c;i++){var u=n[i].trim();if(u){var f=u.match($x);if(f){var d=0|parseInt(f[1],10),p=f[2];d!==0&&(Tx(p,d),Mx(e,p,f[3]),e.getTag().insertRules(d,o)),o.length=0}else o.push(u)}}},Th=function(e){for(var t=document.querySelectorAll(Ox),r=0,n=t.length;r<n;r++){var o=t[r];o&&o.getAttribute(sa)!==am&&(Rx(e,o),o.parentNode&&o.parentNode.removeChild(o))}};function Px(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:null}var mm=function(e){var t=document.head,r=e||t,n=document.createElement("style"),o=(function(u){var f=Array.from(u.querySelectorAll("style[".concat(sa,"]")));return f[f.length-1]})(r),i=o!==void 0?o.nextSibling:null;n.setAttribute(sa,am),n.setAttribute(im,Ss);var c=Px();return c&&n.setAttribute("nonce",c),r.insertBefore(n,i),n},zx=(function(){function e(t){this.element=mm(t),this.element.appendChild(document.createTextNode("")),this.sheet=(function(r){if(r.sheet)return r.sheet;for(var n=document.styleSheets,o=0,i=n.length;o<i;o++){var c=n[o];if(c.ownerNode===r)return c}throw ai(17)})(this.element),this.length=0}return e.prototype.insertRule=function(t,r){try{return this.sheet.insertRule(r,t),this.length++,!0}catch{return!1}},e.prototype.deleteRule=function(t){this.sheet.deleteRule(t),this.length--},e.prototype.getRule=function(t){var r=this.sheet.cssRules[t];return r&&r.cssText?r.cssText:""},e})(),_x=(function(){function e(t){this.element=mm(t),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(t,r){if(t<=this.length&&t>=0){var n=document.createTextNode(r);return this.element.insertBefore(n,this.nodes[t]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(t){this.element.removeChild(this.nodes[t]),this.length--},e.prototype.getRule=function(t){return t<this.length?this.nodes[t].textContent:""},e})(),Ix=(function(){function e(t){this.rules=[],this.length=0}return e.prototype.insertRule=function(t,r){return t<=this.length&&(this.rules.splice(t,0,r),this.length++,!0)},e.prototype.deleteRule=function(t){this.rules.splice(t,1),this.length--},e.prototype.getRule=function(t){return t<this.length?this.rules[t]:""},e})(),Oh=us,jx={isServer:!us,useCSSOMInjection:!gx},gm=(function(){function e(t,r,n){t===void 0&&(t=la),r===void 0&&(r={});var o=this;this.options=ln(ln({},jx),t),this.gs=r,this.names=new Map(n),this.server=!!t.isServer,!this.server&&us&&Oh&&(Oh=!1,Th(this)),Iu(this,function(){return(function(i){for(var c=i.getTag(),u=c.length,f="",d=function(v){var g=(function(A){return cs.get(A)})(v);if(g===void 0)return"continue";var x=i.names.get(g),w=c.getGroup(v);if(x===void 0||!x.size||w.length===0)return"continue";var C="".concat(sa,".g").concat(v,'[id="').concat(g,'"]'),m="";x!==void 0&&x.forEach(function(A){A.length>0&&(m+="".concat(A,","))}),f+="".concat(w).concat(C,'{content:"').concat(m,'"}').concat(zu)},p=0;p<u;p++)d(p);return f})(o)})}return e.registerId=function(t){return Ni(t)},e.prototype.rehydrate=function(){!this.server&&us&&Th(this)},e.prototype.reconstructWithOptions=function(t,r){return r===void 0&&(r=!0),new e(ln(ln({},this.options),t),this.gs,r&&this.names||void 0)},e.prototype.allocateGSInstance=function(t){return this.gs[t]=(this.gs[t]||0)+1},e.prototype.getTag=function(){return this.tag||(this.tag=(t=(function(r){var n=r.useCSSOMInjection,o=r.target;return r.isServer?new Ix(o):n?new zx(o):new _x(o)})(this.options),new Nx(t)));var t},e.prototype.hasNameForId=function(t,r){return this.names.has(t)&&this.names.get(t).has(r)},e.prototype.registerName=function(t,r){if(Ni(t),this.names.has(t))this.names.get(t).add(r);else{var n=new Set;n.add(r),this.names.set(t,n)}},e.prototype.insertRules=function(t,r,n){this.registerName(t,r),this.getTag().insertRules(Ni(t),n)},e.prototype.clearNames=function(t){this.names.has(t)&&this.names.get(t).clear()},e.prototype.clearRules=function(t){this.getTag().clearGroup(Ni(t)),this.clearNames(t)},e.prototype.clearTag=function(){this.tag=void 0},e})(),Lx=/&/g,Hx=/^\s*\/\/.*$/gm;function vm(e,t){return e.map(function(r){return r.type==="rule"&&(r.value="".concat(t," ").concat(r.value),r.value=r.value.replaceAll(",",",".concat(t," ")),r.props=r.props.map(function(n){return"".concat(t," ").concat(n)})),Array.isArray(r.children)&&r.type!=="@keyframes"&&(r.children=vm(r.children,t)),r})}function qx(e){var t,r,n,o=la,i=o.options,c=i===void 0?la:i,u=o.plugins,f=u===void 0?As:u,d=function(g,x,w){return w.startsWith(r)&&w.endsWith(r)&&w.replaceAll(r,"").length>0?".".concat(t):g},p=f.slice();p.push(function(g){g.type===Cs&&g.value.includes("&")&&(g.props[0]=g.props[0].replace(Lx,r).replace(n,d))}),c.prefix&&p.push(px),p.push(dx);var v=function(g,x,w,C){x===void 0&&(x=""),w===void 0&&(w=""),C===void 0&&(C="&"),t=C,r=x,n=new RegExp("\\".concat(r,"\\b"),"g");var m=g.replace(Hx,""),A=ux(w||x?"".concat(w," ").concat(x," { ").concat(m," }"):m);c.namespace&&(A=vm(A,c.namespace));var S=[];return ls(A,fx(p.concat(hx(function(D){return S.push(D)})))),S};return v.hash=f.length?f.reduce(function(g,x){return x.name||ai(15),Uo(g,x.name)},lm).toString():"",v}var Kx=new gm,q0=qx(),bm=He.createContext({shouldForwardProp:void 0,styleSheet:Kx,stylis:q0});bm.Consumer;He.createContext(void 0);function $h(){return go(bm)}var ym=(function(){function e(t,r){var n=this;this.inject=function(o,i){i===void 0&&(i=q0);var c=n.name+i.hash;o.hasNameForId(n.id,c)||o.insertRules(n.id,c,i(n.rules,c,"@keyframes"))},this.name=t,this.id="sc-keyframes-".concat(t),this.rules=r,Iu(this,function(){throw ai(12,String(n.name))})}return e.prototype.getName=function(t){return t===void 0&&(t=q0),this.name+t.hash},e})(),Wx=function(e){return e>="A"&&e<="Z"};function Mh(e){for(var t="",r=0;r<e.length;r++){var n=e[r];if(r===1&&n==="-"&&e[0]==="-")return e;Wx(n)?t+="-"+n.toLowerCase():t+=n}return t.startsWith("ms-")?"-"+t:t}var xm=function(e){return e==null||e===!1||e===""},wm=function(e){var t,r,n=[];for(var o in e){var i=e[o];e.hasOwnProperty(o)&&!xm(i)&&(Array.isArray(i)&&i.isCss||ua(i)?n.push("".concat(Mh(o),":"),i,";"):Ga(i)?n.push.apply(n,Xa(Xa(["".concat(o," {")],wm(i),!1),["}"],!1)):n.push("".concat(Mh(o),": ").concat((t=o,(r=i)==null||typeof r=="boolean"||r===""?"":typeof r!="number"||r===0||t in mx||t.startsWith("--")?String(r).trim():"".concat(r,"px")),";")))}return n};function Fo(e,t,r,n){if(xm(e))return[];if(_u(e))return[".".concat(e.styledComponentId)];if(ua(e)){if(!ua(i=e)||i.prototype&&i.prototype.isReactComponent||!t)return[e];var o=e(t);return Fo(o,t,r,n)}var i;return e instanceof ym?r?(e.inject(r,n),[e.getName(n)]):[e]:Ga(e)?wm(e):Array.isArray(e)?Array.prototype.concat.apply(As,e.map(function(c){return Fo(c,t,r,n)})):[e.toString()]}function Vx(e){for(var t=0;t<e.length;t+=1){var r=e[t];if(ua(r)&&!_u(r))return!1}return!0}var Ux=um(Ss),Xx=(function(){function e(t,r,n){this.rules=t,this.staticRulesId="",this.isStatic=(n===void 0||n.isStatic)&&Vx(t),this.componentId=r,this.baseHash=Uo(Ux,r),this.baseStyle=n,gm.registerId(r)}return e.prototype.generateAndInjectStyles=function(t,r,n){var o=this.baseStyle?this.baseStyle.generateAndInjectStyles(t,r,n):"";if(this.isStatic&&!n.hash)if(this.staticRulesId&&r.hasNameForId(this.componentId,this.staticRulesId))o=Do(o,this.staticRulesId);else{var i=L0(Fo(this.rules,t,r,n)),c=j0(Uo(this.baseHash,i)>>>0);if(!r.hasNameForId(this.componentId,c)){var u=n(i,".".concat(c),void 0,this.componentId);r.insertRules(this.componentId,c,u)}o=Do(o,c),this.staticRulesId=c}else{for(var f=Uo(this.baseHash,n.hash),d="",p=0;p<this.rules.length;p++){var v=this.rules[p];if(typeof v=="string")d+=v;else if(v){var g=L0(Fo(v,t,r,n));f=Uo(f,g+p),d+=g}}if(d){var x=j0(f>>>0);r.hasNameForId(this.componentId,x)||r.insertRules(this.componentId,x,n(d,".".concat(x),void 0,this.componentId)),o=Do(o,x)}}return o},e})(),Cm=He.createContext(void 0);Cm.Consumer;var Wl={};function Gx(e,t,r){var n=_u(e),o=e,i=!Kl(e),c=t.attrs,u=c===void 0?As:c,f=t.componentId,d=f===void 0?(function($,F){var B=typeof $!="string"?"sc":Sh($);Wl[B]=(Wl[B]||0)+1;var R="".concat(B,"-").concat(cm(Ss+B+Wl[B]));return F?"".concat(F,"-").concat(R):R})(t.displayName,t.parentComponentId):f,p=t.displayName,v=p===void 0?(function($){return Kl($)?"styled.".concat($):"Styled(".concat(wx($),")")})(e):p,g=t.displayName&&t.componentId?"".concat(Sh(t.displayName),"-").concat(t.componentId):t.componentId||d,x=n&&o.attrs?o.attrs.concat(u).filter(Boolean):u,w=t.shouldForwardProp;if(n&&o.shouldForwardProp){var C=o.shouldForwardProp;if(t.shouldForwardProp){var m=t.shouldForwardProp;w=function($,F){return C($,F)&&m($,F)}}else w=C}var A=new Xx(r,g,n?o.componentStyle:void 0);function S($,F){return(function(B,R,I){var T=B.attrs,W=B.componentStyle,H=B.defaultProps,Z=B.foldedComponentIds,Y=B.styledComponentId,j=B.target,K=He.useContext(Cm),U=$h(),G=B.shouldForwardProp||U.shouldForwardProp,J=vx(R,K,H)||la,z=(function(be,X,fe){for(var ce,se=ln(ln({},X),{className:void 0,theme:fe}),oe=0;oe<be.length;oe+=1){var he=ua(ce=be[oe])?ce(se):ce;for(var we in he)se[we]=we==="className"?Do(se[we],he[we]):we==="style"?ln(ln({},se[we]),he[we]):he[we]}return X.className&&(se.className=Do(se.className,X.className)),se})(T,R,J),ie=z.as||j,ge={};for(var xe in z)z[xe]===void 0||xe[0]==="$"||xe==="as"||xe==="theme"&&z.theme===J||(xe==="forwardedAs"?ge.as=z.forwardedAs:G&&!G(xe,ie)||(ge[xe]=z[xe]));var Ae=(function(be,X){var fe=$h(),ce=be.generateAndInjectStyles(X,fe.styleSheet,fe.stylis);return ce})(W,z),Fe=Do(Z,Y);return Ae&&(Fe+=" "+Ae),z.className&&(Fe+=" "+z.className),ge[Kl(ie)&&!sm.has(ie)?"class":"className"]=Fe,I&&(ge.ref=I),Wi(ie,ge)})(D,$,F)}S.displayName=v;var D=He.forwardRef(S);return D.attrs=x,D.componentStyle=A,D.displayName=v,D.shouldForwardProp=w,D.foldedComponentIds=n?Do(o.foldedComponentIds,o.styledComponentId):"",D.styledComponentId=g,D.target=n?o.target:e,Object.defineProperty(D,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function($){this._foldedDefaultProps=n?(function(F){for(var B=[],R=1;R<arguments.length;R++)B[R-1]=arguments[R];for(var I=0,T=B;I<T.length;I++)H0(F,T[I],!0);return F})({},o.defaultProps,$):$}}),Iu(D,function(){return".".concat(D.styledComponentId)}),i&&pm(D,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),D}function Rh(e,t){for(var r=[e[0]],n=0,o=t.length;n<o;n+=1)r.push(t[n],e[n+1]);return r}var Ph=function(e){return Object.assign(e,{isCss:!0})};function Bs(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(ua(e)||Ga(e))return Ph(Fo(Rh(As,Xa([e],t,!0))));var n=e;return t.length===0&&n.length===1&&typeof n[0]=="string"?Fo(n):Ph(Fo(Rh(n,t)))}function K0(e,t,r){if(r===void 0&&(r=la),!t)throw ai(1,t);var n=function(o){for(var i=[],c=1;c<arguments.length;c++)i[c-1]=arguments[c];return e(t,r,Bs.apply(void 0,Xa([o],i,!1)))};return n.attrs=function(o){return K0(e,t,ln(ln({},r),{attrs:Array.prototype.concat(r.attrs,o).filter(Boolean)}))},n.withConfig=function(o){return K0(e,t,ln(ln({},r),o))},n}var Dm=function(e){return K0(Gx,e)},Le=Dm;sm.forEach(function(e){Le[e]=Dm(e)});function km(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n=L0(Bs.apply(void 0,Xa([e],t,!1))),o=cm(n);return new ym(o,n)}var zh={exports:{}},_h;function Yx(){return _h||(_h=1,(function(e){var t=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
|
|
144
|
-
* Prism: Lightweight, robust, elegant syntax highlighting
|
|
145
|
-
*
|
|
146
|
-
* @license MIT <https://opensource.org/licenses/MIT>
|
|
147
|
-
* @author Lea Verou <https://lea.verou.me>
|
|
148
|
-
* @namespace
|
|
149
|
-
* @public
|
|
150
|
-
*/var r=(function(n){var o=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,i=0,c={},u={manual:n.Prism&&n.Prism.manual,disableWorkerMessageHandler:n.Prism&&n.Prism.disableWorkerMessageHandler,util:{encode:function S(D){return D instanceof f?new f(D.type,S(D.content),D.alias):Array.isArray(D)?D.map(S):D.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(S){return Object.prototype.toString.call(S).slice(8,-1)},objId:function(S){return S.__id||Object.defineProperty(S,"__id",{value:++i}),S.__id},clone:function S(D,$){$=$||{};var F,B;switch(u.util.type(D)){case"Object":if(B=u.util.objId(D),$[B])return $[B];F={},$[B]=F;for(var R in D)D.hasOwnProperty(R)&&(F[R]=S(D[R],$));return F;case"Array":return B=u.util.objId(D),$[B]?$[B]:(F=[],$[B]=F,D.forEach(function(I,T){F[T]=S(I,$)}),F);default:return D}},getLanguage:function(S){for(;S;){var D=o.exec(S.className);if(D)return D[1].toLowerCase();S=S.parentElement}return"none"},setLanguage:function(S,D){S.className=S.className.replace(RegExp(o,"gi"),""),S.classList.add("language-"+D)},currentScript:function(){if(typeof document>"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT")return document.currentScript;try{throw new Error}catch(F){var S=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(F.stack)||[])[1];if(S){var D=document.getElementsByTagName("script");for(var $ in D)if(D[$].src==S)return D[$]}return null}},isActive:function(S,D,$){for(var F="no-"+D;S;){var B=S.classList;if(B.contains(D))return!0;if(B.contains(F))return!1;S=S.parentElement}return!!$}},languages:{plain:c,plaintext:c,text:c,txt:c,extend:function(S,D){var $=u.util.clone(u.languages[S]);for(var F in D)$[F]=D[F];return $},insertBefore:function(S,D,$,F){F=F||u.languages;var B=F[S],R={};for(var I in B)if(B.hasOwnProperty(I)){if(I==D)for(var T in $)$.hasOwnProperty(T)&&(R[T]=$[T]);$.hasOwnProperty(I)||(R[I]=B[I])}var W=F[S];return F[S]=R,u.languages.DFS(u.languages,function(H,Z){Z===W&&H!=S&&(this[H]=R)}),R},DFS:function S(D,$,F,B){B=B||{};var R=u.util.objId;for(var I in D)if(D.hasOwnProperty(I)){$.call(D,I,D[I],F||I);var T=D[I],W=u.util.type(T);W==="Object"&&!B[R(T)]?(B[R(T)]=!0,S(T,$,null,B)):W==="Array"&&!B[R(T)]&&(B[R(T)]=!0,S(T,$,I,B))}}},plugins:{},highlightAll:function(S,D){u.highlightAllUnder(document,S,D)},highlightAllUnder:function(S,D,$){var F={callback:$,container:S,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};u.hooks.run("before-highlightall",F),F.elements=Array.prototype.slice.apply(F.container.querySelectorAll(F.selector)),u.hooks.run("before-all-elements-highlight",F);for(var B=0,R;R=F.elements[B++];)u.highlightElement(R,D===!0,F.callback)},highlightElement:function(S,D,$){var F=u.util.getLanguage(S),B=u.languages[F];u.util.setLanguage(S,F);var R=S.parentElement;R&&R.nodeName.toLowerCase()==="pre"&&u.util.setLanguage(R,F);var I=S.textContent,T={element:S,language:F,grammar:B,code:I};function W(Z){T.highlightedCode=Z,u.hooks.run("before-insert",T),T.element.innerHTML=T.highlightedCode,u.hooks.run("after-highlight",T),u.hooks.run("complete",T),$&&$.call(T.element)}if(u.hooks.run("before-sanity-check",T),R=T.element.parentElement,R&&R.nodeName.toLowerCase()==="pre"&&!R.hasAttribute("tabindex")&&R.setAttribute("tabindex","0"),!T.code){u.hooks.run("complete",T),$&&$.call(T.element);return}if(u.hooks.run("before-highlight",T),!T.grammar){W(u.util.encode(T.code));return}if(D&&n.Worker){var H=new Worker(u.filename);H.onmessage=function(Z){W(Z.data)},H.postMessage(JSON.stringify({language:T.language,code:T.code,immediateClose:!0}))}else W(u.highlight(T.code,T.grammar,T.language))},highlight:function(S,D,$){var F={code:S,grammar:D,language:$};if(u.hooks.run("before-tokenize",F),!F.grammar)throw new Error('The language "'+F.language+'" has no grammar.');return F.tokens=u.tokenize(F.code,F.grammar),u.hooks.run("after-tokenize",F),f.stringify(u.util.encode(F.tokens),F.language)},tokenize:function(S,D){var $=D.rest;if($){for(var F in $)D[F]=$[F];delete D.rest}var B=new v;return g(B,B.head,S),p(S,B,D,B.head,0),w(B)},hooks:{all:{},add:function(S,D){var $=u.hooks.all;$[S]=$[S]||[],$[S].push(D)},run:function(S,D){var $=u.hooks.all[S];if(!(!$||!$.length))for(var F=0,B;B=$[F++];)B(D)}},Token:f};n.Prism=u;function f(S,D,$,F){this.type=S,this.content=D,this.alias=$,this.length=(F||"").length|0}f.stringify=function S(D,$){if(typeof D=="string")return D;if(Array.isArray(D)){var F="";return D.forEach(function(W){F+=S(W,$)}),F}var B={type:D.type,content:S(D.content,$),tag:"span",classes:["token",D.type],attributes:{},language:$},R=D.alias;R&&(Array.isArray(R)?Array.prototype.push.apply(B.classes,R):B.classes.push(R)),u.hooks.run("wrap",B);var I="";for(var T in B.attributes)I+=" "+T+'="'+(B.attributes[T]||"").replace(/"/g,""")+'"';return"<"+B.tag+' class="'+B.classes.join(" ")+'"'+I+">"+B.content+"</"+B.tag+">"};function d(S,D,$,F){S.lastIndex=D;var B=S.exec($);if(B&&F&&B[1]){var R=B[1].length;B.index+=R,B[0]=B[0].slice(R)}return B}function p(S,D,$,F,B,R){for(var I in $)if(!(!$.hasOwnProperty(I)||!$[I])){var T=$[I];T=Array.isArray(T)?T:[T];for(var W=0;W<T.length;++W){if(R&&R.cause==I+","+W)return;var H=T[W],Z=H.inside,Y=!!H.lookbehind,j=!!H.greedy,K=H.alias;if(j&&!H.pattern.global){var U=H.pattern.toString().match(/[imsuy]*$/)[0];H.pattern=RegExp(H.pattern.source,U+"g")}for(var G=H.pattern||H,J=F.next,z=B;J!==D.tail&&!(R&&z>=R.reach);z+=J.value.length,J=J.next){var ie=J.value;if(D.length>S.length)return;if(!(ie instanceof f)){var ge=1,xe;if(j){if(xe=d(G,z,S,Y),!xe||xe.index>=S.length)break;var X=xe.index,Ae=xe.index+xe[0].length,Fe=z;for(Fe+=J.value.length;X>=Fe;)J=J.next,Fe+=J.value.length;if(Fe-=J.value.length,z=Fe,J.value instanceof f)continue;for(var be=J;be!==D.tail&&(Fe<Ae||typeof be.value=="string");be=be.next)ge++,Fe+=be.value.length;ge--,ie=S.slice(z,Fe),xe.index-=z}else if(xe=d(G,0,ie,Y),!xe)continue;var X=xe.index,fe=xe[0],ce=ie.slice(0,X),se=ie.slice(X+fe.length),oe=z+ie.length;R&&oe>R.reach&&(R.reach=oe);var he=J.prev;ce&&(he=g(D,he,ce),z+=ce.length),x(D,he,ge);var we=new f(I,Z?u.tokenize(fe,Z):fe,K,fe);if(J=g(D,he,we),se&&g(D,J,se),ge>1){var Ce={cause:I+","+W,reach:oe};p(S,D,$,J.prev,z,Ce),R&&Ce.reach>R.reach&&(R.reach=Ce.reach)}}}}}}function v(){var S={value:null,prev:null,next:null},D={value:null,prev:S,next:null};S.next=D,this.head=S,this.tail=D,this.length=0}function g(S,D,$){var F=D.next,B={value:$,prev:D,next:F};return D.next=B,F.prev=B,S.length++,B}function x(S,D,$){for(var F=D.next,B=0;B<$&&F!==S.tail;B++)F=F.next;D.next=F,F.prev=D,S.length-=B}function w(S){for(var D=[],$=S.head.next;$!==S.tail;)D.push($.value),$=$.next;return D}if(!n.document)return n.addEventListener&&(u.disableWorkerMessageHandler||n.addEventListener("message",function(S){var D=JSON.parse(S.data),$=D.language,F=D.code,B=D.immediateClose;n.postMessage(u.highlight(F,u.languages[$],$)),B&&n.close()},!1)),u;var C=u.util.currentScript();C&&(u.filename=C.src,C.hasAttribute("data-manual")&&(u.manual=!0));function m(){u.manual||u.highlightAll()}if(!u.manual){var A=document.readyState;A==="loading"||A==="interactive"&&C&&C.defer?document.addEventListener("DOMContentLoaded",m):window.requestAnimationFrame?window.requestAnimationFrame(m):window.setTimeout(m,16)}return u})(t);e.exports&&(e.exports=r),typeof Ko<"u"&&(Ko.Prism=r),r.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},r.languages.markup.tag.inside["attr-value"].inside.entity=r.languages.markup.entity,r.languages.markup.doctype.inside["internal-subset"].inside=r.languages.markup,r.hooks.add("wrap",function(n){n.type==="entity"&&(n.attributes.title=n.content.replace(/&/,"&"))}),Object.defineProperty(r.languages.markup.tag,"addInlined",{value:function(n,o){var i={};i["language-"+o]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:r.languages[o]},i.cdata=/^<!\[CDATA\[|\]\]>$/i;var c={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:i}};c["language-"+o]={pattern:/[\s\S]+/,inside:r.languages[o]};var u={};u[n]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return n}),"i"),lookbehind:!0,greedy:!0,inside:c},r.languages.insertBefore("markup","cdata",u)}}),Object.defineProperty(r.languages.markup.tag,"addAttribute",{value:function(n,o){r.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+n+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[o,"language-"+o],inside:r.languages[o]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),r.languages.html=r.languages.markup,r.languages.mathml=r.languages.markup,r.languages.svg=r.languages.markup,r.languages.xml=r.languages.extend("markup",{}),r.languages.ssml=r.languages.xml,r.languages.atom=r.languages.xml,r.languages.rss=r.languages.xml,(function(n){var o=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;n.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+o.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+o.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+o.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+o.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:o,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},n.languages.css.atrule.inside.rest=n.languages.css;var i=n.languages.markup;i&&(i.tag.addInlined("style","css"),i.tag.addAttribute("style","css"))})(r),r.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},r.languages.javascript=r.languages.extend("clike",{"class-name":[r.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),r.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,r.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:r.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:r.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:r.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:r.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:r.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),r.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:r.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),r.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),r.languages.markup&&(r.languages.markup.tag.addInlined("script","javascript"),r.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),r.languages.js=r.languages.javascript,(function(){if(typeof r>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var n="Loading\u2026",o=function(C,m){return"\u2716 Error "+C+" while fetching file: "+m},i="\u2716 Error: File does not exist or is empty",c={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},u="data-src-status",f="loading",d="loaded",p="failed",v="pre[data-src]:not(["+u+'="'+d+'"]):not(['+u+'="'+f+'"])';function g(C,m,A){var S=new XMLHttpRequest;S.open("GET",C,!0),S.onreadystatechange=function(){S.readyState==4&&(S.status<400&&S.responseText?m(S.responseText):S.status>=400?A(o(S.status,S.statusText)):A(i))},S.send(null)}function x(C){var m=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(C||"");if(m){var A=Number(m[1]),S=m[2],D=m[3];return S?D?[A,Number(D)]:[A,void 0]:[A,A]}}r.hooks.add("before-highlightall",function(C){C.selector+=", "+v}),r.hooks.add("before-sanity-check",function(C){var m=C.element;if(m.matches(v)){C.code="",m.setAttribute(u,f);var A=m.appendChild(document.createElement("CODE"));A.textContent=n;var S=m.getAttribute("data-src"),D=C.language;if(D==="none"){var $=(/\.(\w+)$/.exec(S)||[,"none"])[1];D=c[$]||$}r.util.setLanguage(A,D),r.util.setLanguage(m,D);var F=r.plugins.autoloader;F&&F.loadLanguages(D),g(S,function(B){m.setAttribute(u,d);var R=x(m.getAttribute("data-range"));if(R){var I=B.split(/\r\n?|\n/g),T=R[0],W=R[1]==null?I.length:R[1];T<0&&(T+=I.length),T=Math.max(0,Math.min(T-1,I.length)),W<0&&(W+=I.length),W=Math.max(0,Math.min(W,I.length)),B=I.slice(T,W).join(`
|
|
151
|
-
`),m.hasAttribute("data-start")||m.setAttribute("data-start",String(T+1))}A.textContent=B,r.highlightElement(A)},function(B){m.setAttribute(u,p),A.textContent=B})}}),r.plugins.fileHighlight={highlight:function(C){for(var m=(C||document).querySelectorAll(v),A=0,S;S=m[A++];)r.highlightElement(S)}};var w=!1;r.fileHighlight=function(){w||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),w=!0),r.plugins.fileHighlight.highlight.apply(this,arguments)}})()})(zh)),zh.exports}var Zx=Yx();const Qo=ri(Zx),Jx=Le.span.attrs({className:"unified-rich-text-template-container"})`
|
|
152
|
-
display: inline-block;
|
|
153
|
-
min-width: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.minWidth)||"80px"}};
|
|
154
|
-
padding: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.padding)||"2px 6px"}};
|
|
155
|
-
margin: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.margin)||"0 2px"}};
|
|
156
|
-
border-radius: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderRadius)||"4px"}};
|
|
157
|
-
border: none !important;
|
|
158
|
-
cursor: pointer;
|
|
159
|
-
transition: all 0.2s;
|
|
160
|
-
font-weight: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.fontWeight)||"500"}};
|
|
161
|
-
user-select: none;
|
|
162
|
-
font-size: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.fontSize)||"14px"}};
|
|
163
|
-
line-height: 2;
|
|
164
|
-
width: auto; /* 让宽度根据内容自动调整 */
|
|
165
|
-
min-width: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.minWidth)||"80px"}};
|
|
166
|
-
min-height: ${e=>{var c,u,f,d;const t=((u=(c=e.$styles)==null?void 0:c.templateField)==null?void 0:u.padding)||"2px 6px",r=((d=(f=e.$styles)==null?void 0:f.templateField)==null?void 0:d.fontSize)||"14px",n=t.split(" ").map(p=>parseInt(p)),o=(n.length,n[0]),i=parseInt(r);return o*2+i*1.4+"px"}};
|
|
167
|
-
|
|
168
|
-
/* 高度自适应 */
|
|
169
|
-
height: auto; /* 允许高度根据内容自动调整 */
|
|
170
|
-
white-space: normal; /* 允许换行 */
|
|
171
|
-
box-sizing: border-box; /* 确保padding和border包含在宽度内 */
|
|
172
|
-
overflow: visible; /* 确保内容不被隐藏 */
|
|
173
|
-
word-wrap: break-word; /* 允许长单词换行 */
|
|
174
|
-
max-width: 100%; /* 限制在容器宽度内 */
|
|
175
|
-
|
|
176
|
-
/* 使用传入的样式配置 */
|
|
177
|
-
background-color: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.backgroundColor)||"#E5EEFF"}};
|
|
178
|
-
color: #055AFF;
|
|
179
|
-
border: 1px solid ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderColor)||"#84ADFF"}};
|
|
180
|
-
|
|
181
|
-
${e=>{var t,r;return e.$isEditing&&`
|
|
182
|
-
background-color: white !important;
|
|
183
|
-
color: #055AFF !important;
|
|
184
|
-
border: 2px solid ${((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderColor)||"#84ADFF"} !important;
|
|
185
|
-
outline: none;
|
|
186
|
-
min-width: 30px;
|
|
187
|
-
`}}
|
|
188
|
-
|
|
189
|
-
&:hover {
|
|
190
|
-
opacity: 0.8;
|
|
191
|
-
}
|
|
192
|
-
`,Qx=Le.input.attrs({className:"unified-rich-text-template-input"})`
|
|
193
|
-
background: white;
|
|
194
|
-
border: 2px solid ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderColor)||"#84ADFF"}};
|
|
195
|
-
border-radius: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderRadius)||"4px"}};
|
|
196
|
-
padding: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.padding)||"2px 6px"}};
|
|
197
|
-
margin: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.margin)||"0 2px"}};
|
|
198
|
-
min-width: ${"30px"};
|
|
199
|
-
width: ${e=>{var d,p,v,g;const t=e.$value.length;if(t===0)return((p=(d=e.$styles)==null?void 0:d.templateField)==null?void 0:p.minWidth)||"120px";const r=((g=(v=e.$styles)==null?void 0:v.templateField)==null?void 0:g.padding)||"2px 6.2px",n=r.split(" ").map(x=>parseInt(x)),o=n.length===2?n[1]:n[0],i=12.5,c=20,u=t*i+o*2+c,f=Math.min(Math.max(u,120),e.$maxWidth);return console.log("TemplateInput \u5BBD\u5EA6\u8BA1\u7B97\u8C03\u8BD5:",{contentLength:t,padding:r,paddingValues:n,leftRightPadding:o,charWidth:i,bufferSpace:c,calculatedWidth:u,maxWidth:e.$maxWidth,finalWidth:f,inputValue:e.$value}),f+"px"}} !important; /* 使用!important确保宽度不被覆盖 */
|
|
200
|
-
height: ${e=>{var c,u,f,d;const t=((u=(c=e.$styles)==null?void 0:c.templateField)==null?void 0:u.padding)||"2px 6px",r=((d=(f=e.$styles)==null?void 0:f.templateField)==null?void 0:d.fontSize)||"14px",n=t.split(" ").map(p=>parseInt(p)),o=(n.length,n[0]),i=parseInt(r);return o*2+i*1.4+"px"}};
|
|
201
|
-
font-size: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.fontSize)||"14px"}};
|
|
202
|
-
font-family: inherit;
|
|
203
|
-
outline: none;
|
|
204
|
-
color: #055AFF;
|
|
205
|
-
line-height: 2;
|
|
206
|
-
box-sizing: border-box;
|
|
207
|
-
white-space: nowrap; /* 防止内部换行 */
|
|
208
|
-
overflow: hidden; /* 隐藏超出部分 */
|
|
209
|
-
text-overflow: ellipsis; /* 超出部分显示省略号 */
|
|
210
|
-
|
|
211
|
-
&:focus {
|
|
212
|
-
border-color: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderColor)||"#84ADFF"}};
|
|
213
|
-
box-shadow: 0 0 0 3px ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderColor)||"#84ADFF"}}20;
|
|
214
|
-
}
|
|
215
|
-
`,Em=Za(({element:e,attributes:t,children:r,styles:n,onTemplateChange:o},i)=>{var B,R,I,T,W,H,Z,Y,j,K,U,G;const c=Ip(),[u,f]=St(!1),[d,p]=St(e.value||""),[v,g]=St(e.value&&e.value!==""?e.value:e.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9"),[x,w]=St(600),C=Ht(null),m=Bt(()=>{try{const J=document.querySelector('[data-slate-editor="true"]');if(J){const z=J.closest('.sc-jwTyAe, .bdQKlw, [role="textbox"]')||J.parentElement;if(z){const ie=z.clientWidth,ge=ie-40;return console.log("TemplateField: \u7F16\u8F91\u5668\u5BB9\u5668\u5BBD\u5EA6:",ie,"\u53EF\u7528\u5BBD\u5EA6:",ge),Math.max(ge,200)}}return 600}catch(J){return console.warn("TemplateField: \u65E0\u6CD5\u83B7\u53D6\u7F16\u8F91\u5668\u5BBD\u5EA6\uFF0C\u4F7F\u7528\u9ED8\u8BA4\u503C:",J),600}},[]);Jt(()=>{g(e.value&&e.value!==""?e.value:e.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9");const J=m();w(J)},[e.value,e.placeholder,m]);const A=Bt(()=>{f(!0),p(e.value||""),setTimeout(()=>{C.current&&(C.current.focus(),C.current.select())},0)},[e.value]),S=Bt(J=>{const z=J.target.value;p(z)},[]),D=Bt(()=>{const J=$e.findPath(c,e);console.log("TemplateField: \u627E\u5230\u5143\u7D20\u8DEF\u5F84:",J),console.log("TemplateField: \u5F53\u524D\u5143\u7D20:",e),console.log("TemplateField: \u8981\u8BBE\u7F6E\u7684\u503C:",d),qe.setNodes(c,{value:d},{at:J});const z=d.trim()!==""?d:e.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9";g(z);const ie=c.children[J[0]];if(ie&&"children"in ie){const ge=ie.children[J[1]];console.log("TemplateField: \u66F4\u65B0\u540E\u7684\u5143\u7D20:",ge)}f(!1)},[c,e,d]),$=Bt(()=>{D()},[D]),F=Bt(J=>{J.key==="Enter"?(J.preventDefault(),D()):J.key==="Escape"&&(J.preventDefault(),p(e.value||""),f(!1))},[D,e.value]);return u?q.jsxs("span",{...t,"data-slate-void":"true","data-slate-inline":"true","data-slate-length":"0",contentEditable:!1,children:[q.jsx(Qx,{ref:C,value:d,onChange:S,onBlur:$,onKeyDown:F,placeholder:"",$styles:n,$value:d,$maxWidth:x,style:{backgroundColor:"white",color:((B=n==null?void 0:n.templateField)==null?void 0:B.textColor)||"#055AFF",border:`2px solid ${((R=n==null?void 0:n.templateField)==null?void 0:R.borderColor)||"#84ADFF"}`,minWidth:((I=n==null?void 0:n.templateField)==null?void 0:I.minWidth)||"120px"}}),r]}):q.jsxs("span",{...t,"data-slate-void":"true","data-slate-inline":"true","data-slate-length":"0",contentEditable:!1,children:[q.jsxs(Jx,{ref:i,$style:e.style||"blue",$isEditing:!1,$styles:n,$contentLength:v.length,onClick:A,style:{letterSpacing:n==null?void 0:n.letterSpacing,lineHeight:n==null?void 0:n.lineHeight,backgroundColor:(T=n==null?void 0:n.templateField)==null?void 0:T.backgroundColor,borderColor:(W=n==null?void 0:n.templateField)==null?void 0:W.borderColor,borderRadius:(H=n==null?void 0:n.templateField)==null?void 0:H.borderRadius,padding:(Z=n==null?void 0:n.templateField)==null?void 0:Z.padding,margin:(Y=n==null?void 0:n.templateField)==null?void 0:Y.margin,fontSize:(j=n==null?void 0:n.templateField)==null?void 0:j.fontSize,fontWeight:(K=n==null?void 0:n.templateField)==null?void 0:K.fontWeight,minWidth:(U=n==null?void 0:n.templateField)==null?void 0:U.minWidth,color:(G=n==null?void 0:n.templateField)==null?void 0:G.textColor,width:"auto",maxWidth:"100%"},children:[(console.log("TemplateField \u6E32\u67D3\u8C03\u8BD5:",{elementValue:e.value,elementPlaceholder:e.placeholder,displayValue:v,displayValueLength:v.length,contentLength:v.length}),null),v]}),q.jsx("span",{contentEditable:!1,style:{display:"none"},children:r})]})});Em.displayName="TemplateField";const ew=({children:e,attributes:t,styles:r,extraProps:n})=>{var i;const o=!!(n!=null&&n.isCollapsed);return q.jsxs("div",{...t,className:"think-container",children:[q.jsx("div",{className:"think-indicator"}),q.jsx("div",{className:"think-content py-2",children:q.jsx("div",{className:"think-text text-[#86909C] pl-5 my-3 border border-[#ECECEE] border-solid border-l-3 border-t-0 border-b-0 border-r-0",style:{color:`${(i=r==null?void 0:r.text)==null?void 0:i.color} !important`,display:o?"none":"block"},children:e})})]})},Sm=He.forwardRef(({attributes:e,element:t,eventsEmit:r,dataSource:n,tagIndex:o},i)=>{var $;const[c,u]=St(null),[f,d]=St(!0),[p,v]=St(1),[g,x]=St(10);Jt(()=>{if(!c){if(!n){d(!0);try{const F=new CustomEvent("retrieve-sql-data:request-data",{detail:{id:t.id}});window.dispatchEvent(F)}catch{console.warn("Failed to dispatch retrieve-sql-data:request-data")}return}try{const F=(n==null?void 0:n.queryReplyPairList)||[];console.log("RetrieveSqlDataElement pairList:",F);let B=null,R=null,I;for(const H of F){const Z=H==null?void 0:H.reply;if(!(Z!=null&&Z.databaseReference))continue;const Y=Z.databaseReference;console.log(Y,"123123123jk123lk12j3l12jl3"),Y!=null&&Y.retrieveSqlData&&(console.log("Found source in raw12eku1h2lkjeh12ljkhelk12hejk:",Y.retrieveSqlData.filePath),I=Y.retrieveSqlData.filePath);let j=Y;if(typeof Y=="string")try{j=JSON.parse(Y)}catch{}if(!j)continue;const K=Array.isArray(j)?j:[j],U=K.findIndex(z=>(z==null?void 0:z.id)===t.id),G=U>=0?K[U]:null;if(console.log("~~~~~~~~~~~~~~~",G),G){B=G,R=G.retrieveSqlData||G.retrieve_table_data||G.retrieveTableData;break}const J=K.find(z=>{var ie,ge;return(((ge=(ie=z==null?void 0:z.retrieveSqlData)==null?void 0:ie.preData)==null?void 0:ge.length)||0)>0});!B&&J&&(B=J,R=J.retrieveSqlData||J.retrieve_table_data||J.retrieveTableData)}if(!B||!R){console.warn("No databaseReference with preData found for id:",t.id),d(!1);return}const T=Array.isArray(R==null?void 0:R.preData)?R.preData[0]:null;if(!T){console.warn("Matched item has no preData"),d(!1);return}const W={columns:(T.columns||[]).map(H=>({key:H.key,title:H.title})),rows:T.data||T.rows||[],total:(R==null?void 0:R.total)||0,fetchUrl:(R==null?void 0:R.fetchUrl)||"/index/knowledgeBase/file/stream",source:I||(R==null?void 0:R.source)||(B==null?void 0:B.source)};u(W),d(!1)}catch(F){console.error("Init preData parsing failed:",F),d(!1)}}},[t.id,c,n]),Jt(()=>{const F=B=>{try{const R=(B==null?void 0:B.detail)||{},I=R==null?void 0:R.id;if(!I||String(I)!==String(t.id))return;const T=R.databaseReference;if(!T)return;let W=T;if(typeof T=="string")try{W=JSON.parse(T)}catch{}if(!W)return;const H=Array.isArray(W)?W:[W],Z=H.findIndex(G=>String(G==null?void 0:G.id)===String(t.id)),Y=Z>=0?H[Z]:null;if(!Y)return;const j=(Y==null?void 0:Y.retrieveSqlData)||(Y==null?void 0:Y.retrieve_table_data)||(Y==null?void 0:Y.retrieveTableData),K=Array.isArray(j==null?void 0:j.preData)?j.preData[0]:null;if(!K)return;const U={columns:(K.columns||[]).map(G=>({key:G.key,title:G.title})),rows:K.data||K.rows||[],total:(j==null?void 0:j.total)||0,fetchUrl:(j==null?void 0:j.fetchUrl)||"/index/knowledgeBase/file/stream",source:(Y==null?void 0:Y.source)||(j==null?void 0:j.source)};u(U),d(!1)}catch{console.warn("Failed to handle retrieve-sql-data:data-response")}};return window.addEventListener("retrieve-sql-data:data-response",F),()=>{window.removeEventListener("retrieve-sql-data:data-response",F)}},[t.id]);const w=F=>{if(!F||F.length===0)return[];const B=F.find(R=>R&&typeof R=="object")||{};return Object.keys(B).map(R=>({key:R,title:R}))},C=(F,B)=>{v(F),B&&x(B);const R=I=>{let T=null;if(I&&Array.isArray(I.columns)&&Array.isArray(I.rows))T={columns:I.columns,rows:I.rows,total:Number(I.total)||0,fetchUrl:I.fetchUrl||(c==null?void 0:c.fetchUrl)||"",source:I.source||(c==null?void 0:c.source)};else if(I&&Array.isArray(I.data)){const W=I.data;T={columns:c!=null&&c.columns&&c.columns.length>0?c.columns:w(W),rows:W,total:Number(I.totalCount??I.total??(c==null?void 0:c.total)??W.length)||0,fetchUrl:(c==null?void 0:c.fetchUrl)||"",source:c==null?void 0:c.source},typeof I.currentPage=="number"&&v(I.currentPage),typeof I.pageSize=="number"&&x(I.pageSize)}else if(Array.isArray(I)){const W=I;T={columns:c!=null&&c.columns&&c.columns.length>0?c.columns:w(W),rows:W,total:Number((c==null?void 0:c.total)??W.length)||0,fetchUrl:(c==null?void 0:c.fetchUrl)||"",source:c==null?void 0:c.source}}if(!T){console.warn("replacePredataFunction received unsupported data format:",I);return}console.log("Replacing table data with:",T),u(T)};r==null||r("retrieve-sql-data:pagingation_click",{id:t.id,page:F,pageSize:B||g,fetchUrl:c==null?void 0:c.fetchUrl,total:c==null?void 0:c.total,source:c==null?void 0:c.source,replacePredataFunction:R})},m=F=>c!=null&&c.rows?Math.max(...c.rows.map(B=>{const R=B[F];return R?String(R).length:0})):0,A=((($=c==null?void 0:c.columns)==null?void 0:$.length)||0)===1,S=(c==null?void 0:c.columns.map((F,B)=>({title:F.title||F.key,dataIndex:F.key,key:F.key,render:R=>{const I=R==null||R===""?"-":R;return A?q.jsx("div",{style:{whiteSpace:"normal",wordBreak:"break-word",overflowWrap:"anywhere",lineHeight:1.5},children:String(I)}):I},...A?{width:void 0}:{}})))||[],D=(c==null?void 0:c.rows.map((F,B)=>({key:B,...F})))||[];return q.jsx("div",{...e,ref:i,className:"retrieve-sql-data-container my-4",children:f?q.jsxs("div",{className:"flex items-center justify-center py-8",children:[q.jsx(f1,{size:"large"}),q.jsx("span",{className:"ml-2 text-gray-500",children:"\u52A0\u8F7D\u6570\u636E\u4E2D..."})]}):c?q.jsxs("div",{className:"retrieve-sql-data-content",children:[o!==null&&(()=>{const F=String(o).length;let B="12px",R="24px",I="24px";return F===2?(B="9px",R="22px",I="24px"):F===3?(B="8px",R="24px",I="24px"):F>=4&&(B="8px",R="24px",I="30px"),q.jsxs("div",{className:"mb-2 flex items-center",children:[q.jsx("span",{className:"bg-orange-100 text-orange-600 rounded font-medium flex items-center justify-center",style:{width:R,height:R,minWidth:I,fontSize:B,lineHeight:1},children:o}),q.jsx("span",{children:" \u6570\u636E\u8868\u67E5\u8BE2\u7ED3\u679C\uFF1A"})]})})(),q.jsx("div",{className:"table-container",style:{border:"1px solid #d9d9d9",borderRadius:"6px",position:"relative"},children:q.jsx(Zn,{columns:S.map((F,B)=>({...F,...A?{width:void 0,minWidth:void 0,maxWidth:void 0,fixed:void 0,ellipsis:!1}:{width:B===0?160:void 0,minWidth:120,maxWidth:B===0?180:300,fixed:B===0?"left":void 0,ellipsis:{showTitle:!0}},render:R=>{if(R==null)return"-";const I=String(R);if(A)return q.jsx("div",{style:{whiteSpace:"normal",wordBreak:"break-word",overflowWrap:"anywhere",lineHeight:1.5,cursor:"default"},title:I,children:I});const T=m(F.key);let W="200px";return B===0?W="80px":T<=8?W="100px":T<=15?W="150px":T<=25?W="200px":T<=40?W="250px":W="300px",q.jsx("div",{style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:W,display:"inline-block",cursor:"default"},title:I,children:I})}})),dataSource:D,pagination:!1,size:"small",bordered:!1,className:"database-table",style:{minWidth:A?"100%":"1000px"},scroll:{x:A?void 0:"max-content",y:400}})}),c.total>g&&q.jsx("div",{className:"flex justify-center mt-3",children:q.jsx(h1,{current:p,pageSize:g,total:c.total,onChange:C,onShowSizeChange:C,showSizeChanger:!1,showQuickJumper:!1,size:"small"})})]}):q.jsx("div",{className:"text-center py-4 text-gray-500",children:"\u6682\u65E0\u6570\u636E"})})});Sm.displayName="RetrieveSqlDataElement";var Ki={exports:{}},Vl={exports:{}},Ul,Ih;function tw(){if(Ih)return Ul;Ih=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Ul=e,Ul}var Xl,jh;function rw(){if(jh)return Xl;jh=1;var e=tw();function t(){}function r(){}return r.resetWarningCache=t,Xl=function(){function n(c,u,f,d,p,v){if(v!==e){var g=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw g.name="Invariant Violation",g}}n.isRequired=n;function o(){return n}var i={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:o,element:n,elementType:n,instanceOf:o,node:n,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:r,resetWarningCache:t};return i.PropTypes=i,i},Xl}var Lh;function nw(){return Lh||(Lh=1,Vl.exports=rw()()),Vl.exports}var W0={exports:{}},ow=W0.exports,Hh;function aw(){return Hh||(Hh=1,(function(e,t){(function(r,n){e.exports=n()})(typeof self<"u"?self:ow,function(){return(function(){var r={};(function(){r.d=function(s,a){for(var l in a)r.o(a,l)&&!r.o(s,l)&&Object.defineProperty(s,l,{enumerable:!0,get:a[l]})}})(),(function(){r.o=function(s,a){return Object.prototype.hasOwnProperty.call(s,a)}})();var n={};r.d(n,{default:function(){return kg}});class o{constructor(a,l){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;let h="KaTeX parse error: "+a,b,E;const O=l&&l.loc;if(O&&O.start<=O.end){const V=O.lexer.input;b=O.start,E=O.end,b===V.length?h+=" at end of input: ":h+=" at position "+(b+1)+": ";const te=V.slice(b,E).replace(/[^]/g,"$&\u0332");let de;b>15?de="\u2026"+V.slice(b-15,b):de=V.slice(0,b);let pe;E+15<V.length?pe=V.slice(E,E+15)+"\u2026":pe=V.slice(E),h+=de+te+pe}const _=new Error(h);return _.name="ParseError",_.__proto__=o.prototype,_.position=b,b!=null&&E!=null&&(_.length=E-b),_.rawMessage=a,_}}o.prototype.__proto__=Error.prototype;var i=o;const c=function(s,a){return s===void 0?a:s},u=/([A-Z])/g,f=function(s){return s.replace(u,"-$1").toLowerCase()},d={"&":"&",">":">","<":"<",'"':""","'":"'"},p=/[&><"']/g;function v(s){return String(s).replace(p,a=>d[a])}const g=function(s){return s.type==="ordgroup"||s.type==="color"?s.body.length===1?g(s.body[0]):s:s.type==="font"?g(s.body):s},x=function(s){const a=g(s);return a.type==="mathord"||a.type==="textord"||a.type==="atom"},w=function(s){if(!s)throw new Error("Expected non-null, but got "+String(s));return s};var C={deflt:c,escape:v,hyphenate:f,getBaseElem:g,isCharacterBox:x,protocolFromUrl:function(s){const a=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(s);return a?a[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(a[1])?null:a[1].toLowerCase():"_relative"}};const m={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:s=>"#"+s},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:(s,a)=>(a.push(s),a)},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:s=>Math.max(0,s),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:s=>Math.max(0,s),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:s=>Math.max(0,s),cli:"-e, --max-expand <n>",cliProcessor:s=>s==="Infinity"?1/0:parseInt(s)},globalGroup:{type:"boolean",cli:!1}};function A(s){if(s.default)return s.default;const a=s.type,l=Array.isArray(a)?a[0]:a;if(typeof l!="string")return l.enum[0];switch(l){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class S{constructor(a){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,a=a||{};for(const l in m)if(m.hasOwnProperty(l)){const h=m[l];this[l]=a[l]!==void 0?h.processor?h.processor(a[l]):a[l]:A(h)}}reportNonstrict(a,l,h){let b=this.strict;if(typeof b=="function"&&(b=b(a,l,h)),!(!b||b==="ignore")){if(b===!0||b==="error")throw new i("LaTeX-incompatible input and strict mode is set to 'error': "+(l+" ["+a+"]"),h);b==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(l+" ["+a+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+b+"': "+l+" ["+a+"]"))}}useStrictBehavior(a,l,h){let b=this.strict;if(typeof b=="function")try{b=b(a,l,h)}catch{b="error"}return!b||b==="ignore"?!1:b===!0||b==="error"?!0:b==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(l+" ["+a+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+b+"': "+l+" ["+a+"]")),!1)}isTrusted(a){if(a.url&&!a.protocol){const l=C.protocolFromUrl(a.url);if(l==null)return!1;a.protocol=l}return!!(typeof this.trust=="function"?this.trust(a):this.trust)}}class D{constructor(a,l,h){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=a,this.size=l,this.cramped=h}sup(){return Z[Y[this.id]]}sub(){return Z[j[this.id]]}fracNum(){return Z[K[this.id]]}fracDen(){return Z[U[this.id]]}cramp(){return Z[G[this.id]]}text(){return Z[J[this.id]]}isTight(){return this.size>=2}}const $=0,F=1,B=2,R=3,I=4,T=5,W=6,H=7,Z=[new D($,0,!1),new D(F,0,!0),new D(B,1,!1),new D(R,1,!0),new D(I,2,!1),new D(T,2,!0),new D(W,3,!1),new D(H,3,!0)],Y=[I,T,I,T,W,H,W,H],j=[T,T,T,T,H,H,H,H],K=[B,R,I,T,W,H,W,H],U=[R,R,T,T,H,H,H,H],G=[F,F,R,R,T,T,H,H],J=[$,F,B,R,B,R,B,R];var z={DISPLAY:Z[$],TEXT:Z[B],SCRIPT:Z[I],SCRIPTSCRIPT:Z[W]};const ie=[{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]]}];function ge(s){for(let a=0;a<ie.length;a++){const l=ie[a];for(let h=0;h<l.blocks.length;h++){const b=l.blocks[h];if(s>=b[0]&&s<=b[1])return l.name}}return null}const xe=[];ie.forEach(s=>s.blocks.forEach(a=>xe.push(...a)));function Ae(s){for(let a=0;a<xe.length;a+=2)if(s>=xe[a]&&s<=xe[a+1])return!0;return!1}const Fe=80,be=function(s,a){return"M95,"+(622+s+a)+`
|
|
216
|
-
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
|
|
217
|
-
c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
|
|
218
|
-
c44.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
|
|
219
|
-
s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
|
|
220
|
-
c69,-144,104.5,-217.7,106.5,-221
|
|
221
|
-
l`+s/2.075+" -"+s+`
|
|
222
|
-
c5.3,-9.3,12,-14,20,-14
|
|
223
|
-
H400000v`+(40+s)+`H845.2724
|
|
224
|
-
s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
|
|
225
|
-
c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
|
|
226
|
-
M`+(834+s)+" "+a+"h400000v"+(40+s)+"h-400000z"},X=function(s,a){return"M263,"+(601+s+a)+`c0.7,0,18,39.7,52,119
|
|
227
|
-
c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
|
|
228
|
-
c340,-704.7,510.7,-1060.3,512,-1067
|
|
229
|
-
l`+s/2.084+" -"+s+`
|
|
230
|
-
c4.7,-7.3,11,-11,19,-11
|
|
231
|
-
H40000v`+(40+s)+`H1012.3
|
|
232
|
-
s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
|
|
233
|
-
c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1
|
|
234
|
-
s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
|
|
235
|
-
c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
|
|
236
|
-
M`+(1001+s)+" "+a+"h400000v"+(40+s)+"h-400000z"},fe=function(s,a){return"M983 "+(10+s+a)+`
|
|
237
|
-
l`+s/3.13+" -"+s+`
|
|
238
|
-
c4,-6.7,10,-10,18,-10 H400000v`+(40+s)+`
|
|
239
|
-
H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7
|
|
240
|
-
s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744
|
|
241
|
-
c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
|
|
242
|
-
c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
|
|
243
|
-
c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
|
|
244
|
-
c53.7,-170.3,84.5,-266.8,92.5,-289.5z
|
|
245
|
-
M`+(1001+s)+" "+a+"h400000v"+(40+s)+"h-400000z"},ce=function(s,a){return"M424,"+(2398+s+a)+`
|
|
246
|
-
c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
|
|
247
|
-
c0,-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
|
|
248
|
-
s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
|
|
249
|
-
s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
|
|
250
|
-
l`+s/4.223+" -"+s+`c4,-6.7,10,-10,18,-10 H400000
|
|
251
|
-
v`+(40+s)+`H1014.6
|
|
252
|
-
s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
|
|
253
|
-
c-2,6,-10,9,-24,9
|
|
254
|
-
c-8,0,-12,-0.7,-12,-2z M`+(1001+s)+" "+a+`
|
|
255
|
-
h400000v`+(40+s)+"h-400000z"},se=function(s,a){return"M473,"+(2713+s+a)+`
|
|
256
|
-
c339.3,-1799.3,509.3,-2700,510,-2702 l`+s/5.298+" -"+s+`
|
|
257
|
-
c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+s)+`H1017.7
|
|
258
|
-
s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
|
|
259
|
-
c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200
|
|
260
|
-
c0,-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
|
|
261
|
-
s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
|
|
262
|
-
606zM`+(1001+s)+" "+a+"h400000v"+(40+s)+"H1017.7z"},oe=function(s){const a=s/2;return"M400000 "+s+" H0 L"+a+" 0 l65 45 L145 "+(s-80)+" H400000z"},he=function(s,a,l){const h=l-54-a-s;return"M702 "+(s+a)+"H400000"+(40+s)+`
|
|
263
|
-
H742v`+h+`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
|
|
264
|
-
h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
|
|
265
|
-
c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
|
|
266
|
-
219 661 l218 661zM702 `+a+"H400000v"+(40+s)+"H742z"},we=function(s,a,l){a=1e3*a;let h="";switch(s){case"sqrtMain":h=be(a,Fe);break;case"sqrtSize1":h=X(a,Fe);break;case"sqrtSize2":h=fe(a,Fe);break;case"sqrtSize3":h=ce(a,Fe);break;case"sqrtSize4":h=se(a,Fe);break;case"sqrtTall":h=he(a,Fe,l)}return h},Ce=function(s,a){switch(s){case"\u239C":return"M291 0 H417 V"+a+" H291z M291 0 H417 V"+a+" H291z";case"\u2223":return"M145 0 H188 V"+a+" H145z M145 0 H188 V"+a+" H145z";case"\u2225":return"M145 0 H188 V"+a+" H145z M145 0 H188 V"+a+" H145z"+("M367 0 H410 V"+a+" H367z M367 0 H410 V"+a+" H367z");case"\u239F":return"M457 0 H583 V"+a+" H457z M457 0 H583 V"+a+" H457z";case"\u23A2":return"M319 0 H403 V"+a+" H319z M319 0 H403 V"+a+" H319z";case"\u23A5":return"M263 0 H347 V"+a+" H263z M263 0 H347 V"+a+" H263z";case"\u23AA":return"M384 0 H504 V"+a+" H384z M384 0 H504 V"+a+" H384z";case"\u23D0":return"M312 0 H355 V"+a+" H312z M312 0 H355 V"+a+" H312z";case"\u2016":return"M257 0 H300 V"+a+" H257z M257 0 H300 V"+a+" H257z"+("M478 0 H521 V"+a+" H478z M478 0 H521 V"+a+" H478z");default:return""}},ke={doubleleftarrow:`M262 157
|
|
267
|
-
l10-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
|
|
268
|
-
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
|
|
269
|
-
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
|
|
270
|
-
c2 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
|
|
271
|
-
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
|
|
272
|
-
-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
|
|
273
|
-
-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
|
|
274
|
-
m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
|
|
275
|
-
-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
|
|
276
|
-
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
|
|
277
|
-
-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
|
|
278
|
-
-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
|
|
279
|
-
-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
|
|
280
|
-
c-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
|
|
281
|
-
-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
|
|
282
|
-
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
|
|
283
|
-
-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
|
|
284
|
-
c-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
|
|
285
|
-
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
|
|
286
|
-
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
|
|
287
|
-
l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
|
|
288
|
-
-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
|
|
289
|
-
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
|
|
290
|
-
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
|
|
291
|
-
0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
|
|
292
|
-
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
|
|
293
|
-
H435C64 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
|
|
294
|
-
435 0h399565z`,leftgroupunder:`M400000 262
|
|
295
|
-
H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
|
|
296
|
-
435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
|
|
297
|
-
-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
|
|
298
|
-
-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
|
|
299
|
-
-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
|
|
300
|
-
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
|
|
301
|
-
-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
|
|
302
|
-
-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
|
|
303
|
-
m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
|
|
304
|
-
5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
|
|
305
|
-
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
|
|
306
|
-
-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
|
|
307
|
-
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
|
|
308
|
-
-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
|
|
309
|
-
v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
|
|
310
|
-
-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
|
|
311
|
-
-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
|
|
312
|
-
71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z
|
|
313
|
-
M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z
|
|
314
|
-
M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
|
|
315
|
-
-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
|
|
316
|
-
c28.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
|
|
317
|
-
68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z
|
|
318
|
-
M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334
|
|
319
|
-
c-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
|
|
320
|
-
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
|
|
321
|
-
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
|
|
322
|
-
12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
|
|
323
|
-
c100.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
|
|
324
|
-
53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
|
|
325
|
-
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
|
|
326
|
-
-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
|
|
327
|
-
-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
|
|
328
|
-
m368.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
|
|
329
|
-
60.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
|
|
330
|
-
-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
|
|
331
|
-
m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
|
|
332
|
-
c0 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
|
|
333
|
-
-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
|
|
334
|
-
m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
|
|
335
|
-
85.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
|
|
336
|
-
-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
|
|
337
|
-
m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
|
|
338
|
-
c0 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
|
|
339
|
-
-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
|
|
340
|
-
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
|
|
341
|
-
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
|
|
342
|
-
-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
|
|
343
|
-
-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
|
|
344
|
-
151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
|
|
345
|
-
-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
|
|
346
|
-
s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
|
|
347
|
-
c124.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
|
|
348
|
-
28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
|
|
349
|
-
-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
|
|
350
|
-
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
|
|
351
|
-
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
|
|
352
|
-
-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
|
|
353
|
-
-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
|
|
354
|
-
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
|
|
355
|
-
-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
|
|
356
|
-
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
|
|
357
|
-
m0 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
|
|
358
|
-
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
|
|
359
|
-
-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
|
|
360
|
-
-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
|
|
361
|
-
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
|
|
362
|
-
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
|
|
363
|
-
-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
|
|
364
|
-
m0-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
|
|
365
|
-
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
|
|
366
|
-
-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
|
|
367
|
-
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
|
|
368
|
-
M399960 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
|
|
369
|
-
1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
|
|
370
|
-
-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
|
|
371
|
-
-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
|
|
372
|
-
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
|
|
373
|
-
-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
|
|
374
|
-
-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
|
|
375
|
-
-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
|
|
376
|
-
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
|
|
377
|
-
c-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
|
|
378
|
-
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
|
|
379
|
-
18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
|
|
380
|
-
-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
|
|
381
|
-
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
|
|
382
|
-
-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
|
|
383
|
-
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
|
|
384
|
-
4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
|
|
385
|
-
-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
|
|
386
|
-
-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
|
|
387
|
-
31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
|
|
388
|
-
c1 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
|
|
389
|
-
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
|
|
390
|
-
-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
|
|
391
|
-
411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
|
|
392
|
-
16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
|
|
393
|
-
-338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
|
|
394
|
-
-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
|
|
395
|
-
177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
|
|
396
|
-
14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
|
|
397
|
-
-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
|
|
398
|
-
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
|
|
399
|
-
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
|
|
400
|
-
-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
|
|
401
|
-
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
|
|
402
|
-
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
|
|
403
|
-
c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
|
|
404
|
-
c-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
|
|
405
|
-
-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
|
|
406
|
-
-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
|
|
407
|
-
-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,
|
|
408
|
-
-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,
|
|
409
|
-
-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,
|
|
410
|
-
-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,
|
|
411
|
-
-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
|
|
412
|
-
c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
|
|
413
|
-
c-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
|
|
414
|
-
s-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
|
|
415
|
-
121.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
|
|
416
|
-
s2.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
|
|
417
|
-
c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
|
|
418
|
-
M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
|
|
419
|
-
-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
|
|
420
|
-
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 39
|
|
421
|
-
-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
|
|
422
|
-
-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
|
|
423
|
-
-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
|
|
424
|
-
151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
|
|
425
|
-
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
|
|
426
|
-
c2,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
|
|
427
|
-
c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
|
|
428
|
-
c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
|
|
429
|
-
M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
|
|
430
|
-
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
|
|
431
|
-
-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
|
|
432
|
-
c-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
|
|
433
|
-
M0 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
|
|
434
|
-
c1.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,
|
|
435
|
-
1c0,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,
|
|
436
|
-
-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
|
|
437
|
-
M93 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
|
|
438
|
-
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
|
|
439
|
-
-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
|
|
440
|
-
c-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
|
|
441
|
-
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},Se=function(s,a){switch(s){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+a+` v1759 h347 v-84
|
|
442
|
-
H403z M403 1759 V0 H319 V1759 v`+a+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+a+` v1759 H0 v84 H347z
|
|
443
|
-
M347 1759 V0 H263 V1759 v`+a+" v1759 h84z";case"vert":return"M145 15 v585 v"+a+` v585 c2.667,10,9.667,15,21,15
|
|
444
|
-
c10,0,16.667,-5,20,-15 v-585 v`+-a+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
|
445
|
-
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+a+" v585 h43z";case"doublevert":return"M145 15 v585 v"+a+` v585 c2.667,10,9.667,15,21,15
|
|
446
|
-
c10,0,16.667,-5,20,-15 v-585 v`+-a+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
|
447
|
-
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+a+` v585 h43z
|
|
448
|
-
M367 15 v585 v`+a+` v585 c2.667,10,9.667,15,21,15
|
|
449
|
-
c10,0,16.667,-5,20,-15 v-585 v`+-a+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
|
450
|
-
c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+a+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+a+` v1715 h263 v84 H319z
|
|
451
|
-
MM319 602 V0 H403 V602 v`+a+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+a+` v1799 H0 v-84 H319z
|
|
452
|
-
MM319 602 V0 H403 V602 v`+a+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+a+` v602 h84z
|
|
453
|
-
M403 1759 V0 H319 V1759 v`+a+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+a+` v602 h84z
|
|
454
|
-
M347 1759 V0 h-84 V1759 v`+a+" 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
|
|
455
|
-
c-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,
|
|
456
|
-
-36,557 l0,`+(a+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,
|
|
457
|
-
949.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
|
|
458
|
-
c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,
|
|
459
|
-
-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189
|
|
460
|
-
l0,-`+(a+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,
|
|
461
|
-
-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,
|
|
462
|
-
63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5
|
|
463
|
-
c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(a+9)+`
|
|
464
|
-
c-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
|
|
465
|
-
c-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
|
|
466
|
-
c0,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
|
|
467
|
-
c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
|
|
468
|
-
l0,-`+(a+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
|
|
469
|
-
-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.")}};var Te={"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]}};const Ie={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]},We={\u00C5:"A",\u00D0:"D",\u00DE:"o",\u00E5:"a",\u00F0:"d",\u00FE:"o",\u0410:"A",\u0411:"B",\u0412:"B",\u0413:"F",\u0414:"A",\u0415:"E",\u0416:"K",\u0417:"3",\u0418:"N",\u0419:"N",\u041A:"K",\u041B:"N",\u041C:"M",\u041D:"H",\u041E:"O",\u041F:"N",\u0420:"P",\u0421:"C",\u0422:"T",\u0423:"y",\u0424:"O",\u0425:"X",\u0426:"U",\u0427:"h",\u0428:"W",\u0429:"W",\u042A:"B",\u042B:"X",\u042C:"B",\u042D:"3",\u042E:"X",\u042F:"R",\u0430:"a",\u0431:"b",\u0432:"a",\u0433:"r",\u0434:"y",\u0435:"e",\u0436:"m",\u0437:"e",\u0438:"n",\u0439:"n",\u043A:"n",\u043B:"n",\u043C:"m",\u043D:"n",\u043E:"o",\u043F:"n",\u0440:"p",\u0441:"c",\u0442:"o",\u0443:"y",\u0444:"b",\u0445:"x",\u0446:"n",\u0447:"n",\u0448:"w",\u0449:"w",\u044A:"a",\u044B:"m",\u044C:"a",\u044D:"e",\u044E:"m",\u044F:"r"};function ut(s,a){Te[s]=a}function ot(s,a,l){if(!Te[a])throw new Error("Font metrics not found for font: "+a+".");let h=s.charCodeAt(0),b=Te[a][h];if(!b&&s[0]in We&&(h=We[s[0]].charCodeAt(0),b=Te[a][h]),!b&&l==="text"&&Ae(h)&&(b=Te[a][77]),b)return{depth:b[0],height:b[1],italic:b[2],skew:b[3],width:b[4]}}const Oe={};function je(s){let a;if(s>=5?a=0:s>=3?a=1:a=2,!Oe[a]){const l=Oe[a]={cssEmPerMu:Ie.quad[a]/18};for(const h in Ie)Ie.hasOwnProperty(h)&&(l[h]=Ie[h][a])}return Oe[a]}const Ve=[[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]],ft=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],tt=function(s,a){return a.size<2?s:Ve[s-1][a.size-1]};class nt{constructor(a){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=a.style,this.color=a.color,this.size=a.size||nt.BASESIZE,this.textSize=a.textSize||this.size,this.phantom=!!a.phantom,this.font=a.font||"",this.fontFamily=a.fontFamily||"",this.fontWeight=a.fontWeight||"",this.fontShape=a.fontShape||"",this.sizeMultiplier=ft[this.size-1],this.maxSize=a.maxSize,this.minRuleThickness=a.minRuleThickness,this._fontMetrics=void 0}extend(a){const l={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(const h in a)a.hasOwnProperty(h)&&(l[h]=a[h]);return new nt(l)}havingStyle(a){return this.style===a?this:this.extend({style:a,size:tt(this.textSize,a)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(a){return this.size===a&&this.textSize===a?this:this.extend({style:this.style.text(),size:a,textSize:a,sizeMultiplier:ft[a-1]})}havingBaseStyle(a){a=a||this.style.text();const l=tt(nt.BASESIZE,a);return this.size===l&&this.textSize===nt.BASESIZE&&this.style===a?this:this.extend({style:a,size:l})}havingBaseSizing(){let a;switch(this.style.id){case 4:case 5:a=3;break;case 6:case 7:a=1;break;default:a=6}return this.extend({style:this.style.text(),size:a})}withColor(a){return this.extend({color:a})}withPhantom(){return this.extend({phantom:!0})}withFont(a){return this.extend({font:a})}withTextFontFamily(a){return this.extend({fontFamily:a,font:""})}withTextFontWeight(a){return this.extend({fontWeight:a,font:""})}withTextFontShape(a){return this.extend({fontShape:a,font:""})}sizingClasses(a){return a.size!==this.size?["sizing","reset-size"+a.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==nt.BASESIZE?["sizing","reset-size"+this.size,"size"+nt.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=je(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}nt.BASESIZE=6;var Tt=nt;const bt={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},At={ex:!0,em:!0,mu:!0},yt=function(s){return typeof s!="string"&&(s=s.unit),s in bt||s in At||s==="ex"},Me=function(s,a){let l;if(s.unit in bt)l=bt[s.unit]/a.fontMetrics().ptPerEm/a.sizeMultiplier;else if(s.unit==="mu")l=a.fontMetrics().cssEmPerMu;else{let h;if(a.style.isTight()?h=a.havingStyle(a.style.text()):h=a,s.unit==="ex")l=h.fontMetrics().xHeight;else if(s.unit==="em")l=h.fontMetrics().quad;else throw new i("Invalid unit: '"+s.unit+"'");h!==a&&(l*=h.sizeMultiplier/a.sizeMultiplier)}return Math.min(s.number*l,a.maxSize)},ue=function(s){return+s.toFixed(4)+"em"},mt=function(s){return s.filter(a=>a).join(" ")},zt=function(s,a,l){if(this.classes=s||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=l||{},a){a.style.isTight()&&this.classes.push("mtight");const h=a.getColor();h&&(this.style.color=h)}},Wt=function(s){const a=document.createElement(s);a.className=mt(this.classes);for(const l in this.style)this.style.hasOwnProperty(l)&&(a.style[l]=this.style[l]);for(const l in this.attributes)this.attributes.hasOwnProperty(l)&&a.setAttribute(l,this.attributes[l]);for(let l=0;l<this.children.length;l++)a.appendChild(this.children[l].toNode());return a},Ot=/[\s"'>/=\x00-\x1f]/,ir=function(s){let a="<"+s;this.classes.length&&(a+=' class="'+C.escape(mt(this.classes))+'"');let l="";for(const h in this.style)this.style.hasOwnProperty(h)&&(l+=C.hyphenate(h)+":"+this.style[h]+";");l&&(a+=' style="'+C.escape(l)+'"');for(const h in this.attributes)if(this.attributes.hasOwnProperty(h)){if(Ot.test(h))throw new i("Invalid attribute name '"+h+"'");a+=" "+h+'="'+C.escape(this.attributes[h])+'"'}a+=">";for(let h=0;h<this.children.length;h++)a+=this.children[h].toMarkup();return a+="</"+s+">",a};class Ct{constructor(a,l,h,b){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,zt.call(this,a,h,b),this.children=l||[]}setAttribute(a,l){this.attributes[a]=l}hasClass(a){return this.classes.includes(a)}toNode(){return Wt.call(this,"span")}toMarkup(){return ir.call(this,"span")}}class _t{constructor(a,l,h,b){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,zt.call(this,l,b),this.children=h||[],this.setAttribute("href",a)}setAttribute(a,l){this.attributes[a]=l}hasClass(a){return this.classes.includes(a)}toNode(){return Wt.call(this,"a")}toMarkup(){return ir.call(this,"a")}}class Gt{constructor(a,l,h){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=l,this.src=a,this.classes=["mord"],this.style=h}hasClass(a){return this.classes.includes(a)}toNode(){const a=document.createElement("img");a.src=this.src,a.alt=this.alt,a.className="mord";for(const l in this.style)this.style.hasOwnProperty(l)&&(a.style[l]=this.style[l]);return a}toMarkup(){let a='<img src="'+C.escape(this.src)+'"'+(' alt="'+C.escape(this.alt)+'"'),l="";for(const h in this.style)this.style.hasOwnProperty(h)&&(l+=C.hyphenate(h)+":"+this.style[h]+";");return l&&(a+=' style="'+C.escape(l)+'"'),a+="'/>",a}}const pr={\u00EE:"\u0131\u0302",\u00EF:"\u0131\u0308",\u00ED:"\u0131\u0301",\u00EC:"\u0131\u0300"};class Dt{constructor(a,l,h,b,E,O,_,V){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=a,this.height=l||0,this.depth=h||0,this.italic=b||0,this.skew=E||0,this.width=O||0,this.classes=_||[],this.style=V||{},this.maxFontSize=0;const te=ge(this.text.charCodeAt(0));te&&this.classes.push(te+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=pr[this.text])}hasClass(a){return this.classes.includes(a)}toNode(){const a=document.createTextNode(this.text);let l=null;this.italic>0&&(l=document.createElement("span"),l.style.marginRight=ue(this.italic)),this.classes.length>0&&(l=l||document.createElement("span"),l.className=mt(this.classes));for(const h in this.style)this.style.hasOwnProperty(h)&&(l=l||document.createElement("span"),l.style[h]=this.style[h]);return l?(l.appendChild(a),l):a}toMarkup(){let a=!1,l="<span";this.classes.length&&(a=!0,l+=' class="',l+=C.escape(mt(this.classes)),l+='"');let h="";this.italic>0&&(h+="margin-right:"+this.italic+"em;");for(const E in this.style)this.style.hasOwnProperty(E)&&(h+=C.hyphenate(E)+":"+this.style[E]+";");h&&(a=!0,l+=' style="'+C.escape(h)+'"');const b=C.escape(this.text);return a?(l+=">",l+=b,l+="</span>",l):b}}class Fr{constructor(a,l){this.children=void 0,this.attributes=void 0,this.children=a||[],this.attributes=l||{}}toNode(){const a=document.createElementNS("http://www.w3.org/2000/svg","svg");for(const l in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,l)&&a.setAttribute(l,this.attributes[l]);for(let l=0;l<this.children.length;l++)a.appendChild(this.children[l].toNode());return a}toMarkup(){let a='<svg xmlns="http://www.w3.org/2000/svg"';for(const l in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,l)&&(a+=" "+l+'="'+C.escape(this.attributes[l])+'"');a+=">";for(let l=0;l<this.children.length;l++)a+=this.children[l].toMarkup();return a+="</svg>",a}}class br{constructor(a,l){this.pathName=void 0,this.alternate=void 0,this.pathName=a,this.alternate=l}toNode(){const a=document.createElementNS("http://www.w3.org/2000/svg","path");return this.alternate?a.setAttribute("d",this.alternate):a.setAttribute("d",ke[this.pathName]),a}toMarkup(){return this.alternate?'<path d="'+C.escape(this.alternate)+'"/>':'<path d="'+C.escape(ke[this.pathName])+'"/>'}}class or{constructor(a){this.attributes=void 0,this.attributes=a||{}}toNode(){const a=document.createElementNS("http://www.w3.org/2000/svg","line");for(const l in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,l)&&a.setAttribute(l,this.attributes[l]);return a}toMarkup(){let a="<line";for(const l in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,l)&&(a+=" "+l+'="'+C.escape(this.attributes[l])+'"');return a+="/>",a}}function tr(s){if(s instanceof Dt)return s;throw new Error("Expected symbolNode but got "+String(s)+".")}function mr(s){if(s instanceof Ct)return s;throw new Error("Expected span<HtmlDomNode> but got "+String(s)+".")}const Ir={bin:1,close:1,inner:1,open:1,punct:1,rel:1},Mr={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},cr={math:{},text:{}};var Vt=cr;function y(s,a,l,h,b,E){cr[s][b]={font:a,group:l,replace:h},E&&h&&(cr[s][h]=cr[s][b])}const k="math",ze="text",M="main",Q="ams",Yt="accent-token",at="bin",gt="close",xt="inner",Re="mathord",$t="op-token",sr="open",Nr="punct",ee="rel",yr="spacing",ne="textord";y(k,M,ee,"\u2261","\\equiv",!0),y(k,M,ee,"\u227A","\\prec",!0),y(k,M,ee,"\u227B","\\succ",!0),y(k,M,ee,"\u223C","\\sim",!0),y(k,M,ee,"\u22A5","\\perp"),y(k,M,ee,"\u2AAF","\\preceq",!0),y(k,M,ee,"\u2AB0","\\succeq",!0),y(k,M,ee,"\u2243","\\simeq",!0),y(k,M,ee,"\u2223","\\mid",!0),y(k,M,ee,"\u226A","\\ll",!0),y(k,M,ee,"\u226B","\\gg",!0),y(k,M,ee,"\u224D","\\asymp",!0),y(k,M,ee,"\u2225","\\parallel"),y(k,M,ee,"\u22C8","\\bowtie",!0),y(k,M,ee,"\u2323","\\smile",!0),y(k,M,ee,"\u2291","\\sqsubseteq",!0),y(k,M,ee,"\u2292","\\sqsupseteq",!0),y(k,M,ee,"\u2250","\\doteq",!0),y(k,M,ee,"\u2322","\\frown",!0),y(k,M,ee,"\u220B","\\ni",!0),y(k,M,ee,"\u221D","\\propto",!0),y(k,M,ee,"\u22A2","\\vdash",!0),y(k,M,ee,"\u22A3","\\dashv",!0),y(k,M,ee,"\u220B","\\owns"),y(k,M,Nr,".","\\ldotp"),y(k,M,Nr,"\u22C5","\\cdotp"),y(k,M,ne,"#","\\#"),y(ze,M,ne,"#","\\#"),y(k,M,ne,"&","\\&"),y(ze,M,ne,"&","\\&"),y(k,M,ne,"\u2135","\\aleph",!0),y(k,M,ne,"\u2200","\\forall",!0),y(k,M,ne,"\u210F","\\hbar",!0),y(k,M,ne,"\u2203","\\exists",!0),y(k,M,ne,"\u2207","\\nabla",!0),y(k,M,ne,"\u266D","\\flat",!0),y(k,M,ne,"\u2113","\\ell",!0),y(k,M,ne,"\u266E","\\natural",!0),y(k,M,ne,"\u2663","\\clubsuit",!0),y(k,M,ne,"\u2118","\\wp",!0),y(k,M,ne,"\u266F","\\sharp",!0),y(k,M,ne,"\u2662","\\diamondsuit",!0),y(k,M,ne,"\u211C","\\Re",!0),y(k,M,ne,"\u2661","\\heartsuit",!0),y(k,M,ne,"\u2111","\\Im",!0),y(k,M,ne,"\u2660","\\spadesuit",!0),y(k,M,ne,"\xA7","\\S",!0),y(ze,M,ne,"\xA7","\\S"),y(k,M,ne,"\xB6","\\P",!0),y(ze,M,ne,"\xB6","\\P"),y(k,M,ne,"\u2020","\\dag"),y(ze,M,ne,"\u2020","\\dag"),y(ze,M,ne,"\u2020","\\textdagger"),y(k,M,ne,"\u2021","\\ddag"),y(ze,M,ne,"\u2021","\\ddag"),y(ze,M,ne,"\u2021","\\textdaggerdbl"),y(k,M,gt,"\u23B1","\\rmoustache",!0),y(k,M,sr,"\u23B0","\\lmoustache",!0),y(k,M,gt,"\u27EF","\\rgroup",!0),y(k,M,sr,"\u27EE","\\lgroup",!0),y(k,M,at,"\u2213","\\mp",!0),y(k,M,at,"\u2296","\\ominus",!0),y(k,M,at,"\u228E","\\uplus",!0),y(k,M,at,"\u2293","\\sqcap",!0),y(k,M,at,"\u2217","\\ast"),y(k,M,at,"\u2294","\\sqcup",!0),y(k,M,at,"\u25EF","\\bigcirc",!0),y(k,M,at,"\u2219","\\bullet",!0),y(k,M,at,"\u2021","\\ddagger"),y(k,M,at,"\u2240","\\wr",!0),y(k,M,at,"\u2A3F","\\amalg"),y(k,M,at,"&","\\And"),y(k,M,ee,"\u27F5","\\longleftarrow",!0),y(k,M,ee,"\u21D0","\\Leftarrow",!0),y(k,M,ee,"\u27F8","\\Longleftarrow",!0),y(k,M,ee,"\u27F6","\\longrightarrow",!0),y(k,M,ee,"\u21D2","\\Rightarrow",!0),y(k,M,ee,"\u27F9","\\Longrightarrow",!0),y(k,M,ee,"\u2194","\\leftrightarrow",!0),y(k,M,ee,"\u27F7","\\longleftrightarrow",!0),y(k,M,ee,"\u21D4","\\Leftrightarrow",!0),y(k,M,ee,"\u27FA","\\Longleftrightarrow",!0),y(k,M,ee,"\u21A6","\\mapsto",!0),y(k,M,ee,"\u27FC","\\longmapsto",!0),y(k,M,ee,"\u2197","\\nearrow",!0),y(k,M,ee,"\u21A9","\\hookleftarrow",!0),y(k,M,ee,"\u21AA","\\hookrightarrow",!0),y(k,M,ee,"\u2198","\\searrow",!0),y(k,M,ee,"\u21BC","\\leftharpoonup",!0),y(k,M,ee,"\u21C0","\\rightharpoonup",!0),y(k,M,ee,"\u2199","\\swarrow",!0),y(k,M,ee,"\u21BD","\\leftharpoondown",!0),y(k,M,ee,"\u21C1","\\rightharpoondown",!0),y(k,M,ee,"\u2196","\\nwarrow",!0),y(k,M,ee,"\u21CC","\\rightleftharpoons",!0),y(k,Q,ee,"\u226E","\\nless",!0),y(k,Q,ee,"\uE010","\\@nleqslant"),y(k,Q,ee,"\uE011","\\@nleqq"),y(k,Q,ee,"\u2A87","\\lneq",!0),y(k,Q,ee,"\u2268","\\lneqq",!0),y(k,Q,ee,"\uE00C","\\@lvertneqq"),y(k,Q,ee,"\u22E6","\\lnsim",!0),y(k,Q,ee,"\u2A89","\\lnapprox",!0),y(k,Q,ee,"\u2280","\\nprec",!0),y(k,Q,ee,"\u22E0","\\npreceq",!0),y(k,Q,ee,"\u22E8","\\precnsim",!0),y(k,Q,ee,"\u2AB9","\\precnapprox",!0),y(k,Q,ee,"\u2241","\\nsim",!0),y(k,Q,ee,"\uE006","\\@nshortmid"),y(k,Q,ee,"\u2224","\\nmid",!0),y(k,Q,ee,"\u22AC","\\nvdash",!0),y(k,Q,ee,"\u22AD","\\nvDash",!0),y(k,Q,ee,"\u22EA","\\ntriangleleft"),y(k,Q,ee,"\u22EC","\\ntrianglelefteq",!0),y(k,Q,ee,"\u228A","\\subsetneq",!0),y(k,Q,ee,"\uE01A","\\@varsubsetneq"),y(k,Q,ee,"\u2ACB","\\subsetneqq",!0),y(k,Q,ee,"\uE017","\\@varsubsetneqq"),y(k,Q,ee,"\u226F","\\ngtr",!0),y(k,Q,ee,"\uE00F","\\@ngeqslant"),y(k,Q,ee,"\uE00E","\\@ngeqq"),y(k,Q,ee,"\u2A88","\\gneq",!0),y(k,Q,ee,"\u2269","\\gneqq",!0),y(k,Q,ee,"\uE00D","\\@gvertneqq"),y(k,Q,ee,"\u22E7","\\gnsim",!0),y(k,Q,ee,"\u2A8A","\\gnapprox",!0),y(k,Q,ee,"\u2281","\\nsucc",!0),y(k,Q,ee,"\u22E1","\\nsucceq",!0),y(k,Q,ee,"\u22E9","\\succnsim",!0),y(k,Q,ee,"\u2ABA","\\succnapprox",!0),y(k,Q,ee,"\u2246","\\ncong",!0),y(k,Q,ee,"\uE007","\\@nshortparallel"),y(k,Q,ee,"\u2226","\\nparallel",!0),y(k,Q,ee,"\u22AF","\\nVDash",!0),y(k,Q,ee,"\u22EB","\\ntriangleright"),y(k,Q,ee,"\u22ED","\\ntrianglerighteq",!0),y(k,Q,ee,"\uE018","\\@nsupseteqq"),y(k,Q,ee,"\u228B","\\supsetneq",!0),y(k,Q,ee,"\uE01B","\\@varsupsetneq"),y(k,Q,ee,"\u2ACC","\\supsetneqq",!0),y(k,Q,ee,"\uE019","\\@varsupsetneqq"),y(k,Q,ee,"\u22AE","\\nVdash",!0),y(k,Q,ee,"\u2AB5","\\precneqq",!0),y(k,Q,ee,"\u2AB6","\\succneqq",!0),y(k,Q,ee,"\uE016","\\@nsubseteqq"),y(k,Q,at,"\u22B4","\\unlhd"),y(k,Q,at,"\u22B5","\\unrhd"),y(k,Q,ee,"\u219A","\\nleftarrow",!0),y(k,Q,ee,"\u219B","\\nrightarrow",!0),y(k,Q,ee,"\u21CD","\\nLeftarrow",!0),y(k,Q,ee,"\u21CF","\\nRightarrow",!0),y(k,Q,ee,"\u21AE","\\nleftrightarrow",!0),y(k,Q,ee,"\u21CE","\\nLeftrightarrow",!0),y(k,Q,ee,"\u25B3","\\vartriangle"),y(k,Q,ne,"\u210F","\\hslash"),y(k,Q,ne,"\u25BD","\\triangledown"),y(k,Q,ne,"\u25CA","\\lozenge"),y(k,Q,ne,"\u24C8","\\circledS"),y(k,Q,ne,"\xAE","\\circledR"),y(ze,Q,ne,"\xAE","\\circledR"),y(k,Q,ne,"\u2221","\\measuredangle",!0),y(k,Q,ne,"\u2204","\\nexists"),y(k,Q,ne,"\u2127","\\mho"),y(k,Q,ne,"\u2132","\\Finv",!0),y(k,Q,ne,"\u2141","\\Game",!0),y(k,Q,ne,"\u2035","\\backprime"),y(k,Q,ne,"\u25B2","\\blacktriangle"),y(k,Q,ne,"\u25BC","\\blacktriangledown"),y(k,Q,ne,"\u25A0","\\blacksquare"),y(k,Q,ne,"\u29EB","\\blacklozenge"),y(k,Q,ne,"\u2605","\\bigstar"),y(k,Q,ne,"\u2222","\\sphericalangle",!0),y(k,Q,ne,"\u2201","\\complement",!0),y(k,Q,ne,"\xF0","\\eth",!0),y(ze,M,ne,"\xF0","\xF0"),y(k,Q,ne,"\u2571","\\diagup"),y(k,Q,ne,"\u2572","\\diagdown"),y(k,Q,ne,"\u25A1","\\square"),y(k,Q,ne,"\u25A1","\\Box"),y(k,Q,ne,"\u25CA","\\Diamond"),y(k,Q,ne,"\xA5","\\yen",!0),y(ze,Q,ne,"\xA5","\\yen",!0),y(k,Q,ne,"\u2713","\\checkmark",!0),y(ze,Q,ne,"\u2713","\\checkmark"),y(k,Q,ne,"\u2136","\\beth",!0),y(k,Q,ne,"\u2138","\\daleth",!0),y(k,Q,ne,"\u2137","\\gimel",!0),y(k,Q,ne,"\u03DD","\\digamma",!0),y(k,Q,ne,"\u03F0","\\varkappa"),y(k,Q,sr,"\u250C","\\@ulcorner",!0),y(k,Q,gt,"\u2510","\\@urcorner",!0),y(k,Q,sr,"\u2514","\\@llcorner",!0),y(k,Q,gt,"\u2518","\\@lrcorner",!0),y(k,Q,ee,"\u2266","\\leqq",!0),y(k,Q,ee,"\u2A7D","\\leqslant",!0),y(k,Q,ee,"\u2A95","\\eqslantless",!0),y(k,Q,ee,"\u2272","\\lesssim",!0),y(k,Q,ee,"\u2A85","\\lessapprox",!0),y(k,Q,ee,"\u224A","\\approxeq",!0),y(k,Q,at,"\u22D6","\\lessdot"),y(k,Q,ee,"\u22D8","\\lll",!0),y(k,Q,ee,"\u2276","\\lessgtr",!0),y(k,Q,ee,"\u22DA","\\lesseqgtr",!0),y(k,Q,ee,"\u2A8B","\\lesseqqgtr",!0),y(k,Q,ee,"\u2251","\\doteqdot"),y(k,Q,ee,"\u2253","\\risingdotseq",!0),y(k,Q,ee,"\u2252","\\fallingdotseq",!0),y(k,Q,ee,"\u223D","\\backsim",!0),y(k,Q,ee,"\u22CD","\\backsimeq",!0),y(k,Q,ee,"\u2AC5","\\subseteqq",!0),y(k,Q,ee,"\u22D0","\\Subset",!0),y(k,Q,ee,"\u228F","\\sqsubset",!0),y(k,Q,ee,"\u227C","\\preccurlyeq",!0),y(k,Q,ee,"\u22DE","\\curlyeqprec",!0),y(k,Q,ee,"\u227E","\\precsim",!0),y(k,Q,ee,"\u2AB7","\\precapprox",!0),y(k,Q,ee,"\u22B2","\\vartriangleleft"),y(k,Q,ee,"\u22B4","\\trianglelefteq"),y(k,Q,ee,"\u22A8","\\vDash",!0),y(k,Q,ee,"\u22AA","\\Vvdash",!0),y(k,Q,ee,"\u2323","\\smallsmile"),y(k,Q,ee,"\u2322","\\smallfrown"),y(k,Q,ee,"\u224F","\\bumpeq",!0),y(k,Q,ee,"\u224E","\\Bumpeq",!0),y(k,Q,ee,"\u2267","\\geqq",!0),y(k,Q,ee,"\u2A7E","\\geqslant",!0),y(k,Q,ee,"\u2A96","\\eqslantgtr",!0),y(k,Q,ee,"\u2273","\\gtrsim",!0),y(k,Q,ee,"\u2A86","\\gtrapprox",!0),y(k,Q,at,"\u22D7","\\gtrdot"),y(k,Q,ee,"\u22D9","\\ggg",!0),y(k,Q,ee,"\u2277","\\gtrless",!0),y(k,Q,ee,"\u22DB","\\gtreqless",!0),y(k,Q,ee,"\u2A8C","\\gtreqqless",!0),y(k,Q,ee,"\u2256","\\eqcirc",!0),y(k,Q,ee,"\u2257","\\circeq",!0),y(k,Q,ee,"\u225C","\\triangleq",!0),y(k,Q,ee,"\u223C","\\thicksim"),y(k,Q,ee,"\u2248","\\thickapprox"),y(k,Q,ee,"\u2AC6","\\supseteqq",!0),y(k,Q,ee,"\u22D1","\\Supset",!0),y(k,Q,ee,"\u2290","\\sqsupset",!0),y(k,Q,ee,"\u227D","\\succcurlyeq",!0),y(k,Q,ee,"\u22DF","\\curlyeqsucc",!0),y(k,Q,ee,"\u227F","\\succsim",!0),y(k,Q,ee,"\u2AB8","\\succapprox",!0),y(k,Q,ee,"\u22B3","\\vartriangleright"),y(k,Q,ee,"\u22B5","\\trianglerighteq"),y(k,Q,ee,"\u22A9","\\Vdash",!0),y(k,Q,ee,"\u2223","\\shortmid"),y(k,Q,ee,"\u2225","\\shortparallel"),y(k,Q,ee,"\u226C","\\between",!0),y(k,Q,ee,"\u22D4","\\pitchfork",!0),y(k,Q,ee,"\u221D","\\varpropto"),y(k,Q,ee,"\u25C0","\\blacktriangleleft"),y(k,Q,ee,"\u2234","\\therefore",!0),y(k,Q,ee,"\u220D","\\backepsilon"),y(k,Q,ee,"\u25B6","\\blacktriangleright"),y(k,Q,ee,"\u2235","\\because",!0),y(k,Q,ee,"\u22D8","\\llless"),y(k,Q,ee,"\u22D9","\\gggtr"),y(k,Q,at,"\u22B2","\\lhd"),y(k,Q,at,"\u22B3","\\rhd"),y(k,Q,ee,"\u2242","\\eqsim",!0),y(k,M,ee,"\u22C8","\\Join"),y(k,Q,ee,"\u2251","\\Doteq",!0),y(k,Q,at,"\u2214","\\dotplus",!0),y(k,Q,at,"\u2216","\\smallsetminus"),y(k,Q,at,"\u22D2","\\Cap",!0),y(k,Q,at,"\u22D3","\\Cup",!0),y(k,Q,at,"\u2A5E","\\doublebarwedge",!0),y(k,Q,at,"\u229F","\\boxminus",!0),y(k,Q,at,"\u229E","\\boxplus",!0),y(k,Q,at,"\u22C7","\\divideontimes",!0),y(k,Q,at,"\u22C9","\\ltimes",!0),y(k,Q,at,"\u22CA","\\rtimes",!0),y(k,Q,at,"\u22CB","\\leftthreetimes",!0),y(k,Q,at,"\u22CC","\\rightthreetimes",!0),y(k,Q,at,"\u22CF","\\curlywedge",!0),y(k,Q,at,"\u22CE","\\curlyvee",!0),y(k,Q,at,"\u229D","\\circleddash",!0),y(k,Q,at,"\u229B","\\circledast",!0),y(k,Q,at,"\u22C5","\\centerdot"),y(k,Q,at,"\u22BA","\\intercal",!0),y(k,Q,at,"\u22D2","\\doublecap"),y(k,Q,at,"\u22D3","\\doublecup"),y(k,Q,at,"\u22A0","\\boxtimes",!0),y(k,Q,ee,"\u21E2","\\dashrightarrow",!0),y(k,Q,ee,"\u21E0","\\dashleftarrow",!0),y(k,Q,ee,"\u21C7","\\leftleftarrows",!0),y(k,Q,ee,"\u21C6","\\leftrightarrows",!0),y(k,Q,ee,"\u21DA","\\Lleftarrow",!0),y(k,Q,ee,"\u219E","\\twoheadleftarrow",!0),y(k,Q,ee,"\u21A2","\\leftarrowtail",!0),y(k,Q,ee,"\u21AB","\\looparrowleft",!0),y(k,Q,ee,"\u21CB","\\leftrightharpoons",!0),y(k,Q,ee,"\u21B6","\\curvearrowleft",!0),y(k,Q,ee,"\u21BA","\\circlearrowleft",!0),y(k,Q,ee,"\u21B0","\\Lsh",!0),y(k,Q,ee,"\u21C8","\\upuparrows",!0),y(k,Q,ee,"\u21BF","\\upharpoonleft",!0),y(k,Q,ee,"\u21C3","\\downharpoonleft",!0),y(k,M,ee,"\u22B6","\\origof",!0),y(k,M,ee,"\u22B7","\\imageof",!0),y(k,Q,ee,"\u22B8","\\multimap",!0),y(k,Q,ee,"\u21AD","\\leftrightsquigarrow",!0),y(k,Q,ee,"\u21C9","\\rightrightarrows",!0),y(k,Q,ee,"\u21C4","\\rightleftarrows",!0),y(k,Q,ee,"\u21A0","\\twoheadrightarrow",!0),y(k,Q,ee,"\u21A3","\\rightarrowtail",!0),y(k,Q,ee,"\u21AC","\\looparrowright",!0),y(k,Q,ee,"\u21B7","\\curvearrowright",!0),y(k,Q,ee,"\u21BB","\\circlearrowright",!0),y(k,Q,ee,"\u21B1","\\Rsh",!0),y(k,Q,ee,"\u21CA","\\downdownarrows",!0),y(k,Q,ee,"\u21BE","\\upharpoonright",!0),y(k,Q,ee,"\u21C2","\\downharpoonright",!0),y(k,Q,ee,"\u21DD","\\rightsquigarrow",!0),y(k,Q,ee,"\u21DD","\\leadsto"),y(k,Q,ee,"\u21DB","\\Rrightarrow",!0),y(k,Q,ee,"\u21BE","\\restriction"),y(k,M,ne,"\u2018","`"),y(k,M,ne,"$","\\$"),y(ze,M,ne,"$","\\$"),y(ze,M,ne,"$","\\textdollar"),y(k,M,ne,"%","\\%"),y(ze,M,ne,"%","\\%"),y(k,M,ne,"_","\\_"),y(ze,M,ne,"_","\\_"),y(ze,M,ne,"_","\\textunderscore"),y(k,M,ne,"\u2220","\\angle",!0),y(k,M,ne,"\u221E","\\infty",!0),y(k,M,ne,"\u2032","\\prime"),y(k,M,ne,"\u25B3","\\triangle"),y(k,M,ne,"\u0393","\\Gamma",!0),y(k,M,ne,"\u0394","\\Delta",!0),y(k,M,ne,"\u0398","\\Theta",!0),y(k,M,ne,"\u039B","\\Lambda",!0),y(k,M,ne,"\u039E","\\Xi",!0),y(k,M,ne,"\u03A0","\\Pi",!0),y(k,M,ne,"\u03A3","\\Sigma",!0),y(k,M,ne,"\u03A5","\\Upsilon",!0),y(k,M,ne,"\u03A6","\\Phi",!0),y(k,M,ne,"\u03A8","\\Psi",!0),y(k,M,ne,"\u03A9","\\Omega",!0),y(k,M,ne,"A","\u0391"),y(k,M,ne,"B","\u0392"),y(k,M,ne,"E","\u0395"),y(k,M,ne,"Z","\u0396"),y(k,M,ne,"H","\u0397"),y(k,M,ne,"I","\u0399"),y(k,M,ne,"K","\u039A"),y(k,M,ne,"M","\u039C"),y(k,M,ne,"N","\u039D"),y(k,M,ne,"O","\u039F"),y(k,M,ne,"P","\u03A1"),y(k,M,ne,"T","\u03A4"),y(k,M,ne,"X","\u03A7"),y(k,M,ne,"\xAC","\\neg",!0),y(k,M,ne,"\xAC","\\lnot"),y(k,M,ne,"\u22A4","\\top"),y(k,M,ne,"\u22A5","\\bot"),y(k,M,ne,"\u2205","\\emptyset"),y(k,Q,ne,"\u2205","\\varnothing"),y(k,M,Re,"\u03B1","\\alpha",!0),y(k,M,Re,"\u03B2","\\beta",!0),y(k,M,Re,"\u03B3","\\gamma",!0),y(k,M,Re,"\u03B4","\\delta",!0),y(k,M,Re,"\u03F5","\\epsilon",!0),y(k,M,Re,"\u03B6","\\zeta",!0),y(k,M,Re,"\u03B7","\\eta",!0),y(k,M,Re,"\u03B8","\\theta",!0),y(k,M,Re,"\u03B9","\\iota",!0),y(k,M,Re,"\u03BA","\\kappa",!0),y(k,M,Re,"\u03BB","\\lambda",!0),y(k,M,Re,"\u03BC","\\mu",!0),y(k,M,Re,"\u03BD","\\nu",!0),y(k,M,Re,"\u03BE","\\xi",!0),y(k,M,Re,"\u03BF","\\omicron",!0),y(k,M,Re,"\u03C0","\\pi",!0),y(k,M,Re,"\u03C1","\\rho",!0),y(k,M,Re,"\u03C3","\\sigma",!0),y(k,M,Re,"\u03C4","\\tau",!0),y(k,M,Re,"\u03C5","\\upsilon",!0),y(k,M,Re,"\u03D5","\\phi",!0),y(k,M,Re,"\u03C7","\\chi",!0),y(k,M,Re,"\u03C8","\\psi",!0),y(k,M,Re,"\u03C9","\\omega",!0),y(k,M,Re,"\u03B5","\\varepsilon",!0),y(k,M,Re,"\u03D1","\\vartheta",!0),y(k,M,Re,"\u03D6","\\varpi",!0),y(k,M,Re,"\u03F1","\\varrho",!0),y(k,M,Re,"\u03C2","\\varsigma",!0),y(k,M,Re,"\u03C6","\\varphi",!0),y(k,M,at,"\u2217","*",!0),y(k,M,at,"+","+"),y(k,M,at,"\u2212","-",!0),y(k,M,at,"\u22C5","\\cdot",!0),y(k,M,at,"\u2218","\\circ",!0),y(k,M,at,"\xF7","\\div",!0),y(k,M,at,"\xB1","\\pm",!0),y(k,M,at,"\xD7","\\times",!0),y(k,M,at,"\u2229","\\cap",!0),y(k,M,at,"\u222A","\\cup",!0),y(k,M,at,"\u2216","\\setminus",!0),y(k,M,at,"\u2227","\\land"),y(k,M,at,"\u2228","\\lor"),y(k,M,at,"\u2227","\\wedge",!0),y(k,M,at,"\u2228","\\vee",!0),y(k,M,ne,"\u221A","\\surd"),y(k,M,sr,"\u27E8","\\langle",!0),y(k,M,sr,"\u2223","\\lvert"),y(k,M,sr,"\u2225","\\lVert"),y(k,M,gt,"?","?"),y(k,M,gt,"!","!"),y(k,M,gt,"\u27E9","\\rangle",!0),y(k,M,gt,"\u2223","\\rvert"),y(k,M,gt,"\u2225","\\rVert"),y(k,M,ee,"=","="),y(k,M,ee,":",":"),y(k,M,ee,"\u2248","\\approx",!0),y(k,M,ee,"\u2245","\\cong",!0),y(k,M,ee,"\u2265","\\ge"),y(k,M,ee,"\u2265","\\geq",!0),y(k,M,ee,"\u2190","\\gets"),y(k,M,ee,">","\\gt",!0),y(k,M,ee,"\u2208","\\in",!0),y(k,M,ee,"\uE020","\\@not"),y(k,M,ee,"\u2282","\\subset",!0),y(k,M,ee,"\u2283","\\supset",!0),y(k,M,ee,"\u2286","\\subseteq",!0),y(k,M,ee,"\u2287","\\supseteq",!0),y(k,Q,ee,"\u2288","\\nsubseteq",!0),y(k,Q,ee,"\u2289","\\nsupseteq",!0),y(k,M,ee,"\u22A8","\\models"),y(k,M,ee,"\u2190","\\leftarrow",!0),y(k,M,ee,"\u2264","\\le"),y(k,M,ee,"\u2264","\\leq",!0),y(k,M,ee,"<","\\lt",!0),y(k,M,ee,"\u2192","\\rightarrow",!0),y(k,M,ee,"\u2192","\\to"),y(k,Q,ee,"\u2271","\\ngeq",!0),y(k,Q,ee,"\u2270","\\nleq",!0),y(k,M,yr,"\xA0","\\ "),y(k,M,yr,"\xA0","\\space"),y(k,M,yr,"\xA0","\\nobreakspace"),y(ze,M,yr,"\xA0","\\ "),y(ze,M,yr,"\xA0"," "),y(ze,M,yr,"\xA0","\\space"),y(ze,M,yr,"\xA0","\\nobreakspace"),y(k,M,yr,null,"\\nobreak"),y(k,M,yr,null,"\\allowbreak"),y(k,M,Nr,",",","),y(k,M,Nr,";",";"),y(k,Q,at,"\u22BC","\\barwedge",!0),y(k,Q,at,"\u22BB","\\veebar",!0),y(k,M,at,"\u2299","\\odot",!0),y(k,M,at,"\u2295","\\oplus",!0),y(k,M,at,"\u2297","\\otimes",!0),y(k,M,ne,"\u2202","\\partial",!0),y(k,M,at,"\u2298","\\oslash",!0),y(k,Q,at,"\u229A","\\circledcirc",!0),y(k,Q,at,"\u22A1","\\boxdot",!0),y(k,M,at,"\u25B3","\\bigtriangleup"),y(k,M,at,"\u25BD","\\bigtriangledown"),y(k,M,at,"\u2020","\\dagger"),y(k,M,at,"\u22C4","\\diamond"),y(k,M,at,"\u22C6","\\star"),y(k,M,at,"\u25C3","\\triangleleft"),y(k,M,at,"\u25B9","\\triangleright"),y(k,M,sr,"{","\\{"),y(ze,M,ne,"{","\\{"),y(ze,M,ne,"{","\\textbraceleft"),y(k,M,gt,"}","\\}"),y(ze,M,ne,"}","\\}"),y(ze,M,ne,"}","\\textbraceright"),y(k,M,sr,"{","\\lbrace"),y(k,M,gt,"}","\\rbrace"),y(k,M,sr,"[","\\lbrack",!0),y(ze,M,ne,"[","\\lbrack",!0),y(k,M,gt,"]","\\rbrack",!0),y(ze,M,ne,"]","\\rbrack",!0),y(k,M,sr,"(","\\lparen",!0),y(k,M,gt,")","\\rparen",!0),y(ze,M,ne,"<","\\textless",!0),y(ze,M,ne,">","\\textgreater",!0),y(k,M,sr,"\u230A","\\lfloor",!0),y(k,M,gt,"\u230B","\\rfloor",!0),y(k,M,sr,"\u2308","\\lceil",!0),y(k,M,gt,"\u2309","\\rceil",!0),y(k,M,ne,"\\","\\backslash"),y(k,M,ne,"\u2223","|"),y(k,M,ne,"\u2223","\\vert"),y(ze,M,ne,"|","\\textbar",!0),y(k,M,ne,"\u2225","\\|"),y(k,M,ne,"\u2225","\\Vert"),y(ze,M,ne,"\u2225","\\textbardbl"),y(ze,M,ne,"~","\\textasciitilde"),y(ze,M,ne,"\\","\\textbackslash"),y(ze,M,ne,"^","\\textasciicircum"),y(k,M,ee,"\u2191","\\uparrow",!0),y(k,M,ee,"\u21D1","\\Uparrow",!0),y(k,M,ee,"\u2193","\\downarrow",!0),y(k,M,ee,"\u21D3","\\Downarrow",!0),y(k,M,ee,"\u2195","\\updownarrow",!0),y(k,M,ee,"\u21D5","\\Updownarrow",!0),y(k,M,$t,"\u2210","\\coprod"),y(k,M,$t,"\u22C1","\\bigvee"),y(k,M,$t,"\u22C0","\\bigwedge"),y(k,M,$t,"\u2A04","\\biguplus"),y(k,M,$t,"\u22C2","\\bigcap"),y(k,M,$t,"\u22C3","\\bigcup"),y(k,M,$t,"\u222B","\\int"),y(k,M,$t,"\u222B","\\intop"),y(k,M,$t,"\u222C","\\iint"),y(k,M,$t,"\u222D","\\iiint"),y(k,M,$t,"\u220F","\\prod"),y(k,M,$t,"\u2211","\\sum"),y(k,M,$t,"\u2A02","\\bigotimes"),y(k,M,$t,"\u2A01","\\bigoplus"),y(k,M,$t,"\u2A00","\\bigodot"),y(k,M,$t,"\u222E","\\oint"),y(k,M,$t,"\u222F","\\oiint"),y(k,M,$t,"\u2230","\\oiiint"),y(k,M,$t,"\u2A06","\\bigsqcup"),y(k,M,$t,"\u222B","\\smallint"),y(ze,M,xt,"\u2026","\\textellipsis"),y(k,M,xt,"\u2026","\\mathellipsis"),y(ze,M,xt,"\u2026","\\ldots",!0),y(k,M,xt,"\u2026","\\ldots",!0),y(k,M,xt,"\u22EF","\\@cdots",!0),y(k,M,xt,"\u22F1","\\ddots",!0),y(k,M,ne,"\u22EE","\\varvdots"),y(ze,M,ne,"\u22EE","\\varvdots"),y(k,M,Yt,"\u02CA","\\acute"),y(k,M,Yt,"\u02CB","\\grave"),y(k,M,Yt,"\xA8","\\ddot"),y(k,M,Yt,"~","\\tilde"),y(k,M,Yt,"\u02C9","\\bar"),y(k,M,Yt,"\u02D8","\\breve"),y(k,M,Yt,"\u02C7","\\check"),y(k,M,Yt,"^","\\hat"),y(k,M,Yt,"\u20D7","\\vec"),y(k,M,Yt,"\u02D9","\\dot"),y(k,M,Yt,"\u02DA","\\mathring"),y(k,M,Re,"\uE131","\\@imath"),y(k,M,Re,"\uE237","\\@jmath"),y(k,M,ne,"\u0131","\u0131"),y(k,M,ne,"\u0237","\u0237"),y(ze,M,ne,"\u0131","\\i",!0),y(ze,M,ne,"\u0237","\\j",!0),y(ze,M,ne,"\xDF","\\ss",!0),y(ze,M,ne,"\xE6","\\ae",!0),y(ze,M,ne,"\u0153","\\oe",!0),y(ze,M,ne,"\xF8","\\o",!0),y(ze,M,ne,"\xC6","\\AE",!0),y(ze,M,ne,"\u0152","\\OE",!0),y(ze,M,ne,"\xD8","\\O",!0),y(ze,M,Yt,"\u02CA","\\'"),y(ze,M,Yt,"\u02CB","\\`"),y(ze,M,Yt,"\u02C6","\\^"),y(ze,M,Yt,"\u02DC","\\~"),y(ze,M,Yt,"\u02C9","\\="),y(ze,M,Yt,"\u02D8","\\u"),y(ze,M,Yt,"\u02D9","\\."),y(ze,M,Yt,"\xB8","\\c"),y(ze,M,Yt,"\u02DA","\\r"),y(ze,M,Yt,"\u02C7","\\v"),y(ze,M,Yt,"\xA8",'\\"'),y(ze,M,Yt,"\u02DD","\\H"),y(ze,M,Yt,"\u25EF","\\textcircled");const Jn={"--":!0,"---":!0,"``":!0,"''":!0};y(ze,M,ne,"\u2013","--",!0),y(ze,M,ne,"\u2013","\\textendash"),y(ze,M,ne,"\u2014","---",!0),y(ze,M,ne,"\u2014","\\textemdash"),y(ze,M,ne,"\u2018","`",!0),y(ze,M,ne,"\u2018","\\textquoteleft"),y(ze,M,ne,"\u2019","'",!0),y(ze,M,ne,"\u2019","\\textquoteright"),y(ze,M,ne,"\u201C","``",!0),y(ze,M,ne,"\u201C","\\textquotedblleft"),y(ze,M,ne,"\u201D","''",!0),y(ze,M,ne,"\u201D","\\textquotedblright"),y(k,M,ne,"\xB0","\\degree",!0),y(ze,M,ne,"\xB0","\\degree"),y(ze,M,ne,"\xB0","\\textdegree",!0),y(k,M,ne,"\xA3","\\pounds"),y(k,M,ne,"\xA3","\\mathsterling",!0),y(ze,M,ne,"\xA3","\\pounds"),y(ze,M,ne,"\xA3","\\textsterling",!0),y(k,Q,ne,"\u2720","\\maltese"),y(ze,Q,ne,"\u2720","\\maltese");const _n='0123456789/@."';for(let s=0;s<_n.length;s++){const a=_n.charAt(s);y(k,M,ne,a,a)}const ae='0123456789!@*()-=+";:?/.,';for(let s=0;s<ae.length;s++){const a=ae.charAt(s);y(ze,M,ne,a,a)}const Be="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(let s=0;s<Be.length;s++){const a=Be.charAt(s);y(k,M,Re,a,a),y(ze,M,ne,a,a)}y(k,Q,ne,"C","\u2102"),y(ze,Q,ne,"C","\u2102"),y(k,Q,ne,"H","\u210D"),y(ze,Q,ne,"H","\u210D"),y(k,Q,ne,"N","\u2115"),y(ze,Q,ne,"N","\u2115"),y(k,Q,ne,"P","\u2119"),y(ze,Q,ne,"P","\u2119"),y(k,Q,ne,"Q","\u211A"),y(ze,Q,ne,"Q","\u211A"),y(k,Q,ne,"R","\u211D"),y(ze,Q,ne,"R","\u211D"),y(k,Q,ne,"Z","\u2124"),y(ze,Q,ne,"Z","\u2124"),y(k,M,Re,"h","\u210E"),y(ze,M,Re,"h","\u210E");let Pe="";for(let s=0;s<Be.length;s++){const a=Be.charAt(s);Pe=String.fromCharCode(55349,56320+s),y(k,M,Re,a,Pe),y(ze,M,ne,a,Pe),Pe=String.fromCharCode(55349,56372+s),y(k,M,Re,a,Pe),y(ze,M,ne,a,Pe),Pe=String.fromCharCode(55349,56424+s),y(k,M,Re,a,Pe),y(ze,M,ne,a,Pe),Pe=String.fromCharCode(55349,56580+s),y(k,M,Re,a,Pe),y(ze,M,ne,a,Pe),Pe=String.fromCharCode(55349,56684+s),y(k,M,Re,a,Pe),y(ze,M,ne,a,Pe),Pe=String.fromCharCode(55349,56736+s),y(k,M,Re,a,Pe),y(ze,M,ne,a,Pe),Pe=String.fromCharCode(55349,56788+s),y(k,M,Re,a,Pe),y(ze,M,ne,a,Pe),Pe=String.fromCharCode(55349,56840+s),y(k,M,Re,a,Pe),y(ze,M,ne,a,Pe),Pe=String.fromCharCode(55349,56944+s),y(k,M,Re,a,Pe),y(ze,M,ne,a,Pe),s<26&&(Pe=String.fromCharCode(55349,56632+s),y(k,M,Re,a,Pe),y(ze,M,ne,a,Pe),Pe=String.fromCharCode(55349,56476+s),y(k,M,Re,a,Pe),y(ze,M,ne,a,Pe))}Pe="\u{1D55C}",y(k,M,Re,"k",Pe),y(ze,M,ne,"k",Pe);for(let s=0;s<10;s++){const a=s.toString();Pe=String.fromCharCode(55349,57294+s),y(k,M,Re,a,Pe),y(ze,M,ne,a,Pe),Pe=String.fromCharCode(55349,57314+s),y(k,M,Re,a,Pe),y(ze,M,ne,a,Pe),Pe=String.fromCharCode(55349,57324+s),y(k,M,Re,a,Pe),y(ze,M,ne,a,Pe),Pe=String.fromCharCode(55349,57334+s),y(k,M,Re,a,Pe),y(ze,M,ne,a,Pe)}const Ue="\xD0\xDE\xFE";for(let s=0;s<Ue.length;s++){const a=Ue.charAt(s);y(k,M,Re,a,a),y(ze,M,ne,a,a)}const De=[["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"]],Ze=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],Xe=function(s,a){const l=s.charCodeAt(0),h=s.charCodeAt(1),b=(l-55296)*1024+(h-56320)+65536,E=a==="math"?0:1;if(119808<=b&&b<120484){const O=Math.floor((b-119808)/26);return[De[O][2],De[O][E]]}else if(120782<=b&&b<=120831){const O=Math.floor((b-120782)/10);return[Ze[O][2],Ze[O][E]]}else{if(b===120485||b===120486)return[De[0][2],De[0][E]];if(120486<b&&b<120782)return["",""];throw new i("Unsupported character: "+s)}};class st{constructor(a){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=a,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(a){return this.classes.includes(a)}toNode(){const a=document.createDocumentFragment();for(let l=0;l<this.children.length;l++)a.appendChild(this.children[l].toNode());return a}toMarkup(){let a="";for(let l=0;l<this.children.length;l++)a+=this.children[l].toMarkup();return a}toText(){const a=l=>l.toText();return this.children.map(a).join("")}}const le=function(s,a,l){return Vt[l][s]&&Vt[l][s].replace&&(s=Vt[l][s].replace),{value:s,metrics:ot(s,a,l)}},ye=function(s,a,l,h,b){const E=le(s,a,l),O=E.metrics;s=E.value;let _;if(O){let V=O.italic;(l==="text"||h&&h.font==="mathit")&&(V=0),_=new Dt(s,O.height,O.depth,V,O.skew,O.width,b)}else typeof console<"u"&&console.warn("No character metrics "+("for '"+s+"' in style '"+a+"' and mode '"+l+"'")),_=new Dt(s,0,0,0,0,0,b);if(h){_.maxFontSize=h.sizeMultiplier,h.style.isTight()&&_.classes.push("mtight");const V=h.getColor();V&&(_.style.color=V)}return _},ve=function(s,a,l,h){return h===void 0&&(h=[]),l.font==="boldsymbol"&&le(s,"Main-Bold",a).metrics?ye(s,"Main-Bold",a,l,h.concat(["mathbf"])):s==="\\"||Vt[a][s].font==="main"?ye(s,"Main-Regular",a,l,h):ye(s,"AMS-Regular",a,l,h.concat(["amsrm"]))},Je=function(s,a,l,h,b){return b!=="textord"&&le(s,"Math-BoldItalic",a).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},it=function(s,a,l){const h=s.mode,b=s.text,E=["mord"],O=h==="math"||h==="text"&&a.font,_=O?a.font:a.fontFamily;let V="",te="";if(b.charCodeAt(0)===55349&&([V,te]=Xe(b,h)),V.length>0)return ye(b,V,h,a,E.concat(te));if(_){let de,pe;if(_==="boldsymbol"){const Ee=Je(b,h,a,E,l);de=Ee.fontName,pe=[Ee.fontClass]}else O?(de=zo[_].fontName,pe=[_]):(de=yo(_,a.fontWeight,a.fontShape),pe=[_,a.fontWeight,a.fontShape]);if(le(b,de,h).metrics)return ye(b,de,h,a,E.concat(pe));if(Jn.hasOwnProperty(b)&&de.slice(0,10)==="Typewriter"){const Ee=[];for(let Ye=0;Ye<b.length;Ye++)Ee.push(ye(b[Ye],de,h,a,E.concat(pe)));return ga(Ee)}}if(l==="mathord")return ye(b,"Math-Italic",h,a,E.concat(["mathnormal"]));if(l==="textord"){const de=Vt[h][b]&&Vt[h][b].font;if(de==="ams"){const pe=yo("amsrm",a.fontWeight,a.fontShape);return ye(b,pe,h,a,E.concat("amsrm",a.fontWeight,a.fontShape))}else if(de==="main"||!de){const pe=yo("textrm",a.fontWeight,a.fontShape);return ye(b,pe,h,a,E.concat(a.fontWeight,a.fontShape))}else{const pe=yo(de,a.fontWeight,a.fontShape);return ye(b,pe,h,a,E.concat(pe,a.fontWeight,a.fontShape))}}else throw new Error("unexpected type: "+l+" in makeOrd")},Ut=(s,a)=>{if(mt(s.classes)!==mt(a.classes)||s.skew!==a.skew||s.maxFontSize!==a.maxFontSize)return!1;if(s.classes.length===1){const l=s.classes[0];if(l==="mbin"||l==="mord")return!1}for(const l in s.style)if(s.style.hasOwnProperty(l)&&s.style[l]!==a.style[l])return!1;for(const l in a.style)if(a.style.hasOwnProperty(l)&&s.style[l]!==a.style[l])return!1;return!0},Rt=s=>{for(let a=0;a<s.length-1;a++){const l=s[a],h=s[a+1];l instanceof Dt&&h instanceof Dt&&Ut(l,h)&&(l.text+=h.text,l.height=Math.max(l.height,h.height),l.depth=Math.max(l.depth,h.depth),l.italic=h.italic,s.splice(a+1,1),a--)}return s},lt=function(s){let a=0,l=0,h=0;for(let b=0;b<s.children.length;b++){const E=s.children[b];E.height>a&&(a=E.height),E.depth>l&&(l=E.depth),E.maxFontSize>h&&(h=E.maxFontSize)}s.height=a,s.depth=l,s.maxFontSize=h},wt=function(s,a,l,h){const b=new Ct(s,a,l,h);return lt(b),b},Kr=(s,a,l,h)=>new Ct(s,a,l,h),An=function(s,a,l){const h=wt([s],[],a);return h.height=Math.max(l||a.fontMetrics().defaultRuleThickness,a.minRuleThickness),h.style.borderBottomWidth=ue(h.height),h.maxFontSize=1,h},In=function(s,a,l,h){const b=new _t(s,a,l,h);return lt(b),b},ga=function(s){const a=new st(s);return lt(a),a},ii=function(s,a){return s instanceof st?wt([],[s],a):s},Po=function(s){if(s.positionType==="individualShift"){const l=s.children,h=[l[0]],b=-l[0].shift-l[0].elem.depth;let E=b;for(let O=1;O<l.length;O++){const _=-l[O].shift-E-l[O].elem.depth,V=_-(l[O-1].elem.height+l[O-1].elem.depth);E=E+_,h.push({type:"kern",size:V}),h.push(l[O])}return{children:h,depth:b}}let a;if(s.positionType==="top"){let l=s.positionData;for(let h=0;h<s.children.length;h++){const b=s.children[h];l-=b.type==="kern"?b.size:b.elem.height+b.elem.depth}a=l}else if(s.positionType==="bottom")a=-s.positionData;else{const l=s.children[0];if(l.type!=="elem")throw new Error('First child must have type "elem".');if(s.positionType==="shift")a=-l.elem.depth-s.positionData;else if(s.positionType==="firstBaseline")a=-l.elem.depth;else throw new Error("Invalid positionType "+s.positionType+".")}return{children:s.children,depth:a}},si=function(s,a){const{children:l,depth:h}=Po(s);let b=0;for(let Ye=0;Ye<l.length;Ye++){const rt=l[Ye];if(rt.type==="elem"){const Mt=rt.elem;b=Math.max(b,Mt.maxFontSize,Mt.height)}}b+=2;const E=wt(["pstrut"],[]);E.style.height=ue(b);const O=[];let _=h,V=h,te=h;for(let Ye=0;Ye<l.length;Ye++){const rt=l[Ye];if(rt.type==="kern")te+=rt.size;else{const Mt=rt.elem,Zt=rt.wrapperClasses||[],qt=rt.wrapperStyle||{},rr=wt(Zt,[E,Mt],void 0,qt);rr.style.top=ue(-b-te-Mt.depth),rt.marginLeft&&(rr.style.marginLeft=rt.marginLeft),rt.marginRight&&(rr.style.marginRight=rt.marginRight),O.push(rr),te+=Mt.height+Mt.depth}_=Math.min(_,te),V=Math.max(V,te)}const de=wt(["vlist"],O);de.style.height=ue(V);let pe;if(_<0){const Ye=wt([],[]),rt=wt(["vlist"],[Ye]);rt.style.height=ue(-_);const Mt=wt(["vlist-s"],[new Dt("\u200B")]);pe=[wt(["vlist-r"],[de,Mt]),wt(["vlist-r"],[rt])]}else pe=[wt(["vlist-r"],[de])];const Ee=wt(["vlist-t"],pe);return pe.length===2&&Ee.classes.push("vlist-t2"),Ee.height=V,Ee.depth=-_,Ee},Ns=(s,a)=>{const l=wt(["mspace"],[],a),h=Me(s,a);return l.style.marginRight=ue(h),l},yo=function(s,a,l){let h="";switch(s){case"amsrm":h="AMS";break;case"textrm":h="Main";break;case"textsf":h="SansSerif";break;case"texttt":h="Typewriter";break;default:h=s}let b;return a==="textbf"&&l==="textit"?b="BoldItalic":a==="textbf"?b="Bold":a==="textit"?b="Italic":b="Regular",h+"-"+b},zo={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"}},va={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]};var me={fontMap:zo,makeSymbol:ye,mathsym:ve,makeSpan:wt,makeSvgSpan:Kr,makeLineSpan:An,makeAnchor:In,makeFragment:ga,wrapFragment:ii,makeVList:si,makeOrd:it,makeGlue:Ns,staticSvg:function(s,a){const[l,h,b]=va[s],E=new br(l),O=new Fr([E],{width:ue(h),height:ue(b),style:"width:"+ue(h),viewBox:"0 0 "+1e3*h+" "+1e3*b,preserveAspectRatio:"xMinYMin"}),_=Kr(["overlay"],[O],a);return _.height=b,_.style.height=ue(b),_.style.width=ue(h),_},svgData:va,tryCombineChars:Rt};const gr={number:3,unit:"mu"},jn={number:4,unit:"mu"},kt={number:5,unit:"mu"},jt={mord:{mop:gr,mbin:jn,mrel:kt,minner:gr},mop:{mord:gr,mop:gr,mrel:kt,minner:gr},mbin:{mord:jn,mop:jn,mopen:jn,minner:jn},mrel:{mord:kt,mop:kt,mopen:kt,minner:kt},mopen:{},mclose:{mop:gr,mbin:jn,mrel:kt,minner:gr},mpunct:{mord:gr,mop:gr,mrel:kt,mopen:gr,mclose:gr,mpunct:gr,minner:gr},minner:{mord:gr,mop:gr,mbin:jn,mrel:kt,mopen:gr,mpunct:gr,minner:gr}},zr={mord:{mop:gr},mop:{mord:gr,mop:gr},mbin:{},mrel:{},mopen:{},mclose:{mop:gr},mpunct:{},minner:{mop:gr}},Gr={},Tr={},wn={};function et(s){let{type:a,names:l,props:h,handler:b,htmlBuilder:E,mathmlBuilder:O}=s;const _={type:a,numArgs:h.numArgs,argTypes:h.argTypes,allowedInArgument:!!h.allowedInArgument,allowedInText:!!h.allowedInText,allowedInMath:h.allowedInMath===void 0?!0:h.allowedInMath,numOptionalArgs:h.numOptionalArgs||0,infix:!!h.infix,primitive:!!h.primitive,handler:b};for(let V=0;V<l.length;++V)Gr[l[V]]=_;a&&(E&&(Tr[a]=E),O&&(wn[a]=O))}function Yr(s){let{type:a,htmlBuilder:l,mathmlBuilder:h}=s;et({type:a,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:l,mathmlBuilder:h})}const Bn=function(s){return s.type==="ordgroup"&&s.body.length===1?s.body[0]:s},xr=function(s){return s.type==="ordgroup"?s.body:[s]},Ln=me.makeSpan,Om=["leftmost","mbin","mopen","mrel","mop","mpunct"],$m=["rightmost","mrel","mclose","mpunct"],Mm={display:z.DISPLAY,text:z.TEXT,script:z.SCRIPT,scriptscript:z.SCRIPTSCRIPT},Rm={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},_r=function(s,a,l,h){h===void 0&&(h=[null,null]);const b=[];for(let te=0;te<s.length;te++){const de=Qt(s[te],a);if(de instanceof st){const pe=de.children;b.push(...pe)}else b.push(de)}if(me.tryCombineChars(b),!l)return b;let E=a;if(s.length===1){const te=s[0];te.type==="sizing"?E=a.havingSize(te.size):te.type==="styling"&&(E=a.havingStyle(Mm[te.style]))}const O=Ln([h[0]||"leftmost"],[],a),_=Ln([h[1]||"rightmost"],[],a),V=l==="root";return Ts(b,(te,de)=>{const pe=de.classes[0],Ee=te.classes[0];pe==="mbin"&&$m.includes(Ee)?de.classes[0]="mord":Ee==="mbin"&&Om.includes(pe)&&(te.classes[0]="mord")},{node:O},_,V),Ts(b,(te,de)=>{const pe=$s(de),Ee=$s(te),Ye=pe&&Ee?te.hasClass("mtight")?zr[pe][Ee]:jt[pe][Ee]:null;if(Ye)return me.makeGlue(Ye,E)},{node:O},_,V),b},Ts=function(s,a,l,h,b){h&&s.push(h);let E=0;for(;E<s.length;E++){const O=s[E],_=ju(O);if(_){Ts(_.children,a,l,null,b);continue}const V=!O.hasClass("mspace");if(V){const te=a(O,l.node);te&&(l.insertAfter?l.insertAfter(te):(s.unshift(te),E++))}V?l.node=O:b&&O.hasClass("newline")&&(l.node=Ln(["leftmost"])),l.insertAfter=(te=>de=>{s.splice(te+1,0,de),E++})(E)}h&&s.pop()},ju=function(s){return s instanceof st||s instanceof _t||s instanceof Ct&&s.hasClass("enclosing")?s:null},Os=function(s,a){const l=ju(s);if(l){const h=l.children;if(h.length){if(a==="right")return Os(h[h.length-1],"right");if(a==="left")return Os(h[0],"left")}}return s},$s=function(s,a){return s?(a&&(s=Os(s,a)),Rm[s.classes[0]]||null):null},ba=function(s,a){const l=["nulldelimiter"].concat(s.baseSizingClasses());return Ln(a.concat(l))},Qt=function(s,a,l){if(!s)return Ln();if(Tr[s.type]){let h=Tr[s.type](s,a);if(l&&a.size!==l.size){h=Ln(a.sizingClasses(l),[h],a);const b=a.sizeMultiplier/l.sizeMultiplier;h.height*=b,h.depth*=b}return h}else throw new i("Got group of unknown type: '"+s.type+"'")};function li(s,a){const l=Ln(["base"],s,a),h=Ln(["strut"]);return h.style.height=ue(l.height+l.depth),l.depth&&(h.style.verticalAlign=ue(-l.depth)),l.children.unshift(h),l}function Ms(s,a){let l=null;s.length===1&&s[0].type==="tag"&&(l=s[0].tag,s=s[0].body);const h=_r(s,a,"root");let b;h.length===2&&h[1].hasClass("tag")&&(b=h.pop());const E=[];let O=[];for(let te=0;te<h.length;te++)if(O.push(h[te]),h[te].hasClass("mbin")||h[te].hasClass("mrel")||h[te].hasClass("allowbreak")){let de=!1;for(;te<h.length-1&&h[te+1].hasClass("mspace")&&!h[te+1].hasClass("newline");)te++,O.push(h[te]),h[te].hasClass("nobreak")&&(de=!0);de||(E.push(li(O,a)),O=[])}else h[te].hasClass("newline")&&(O.pop(),O.length>0&&(E.push(li(O,a)),O=[]),E.push(h[te]));O.length>0&&E.push(li(O,a));let _;l?(_=li(_r(l,a,!0)),_.classes=["tag"],E.push(_)):b&&E.push(b);const V=Ln(["katex-html"],E);if(V.setAttribute("aria-hidden","true"),_){const te=_.children[0];te.style.height=ue(V.height+V.depth),V.depth&&(te.style.verticalAlign=ue(-V.depth))}return V}function Lu(s){return new st(s)}class un{constructor(a,l,h){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=a,this.attributes={},this.children=l||[],this.classes=h||[]}setAttribute(a,l){this.attributes[a]=l}getAttribute(a){return this.attributes[a]}toNode(){const a=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(const l in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,l)&&a.setAttribute(l,this.attributes[l]);this.classes.length>0&&(a.className=mt(this.classes));for(let l=0;l<this.children.length;l++)if(this.children[l]instanceof Fn&&this.children[l+1]instanceof Fn){let h=this.children[l].toText()+this.children[++l].toText();for(;this.children[l+1]instanceof Fn;)h+=this.children[++l].toText();a.appendChild(new Fn(h).toNode())}else a.appendChild(this.children[l].toNode());return a}toMarkup(){let a="<"+this.type;for(const l in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,l)&&(a+=" "+l+'="',a+=C.escape(this.attributes[l]),a+='"');this.classes.length>0&&(a+=' class ="'+C.escape(mt(this.classes))+'"'),a+=">";for(let l=0;l<this.children.length;l++)a+=this.children[l].toMarkup();return a+="</"+this.type+">",a}toText(){return this.children.map(a=>a.toText()).join("")}}class Fn{constructor(a){this.text=void 0,this.text=a}toNode(){return document.createTextNode(this.text)}toMarkup(){return C.escape(this.toText())}toText(){return this.text}}class Pm{constructor(a){this.width=void 0,this.character=void 0,this.width=a,a>=.05555&&a<=.05556?this.character="\u200A":a>=.1666&&a<=.1667?this.character="\u2009":a>=.2222&&a<=.2223?this.character="\u2005":a>=.2777&&a<=.2778?this.character="\u2005\u200A":a>=-.05556&&a<=-.05555?this.character="\u200A\u2063":a>=-.1667&&a<=-.1666?this.character="\u2009\u2063":a>=-.2223&&a<=-.2222?this.character="\u205F\u2063":a>=-.2778&&a<=-.2777?this.character="\u2005\u2063":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);{const a=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return a.setAttribute("width",ue(this.width)),a}}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+ue(this.width)+'"/>'}toText(){return this.character?this.character:" "}}var Ge={MathNode:un,TextNode:Fn,SpaceNode:Pm,newDocumentFragment:Lu};const hn=function(s,a,l){return Vt[a][s]&&Vt[a][s].replace&&s.charCodeAt(0)!==55349&&!(Jn.hasOwnProperty(s)&&l&&(l.fontFamily&&l.fontFamily.slice(4,6)==="tt"||l.font&&l.font.slice(4,6)==="tt"))&&(s=Vt[a][s].replace),new Ge.TextNode(s)},Rs=function(s){return s.length===1?s[0]:new Ge.MathNode("mrow",s)},Ps=function(s,a){if(a.fontFamily==="texttt")return"monospace";if(a.fontFamily==="textsf")return a.fontShape==="textit"&&a.fontWeight==="textbf"?"sans-serif-bold-italic":a.fontShape==="textit"?"sans-serif-italic":a.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(a.fontShape==="textit"&&a.fontWeight==="textbf")return"bold-italic";if(a.fontShape==="textit")return"italic";if(a.fontWeight==="textbf")return"bold";const l=a.font;if(!l||l==="mathnormal")return null;const h=s.mode;if(l==="mathit")return"italic";if(l==="boldsymbol")return s.type==="textord"?"bold":"bold-italic";if(l==="mathbf")return"bold";if(l==="mathbb")return"double-struck";if(l==="mathsfit")return"sans-serif-italic";if(l==="mathfrak")return"fraktur";if(l==="mathscr"||l==="mathcal")return"script";if(l==="mathsf")return"sans-serif";if(l==="mathtt")return"monospace";let b=s.text;if(["\\imath","\\jmath"].includes(b))return null;Vt[h][b]&&Vt[h][b].replace&&(b=Vt[h][b].replace);const E=me.fontMap[l].fontName;return ot(b,E,h)?me.fontMap[l].variant:null};function zs(s){if(!s)return!1;if(s.type==="mi"&&s.children.length===1){const a=s.children[0];return a instanceof Fn&&a.text==="."}else if(s.type==="mo"&&s.children.length===1&&s.getAttribute("separator")==="true"&&s.getAttribute("lspace")==="0em"&&s.getAttribute("rspace")==="0em"){const a=s.children[0];return a instanceof Fn&&a.text===","}else return!1}const nn=function(s,a,l){if(s.length===1){const E=hr(s[0],a);return l&&E instanceof un&&E.type==="mo"&&(E.setAttribute("lspace","0em"),E.setAttribute("rspace","0em")),[E]}const h=[];let b;for(let E=0;E<s.length;E++){const O=hr(s[E],a);if(O instanceof un&&b instanceof un){if(O.type==="mtext"&&b.type==="mtext"&&O.getAttribute("mathvariant")===b.getAttribute("mathvariant")){b.children.push(...O.children);continue}else if(O.type==="mn"&&b.type==="mn"){b.children.push(...O.children);continue}else if(zs(O)&&b.type==="mn"){b.children.push(...O.children);continue}else if(O.type==="mn"&&zs(b))O.children=[...b.children,...O.children],h.pop();else if((O.type==="msup"||O.type==="msub")&&O.children.length>=1&&(b.type==="mn"||zs(b))){const _=O.children[0];_ instanceof un&&_.type==="mn"&&(_.children=[...b.children,..._.children],h.pop())}else if(b.type==="mi"&&b.children.length===1){const _=b.children[0];if(_ instanceof Fn&&_.text==="\u0338"&&(O.type==="mo"||O.type==="mi"||O.type==="mn")){const V=O.children[0];V instanceof Fn&&V.text.length>0&&(V.text=V.text.slice(0,1)+"\u0338"+V.text.slice(1),h.pop())}}}h.push(O),b=O}return h},Qn=function(s,a,l){return Rs(nn(s,a,l))},hr=function(s,a){if(!s)return new Ge.MathNode("mrow");if(wn[s.type])return wn[s.type](s,a);throw new i("Got group of unknown type: '"+s.type+"'")};function Hu(s,a,l,h,b){const E=nn(s,l);let O;E.length===1&&E[0]instanceof un&&["mrow","mtable"].includes(E[0].type)?O=E[0]:O=new Ge.MathNode("mrow",E);const _=new Ge.MathNode("annotation",[new Ge.TextNode(a)]);_.setAttribute("encoding","application/x-tex");const V=new Ge.MathNode("semantics",[O,_]),te=new Ge.MathNode("math",[V]);te.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),h&&te.setAttribute("display","block");const de=b?"katex":"katex-mathml";return me.makeSpan([de],[te])}const qu=function(s){return new Tt({style:s.displayMode?z.DISPLAY:z.TEXT,maxSize:s.maxSize,minRuleThickness:s.minRuleThickness})},Ku=function(s,a){if(a.displayMode){const l=["katex-display"];a.leqno&&l.push("leqno"),a.fleqn&&l.push("fleqn"),s=me.makeSpan(l,[s])}return s},zm=function(s,a,l){const h=qu(l);let b;if(l.output==="mathml")return Hu(s,a,h,l.displayMode,!0);if(l.output==="html"){const E=Ms(s,h);b=me.makeSpan(["katex"],[E])}else{const E=Hu(s,a,h,l.displayMode,!1),O=Ms(s,h);b=me.makeSpan(["katex"],[E,O])}return Ku(b,l)},_m=function(s,a,l){const h=qu(l),b=Ms(s,h),E=me.makeSpan(["katex"],[b]);return Ku(E,l)},Im={widehat:"^",widecheck:"\u02C7",widetilde:"~",utilde:"~",overleftarrow:"\u2190",underleftarrow:"\u2190",xleftarrow:"\u2190",overrightarrow:"\u2192",underrightarrow:"\u2192",xrightarrow:"\u2192",underbrace:"\u23DF",overbrace:"\u23DE",overgroup:"\u23E0",undergroup:"\u23E1",overleftrightarrow:"\u2194",underleftrightarrow:"\u2194",xleftrightarrow:"\u2194",Overrightarrow:"\u21D2",xRightarrow:"\u21D2",overleftharpoon:"\u21BC",xleftharpoonup:"\u21BC",overrightharpoon:"\u21C0",xrightharpoonup:"\u21C0",xLeftarrow:"\u21D0",xLeftrightarrow:"\u21D4",xhookleftarrow:"\u21A9",xhookrightarrow:"\u21AA",xmapsto:"\u21A6",xrightharpoondown:"\u21C1",xleftharpoondown:"\u21BD",xrightleftharpoons:"\u21CC",xleftrightharpoons:"\u21CB",xtwoheadleftarrow:"\u219E",xtwoheadrightarrow:"\u21A0",xlongequal:"=",xtofrom:"\u21C4",xrightleftarrows:"\u21C4",xrightequilibrium:"\u21CC",xleftequilibrium:"\u21CB","\\cdrightarrow":"\u2192","\\cdleftarrow":"\u2190","\\cdlongequal":"="},jm=function(s){const a=new Ge.MathNode("mo",[new Ge.TextNode(Im[s.replace(/^\\/,"")])]);return a.setAttribute("stretchy","true"),a},Lm={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]},Hm=function(s){return s.type==="ordgroup"?s.body.length:1};var Hn={encloseSpan:function(s,a,l,h,b){let E;const O=s.height+s.depth+l+h;if(/fbox|color|angl/.test(a)){if(E=me.makeSpan(["stretchy",a],[],b),a==="fbox"){const _=b.color&&b.getColor();_&&(E.style.borderColor=_)}}else{const _=[];/^[bx]cancel$/.test(a)&&_.push(new or({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(a)&&_.push(new or({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));const V=new Fr(_,{width:"100%",height:ue(O)});E=me.makeSvgSpan([],[V],b)}return E.height=O,E.style.height=ue(O),E},mathMLnode:jm,svgSpan:function(s,a){function l(){let O=4e5;const _=s.label.slice(1);if(["widehat","widecheck","widetilde","utilde"].includes(_)){const V=Hm(s.base);let te,de,pe;if(V>5)_==="widehat"||_==="widecheck"?(te=420,O=2364,pe=.42,de=_+"4"):(te=312,O=2340,pe=.34,de="tilde4");else{const rt=[1,1,2,2,3,3][V];_==="widehat"||_==="widecheck"?(O=[0,1062,2364,2364,2364][rt],te=[0,239,300,360,420][rt],pe=[0,.24,.3,.3,.36,.42][rt],de=_+rt):(O=[0,600,1033,2339,2340][rt],te=[0,260,286,306,312][rt],pe=[0,.26,.286,.3,.306,.34][rt],de="tilde"+rt)}const Ee=new br(de),Ye=new Fr([Ee],{width:"100%",height:ue(pe),viewBox:"0 0 "+O+" "+te,preserveAspectRatio:"none"});return{span:me.makeSvgSpan([],[Ye],a),minWidth:0,height:pe}}else{const V=[],te=Lm[_],[de,pe,Ee]=te,Ye=Ee/1e3,rt=de.length;let Mt,Zt;if(rt===1){const qt=te[3];Mt=["hide-tail"],Zt=[qt]}else if(rt===2)Mt=["halfarrow-left","halfarrow-right"],Zt=["xMinYMin","xMaxYMin"];else if(rt===3)Mt=["brace-left","brace-center","brace-right"],Zt=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support
|
|
470
|
-
`+rt+" children.");for(let qt=0;qt<rt;qt++){const rr=new br(de[qt]),er=new Fr([rr],{width:"400em",height:ue(Ye),viewBox:"0 0 "+O+" "+Ee,preserveAspectRatio:Zt[qt]+" slice"}),wr=me.makeSvgSpan([Mt[qt]],[er],a);if(rt===1)return{span:wr,minWidth:pe,height:Ye};wr.style.height=ue(Ye),V.push(wr)}return{span:me.makeSpan(["stretchy"],V,a),minWidth:pe,height:Ye}}}const{span:h,minWidth:b,height:E}=l();return h.height=E,h.style.height=ue(E),b>0&&(h.style.minWidth=ue(b)),h}};function Pt(s,a){if(!s||s.type!==a)throw new Error("Expected node of type "+a+", but got "+(s?"node of type "+s.type:String(s)));return s}function _s(s){const a=ui(s);if(!a)throw new Error("Expected node of symbol group type, but got "+(s?"node of type "+s.type:String(s)));return a}function ui(s){return s&&(s.type==="atom"||Mr.hasOwnProperty(s.type))?s:null}const Is=(s,a)=>{let l,h,b;s&&s.type==="supsub"?(h=Pt(s.base,"accent"),l=h.base,s.base=l,b=mr(Qt(s,a)),s.base=h):(h=Pt(s,"accent"),l=h.base);const E=Qt(l,a.havingCrampedStyle()),O=h.isShifty&&C.isCharacterBox(l);let _=0;if(O){const Ee=C.getBaseElem(l),Ye=Qt(Ee,a.havingCrampedStyle());_=tr(Ye).skew}const V=h.label==="\\c";let te=V?E.height+E.depth:Math.min(E.height,a.fontMetrics().xHeight),de;if(h.isStretchy)de=Hn.svgSpan(h,a),de=me.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:E},{type:"elem",elem:de,wrapperClasses:["svg-align"],wrapperStyle:_>0?{width:"calc(100% - "+ue(2*_)+")",marginLeft:ue(2*_)}:void 0}]},a);else{let Ee,Ye;h.label==="\\vec"?(Ee=me.staticSvg("vec",a),Ye=me.svgData.vec[1]):(Ee=me.makeOrd({mode:h.mode,text:h.label},a,"textord"),Ee=tr(Ee),Ee.italic=0,Ye=Ee.width,V&&(te+=Ee.depth)),de=me.makeSpan(["accent-body"],[Ee]);const rt=h.label==="\\textcircled";rt&&(de.classes.push("accent-full"),te=E.height);let Mt=_;rt||(Mt-=Ye/2),de.style.left=ue(Mt),h.label==="\\textcircled"&&(de.style.top=".2em"),de=me.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:E},{type:"kern",size:-te},{type:"elem",elem:de}]},a)}const pe=me.makeSpan(["mord","accent"],[de],a);return b?(b.children[0]=pe,b.height=Math.max(pe.height,b.height),b.classes[0]="mord",b):pe},Wu=(s,a)=>{const l=s.isStretchy?Hn.mathMLnode(s.label):new Ge.MathNode("mo",[hn(s.label,s.mode)]),h=new Ge.MathNode("mover",[hr(s.base,a),l]);return h.setAttribute("accent","true"),h},qm=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(s=>"\\"+s).join("|"));et({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:(s,a)=>{const l=Bn(a[0]),h=!qm.test(s.funcName),b=!h||s.funcName==="\\widehat"||s.funcName==="\\widetilde"||s.funcName==="\\widecheck";return{type:"accent",mode:s.parser.mode,label:s.funcName,isStretchy:h,isShifty:b,base:l}},htmlBuilder:Is,mathmlBuilder:Wu}),et({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(s,a)=>{const l=a[0];let h=s.parser.mode;return h==="math"&&(s.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+s.funcName+" works only in text mode"),h="text"),{type:"accent",mode:h,label:s.funcName,isStretchy:!1,isShifty:!0,base:l}},htmlBuilder:Is,mathmlBuilder:Wu}),et({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(s,a)=>{let{parser:l,funcName:h}=s;const b=a[0];return{type:"accentUnder",mode:l.mode,label:h,base:b}},htmlBuilder:(s,a)=>{const l=Qt(s.base,a),h=Hn.svgSpan(s,a),b=s.label==="\\utilde"?.12:0,E=me.makeVList({positionType:"top",positionData:l.height,children:[{type:"elem",elem:h,wrapperClasses:["svg-align"]},{type:"kern",size:b},{type:"elem",elem:l}]},a);return me.makeSpan(["mord","accentunder"],[E],a)},mathmlBuilder:(s,a)=>{const l=Hn.mathMLnode(s.label),h=new Ge.MathNode("munder",[hr(s.base,a),l]);return h.setAttribute("accentunder","true"),h}});const ci=s=>{const a=new Ge.MathNode("mpadded",s?[s]:[]);return a.setAttribute("width","+0.6em"),a.setAttribute("lspace","0.3em"),a};et({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(s,a,l){let{parser:h,funcName:b}=s;return{type:"xArrow",mode:h.mode,label:b,body:a[0],below:l[0]}},htmlBuilder(s,a){const l=a.style;let h=a.havingStyle(l.sup());const b=me.wrapFragment(Qt(s.body,h,a),a),E=s.label.slice(0,2)==="\\x"?"x":"cd";b.classes.push(E+"-arrow-pad");let O;s.below&&(h=a.havingStyle(l.sub()),O=me.wrapFragment(Qt(s.below,h,a),a),O.classes.push(E+"-arrow-pad"));const _=Hn.svgSpan(s,a),V=-a.fontMetrics().axisHeight+.5*_.height;let te=-a.fontMetrics().axisHeight-.5*_.height-.111;(b.depth>.25||s.label==="\\xleftequilibrium")&&(te-=b.depth);let de;if(O){const pe=-a.fontMetrics().axisHeight+O.height+.5*_.height+.111;de=me.makeVList({positionType:"individualShift",children:[{type:"elem",elem:b,shift:te},{type:"elem",elem:_,shift:V},{type:"elem",elem:O,shift:pe}]},a)}else de=me.makeVList({positionType:"individualShift",children:[{type:"elem",elem:b,shift:te},{type:"elem",elem:_,shift:V}]},a);return de.children[0].children[0].children[1].classes.push("svg-align"),me.makeSpan(["mrel","x-arrow"],[de],a)},mathmlBuilder(s,a){const l=Hn.mathMLnode(s.label);l.setAttribute("minsize",s.label.charAt(0)==="x"?"1.75em":"3.0em");let h;if(s.body){const b=ci(hr(s.body,a));if(s.below){const E=ci(hr(s.below,a));h=new Ge.MathNode("munderover",[l,E,b])}else h=new Ge.MathNode("mover",[l,b])}else if(s.below){const b=ci(hr(s.below,a));h=new Ge.MathNode("munder",[l,b])}else h=ci(),h=new Ge.MathNode("mover",[l,h]);return h}});const Km=me.makeSpan;function Vu(s,a){const l=_r(s.body,a,!0);return Km([s.mclass],l,a)}function Uu(s,a){let l;const h=nn(s.body,a);return s.mclass==="minner"?l=new Ge.MathNode("mpadded",h):s.mclass==="mord"?s.isCharacterBox?(l=h[0],l.type="mi"):l=new Ge.MathNode("mi",h):(s.isCharacterBox?(l=h[0],l.type="mo"):l=new Ge.MathNode("mo",h),s.mclass==="mbin"?(l.attributes.lspace="0.22em",l.attributes.rspace="0.22em"):s.mclass==="mpunct"?(l.attributes.lspace="0em",l.attributes.rspace="0.17em"):s.mclass==="mopen"||s.mclass==="mclose"?(l.attributes.lspace="0em",l.attributes.rspace="0em"):s.mclass==="minner"&&(l.attributes.lspace="0.0556em",l.attributes.width="+0.1111em")),l}et({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(s,a){let{parser:l,funcName:h}=s;const b=a[0];return{type:"mclass",mode:l.mode,mclass:"m"+h.slice(5),body:xr(b),isCharacterBox:C.isCharacterBox(b)}},htmlBuilder:Vu,mathmlBuilder:Uu});const di=s=>{const a=s.type==="ordgroup"&&s.body.length?s.body[0]:s;return a.type==="atom"&&(a.family==="bin"||a.family==="rel")?"m"+a.family:"mord"};et({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(s,a){let{parser:l}=s;return{type:"mclass",mode:l.mode,mclass:di(a[0]),body:xr(a[1]),isCharacterBox:C.isCharacterBox(a[1])}}}),et({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(s,a){let{parser:l,funcName:h}=s;const b=a[1],E=a[0];let O;h!=="\\stackrel"?O=di(b):O="mrel";const _={type:"op",mode:b.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:h!=="\\stackrel",body:xr(b)},V={type:"supsub",mode:E.mode,base:_,sup:h==="\\underset"?null:E,sub:h==="\\underset"?E:null};return{type:"mclass",mode:l.mode,mclass:O,body:[V],isCharacterBox:C.isCharacterBox(V)}},htmlBuilder:Vu,mathmlBuilder:Uu}),et({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(s,a){let{parser:l}=s;return{type:"pmb",mode:l.mode,mclass:di(a[0]),body:xr(a[0])}},htmlBuilder(s,a){const l=_r(s.body,a,!0),h=me.makeSpan([s.mclass],l,a);return h.style.textShadow="0.02em 0.01em 0.04px",h},mathmlBuilder(s,a){const l=nn(s.body,a),h=new Ge.MathNode("mstyle",l);return h.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),h}});const Wm={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Xu=()=>({type:"styling",body:[],mode:"math",style:"display"}),Gu=s=>s.type==="textord"&&s.text==="@",Vm=(s,a)=>(s.type==="mathord"||s.type==="atom")&&s.text===a;function Um(s,a,l){const h=Wm[s];switch(h){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return l.callFunction(h,[a[0]],[a[1]]);case"\\uparrow":case"\\downarrow":{const b=l.callFunction("\\\\cdleft",[a[0]],[]),E={type:"atom",text:h,mode:"math",family:"rel"},O=l.callFunction("\\Big",[E],[]),_=l.callFunction("\\\\cdright",[a[1]],[]),V={type:"ordgroup",mode:"math",body:[b,O,_]};return l.callFunction("\\\\cdparent",[V],[])}case"\\\\cdlongequal":return l.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{const b={type:"textord",text:"\\Vert",mode:"math"};return l.callFunction("\\Big",[b],[])}default:return{type:"textord",text:" ",mode:"math"}}}function Xm(s){const a=[];for(s.gullet.beginGroup(),s.gullet.macros.set("\\cr","\\\\\\relax"),s.gullet.beginGroup();;){a.push(s.parseExpression(!1,"\\\\")),s.gullet.endGroup(),s.gullet.beginGroup();const E=s.fetch().text;if(E==="&"||E==="\\\\")s.consume();else if(E==="\\end"){a[a.length-1].length===0&&a.pop();break}else throw new i("Expected \\\\ or \\cr or \\end",s.nextToken)}let l=[];const h=[l];for(let E=0;E<a.length;E++){const O=a[E];let _=Xu();for(let V=0;V<O.length;V++)if(!Gu(O[V]))_.body.push(O[V]);else{l.push(_),V+=1;const te=_s(O[V]).text,de=new Array(2);if(de[0]={type:"ordgroup",mode:"math",body:[]},de[1]={type:"ordgroup",mode:"math",body:[]},!("=|.".indexOf(te)>-1))if("<>AV".indexOf(te)>-1)for(let Ee=0;Ee<2;Ee++){let Ye=!0;for(let rt=V+1;rt<O.length;rt++){if(Vm(O[rt],te)){Ye=!1,V=rt;break}if(Gu(O[rt]))throw new i("Missing a "+te+" character to complete a CD arrow.",O[rt]);de[Ee].body.push(O[rt])}if(Ye)throw new i("Missing a "+te+" character to complete a CD arrow.",O[V])}else throw new i('Expected one of "<>AV=|." after @',O[V]);const pe={type:"styling",body:[Um(te,de,s)],mode:"math",style:"display"};l.push(pe),_=Xu()}E%2===0?l.push(_):l.shift(),l=[],h.push(l)}s.gullet.endGroup(),s.gullet.endGroup();const b=new Array(h[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:h,arraystretch:1,addJot:!0,rowGaps:[null],cols:b,colSeparationType:"CD",hLinesBeforeRow:new Array(h.length+1).fill([])}}et({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(s,a){let{parser:l,funcName:h}=s;return{type:"cdlabel",mode:l.mode,side:h.slice(4),label:a[0]}},htmlBuilder(s,a){const l=a.havingStyle(a.style.sup()),h=me.wrapFragment(Qt(s.label,l,a),a);return h.classes.push("cd-label-"+s.side),h.style.bottom=ue(.8-h.depth),h.height=0,h.depth=0,h},mathmlBuilder(s,a){let l=new Ge.MathNode("mrow",[hr(s.label,a)]);return l=new Ge.MathNode("mpadded",[l]),l.setAttribute("width","0"),s.side==="left"&&l.setAttribute("lspace","-1width"),l.setAttribute("voffset","0.7em"),l=new Ge.MathNode("mstyle",[l]),l.setAttribute("displaystyle","false"),l.setAttribute("scriptlevel","1"),l}}),et({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(s,a){let{parser:l}=s;return{type:"cdlabelparent",mode:l.mode,fragment:a[0]}},htmlBuilder(s,a){const l=me.wrapFragment(Qt(s.fragment,a),a);return l.classes.push("cd-vert-arrow"),l},mathmlBuilder(s,a){return new Ge.MathNode("mrow",[hr(s.fragment,a)])}}),et({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(s,a){let{parser:l}=s;const h=Pt(a[0],"ordgroup").body;let b="";for(let _=0;_<h.length;_++){const V=Pt(h[_],"textord");b+=V.text}let E=parseInt(b),O;if(isNaN(E))throw new i("\\@char has non-numeric argument "+b);if(E<0||E>=1114111)throw new i("\\@char with invalid code point "+b);return E<=65535?O=String.fromCharCode(E):(E-=65536,O=String.fromCharCode((E>>10)+55296,(E&1023)+56320)),{type:"textord",mode:l.mode,text:O}}});const Yu=(s,a)=>{const l=_r(s.body,a.withColor(s.color),!1);return me.makeFragment(l)},Zu=(s,a)=>{const l=nn(s.body,a.withColor(s.color)),h=new Ge.MathNode("mstyle",l);return h.setAttribute("mathcolor",s.color),h};et({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(s,a){let{parser:l}=s;const h=Pt(a[0],"color-token").color,b=a[1];return{type:"color",mode:l.mode,color:h,body:xr(b)}},htmlBuilder:Yu,mathmlBuilder:Zu}),et({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(s,a){let{parser:l,breakOnTokenText:h}=s;const b=Pt(a[0],"color-token").color;l.gullet.macros.set("\\current@color",b);const E=l.parseExpression(!0,h);return{type:"color",mode:l.mode,color:b,body:E}},htmlBuilder:Yu,mathmlBuilder:Zu}),et({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(s,a,l){let{parser:h}=s;const b=h.gullet.future().text==="["?h.parseSizeGroup(!0):null,E=!h.settings.displayMode||!h.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:h.mode,newLine:E,size:b&&Pt(b,"size").value}},htmlBuilder(s,a){const l=me.makeSpan(["mspace"],[],a);return s.newLine&&(l.classes.push("newline"),s.size&&(l.style.marginTop=ue(Me(s.size,a)))),l},mathmlBuilder(s,a){const l=new Ge.MathNode("mspace");return s.newLine&&(l.setAttribute("linebreak","newline"),s.size&&l.setAttribute("height",ue(Me(s.size,a)))),l}});const js={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Ju=s=>{const a=s.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(a))throw new i("Expected a control sequence",s);return a},Gm=s=>{let a=s.gullet.popToken();return a.text==="="&&(a=s.gullet.popToken(),a.text===" "&&(a=s.gullet.popToken())),a},Qu=(s,a,l,h)=>{let b=s.gullet.macros.get(l.text);b==null&&(l.noexpand=!0,b={tokens:[l],numArgs:0,unexpandable:!s.gullet.isExpandable(l.text)}),s.gullet.macros.set(a,b,h)};et({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(s){let{parser:a,funcName:l}=s;a.consumeSpaces();const h=a.fetch();if(js[h.text])return(l==="\\global"||l==="\\\\globallong")&&(h.text=js[h.text]),Pt(a.parseFunction(),"internal");throw new i("Invalid token after macro prefix",h)}}),et({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(s){let{parser:a,funcName:l}=s,h=a.gullet.popToken();const b=h.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(b))throw new i("Expected a control sequence",h);let E=0,O;const _=[[]];for(;a.gullet.future().text!=="{";)if(h=a.gullet.popToken(),h.text==="#"){if(a.gullet.future().text==="{"){O=a.gullet.future(),_[E].push("{");break}if(h=a.gullet.popToken(),!/^[1-9]$/.test(h.text))throw new i('Invalid argument number "'+h.text+'"');if(parseInt(h.text)!==E+1)throw new i('Argument number "'+h.text+'" out of order');E++,_.push([])}else{if(h.text==="EOF")throw new i("Expected a macro definition");_[E].push(h.text)}let{tokens:V}=a.gullet.consumeArg();return O&&V.unshift(O),(l==="\\edef"||l==="\\xdef")&&(V=a.gullet.expandTokens(V),V.reverse()),a.gullet.macros.set(b,{tokens:V,numArgs:E,delimiters:_},l===js[l]),{type:"internal",mode:a.mode}}}),et({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(s){let{parser:a,funcName:l}=s;const h=Ju(a.gullet.popToken());a.gullet.consumeSpaces();const b=Gm(a);return Qu(a,h,b,l==="\\\\globallet"),{type:"internal",mode:a.mode}}}),et({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(s){let{parser:a,funcName:l}=s;const h=Ju(a.gullet.popToken()),b=a.gullet.popToken(),E=a.gullet.popToken();return Qu(a,h,E,l==="\\\\globalfuture"),a.gullet.pushToken(E),a.gullet.pushToken(b),{type:"internal",mode:a.mode}}});const ya=function(s,a,l){const h=Vt.math[s]&&Vt.math[s].replace,b=ot(h||s,a,l);if(!b)throw new Error("Unsupported symbol "+s+" and font size "+a+".");return b},Ls=function(s,a,l,h){const b=l.havingBaseStyle(a),E=me.makeSpan(h.concat(b.sizingClasses(l)),[s],l),O=b.sizeMultiplier/l.sizeMultiplier;return E.height*=O,E.depth*=O,E.maxFontSize=b.sizeMultiplier,E},ec=function(s,a,l){const h=a.havingBaseStyle(l),b=(1-a.sizeMultiplier/h.sizeMultiplier)*a.fontMetrics().axisHeight;s.classes.push("delimcenter"),s.style.top=ue(b),s.height-=b,s.depth+=b},Ym=function(s,a,l,h,b,E){const O=me.makeSymbol(s,"Main-Regular",b,h),_=Ls(O,a,h,E);return l&&ec(_,h,a),_},Zm=function(s,a,l,h){return me.makeSymbol(s,"Size"+a+"-Regular",l,h)},tc=function(s,a,l,h,b,E){const O=Zm(s,a,b,h),_=Ls(me.makeSpan(["delimsizing","size"+a],[O],h),z.TEXT,h,E);return l&&ec(_,h,z.TEXT),_},Hs=function(s,a,l){let h;return a==="Size1-Regular"?h="delim-size1":h="delim-size4",{type:"elem",elem:me.makeSpan(["delimsizinginner",h],[me.makeSpan([],[me.makeSymbol(s,a,l)])])}},qs=function(s,a,l){const h=Te["Size4-Regular"][s.charCodeAt(0)]?Te["Size4-Regular"][s.charCodeAt(0)][4]:Te["Size1-Regular"][s.charCodeAt(0)][4],b=new br("inner",Ce(s,Math.round(1e3*a))),E=new Fr([b],{width:ue(h),height:ue(a),style:"width:"+ue(h),viewBox:"0 0 "+1e3*h+" "+Math.round(1e3*a),preserveAspectRatio:"xMinYMin"}),O=me.makeSvgSpan([],[E],l);return O.height=a,O.style.height=ue(a),O.style.width=ue(h),{type:"elem",elem:O}},Ks=.008,fi={type:"kern",size:-1*Ks},Jm=["|","\\lvert","\\rvert","\\vert"],Qm=["\\|","\\lVert","\\rVert","\\Vert"],rc=function(s,a,l,h,b,E){let O,_,V,te,de="",pe=0;O=V=te=s,_=null;let Ee="Size1-Regular";s==="\\uparrow"?V=te="\u23D0":s==="\\Uparrow"?V=te="\u2016":s==="\\downarrow"?O=V="\u23D0":s==="\\Downarrow"?O=V="\u2016":s==="\\updownarrow"?(O="\\uparrow",V="\u23D0",te="\\downarrow"):s==="\\Updownarrow"?(O="\\Uparrow",V="\u2016",te="\\Downarrow"):Jm.includes(s)?(V="\u2223",de="vert",pe=333):Qm.includes(s)?(V="\u2225",de="doublevert",pe=556):s==="["||s==="\\lbrack"?(O="\u23A1",V="\u23A2",te="\u23A3",Ee="Size4-Regular",de="lbrack",pe=667):s==="]"||s==="\\rbrack"?(O="\u23A4",V="\u23A5",te="\u23A6",Ee="Size4-Regular",de="rbrack",pe=667):s==="\\lfloor"||s==="\u230A"?(V=O="\u23A2",te="\u23A3",Ee="Size4-Regular",de="lfloor",pe=667):s==="\\lceil"||s==="\u2308"?(O="\u23A1",V=te="\u23A2",Ee="Size4-Regular",de="lceil",pe=667):s==="\\rfloor"||s==="\u230B"?(V=O="\u23A5",te="\u23A6",Ee="Size4-Regular",de="rfloor",pe=667):s==="\\rceil"||s==="\u2309"?(O="\u23A4",V=te="\u23A5",Ee="Size4-Regular",de="rceil",pe=667):s==="("||s==="\\lparen"?(O="\u239B",V="\u239C",te="\u239D",Ee="Size4-Regular",de="lparen",pe=875):s===")"||s==="\\rparen"?(O="\u239E",V="\u239F",te="\u23A0",Ee="Size4-Regular",de="rparen",pe=875):s==="\\{"||s==="\\lbrace"?(O="\u23A7",_="\u23A8",te="\u23A9",V="\u23AA",Ee="Size4-Regular"):s==="\\}"||s==="\\rbrace"?(O="\u23AB",_="\u23AC",te="\u23AD",V="\u23AA",Ee="Size4-Regular"):s==="\\lgroup"||s==="\u27EE"?(O="\u23A7",te="\u23A9",V="\u23AA",Ee="Size4-Regular"):s==="\\rgroup"||s==="\u27EF"?(O="\u23AB",te="\u23AD",V="\u23AA",Ee="Size4-Regular"):s==="\\lmoustache"||s==="\u23B0"?(O="\u23A7",te="\u23AD",V="\u23AA",Ee="Size4-Regular"):(s==="\\rmoustache"||s==="\u23B1")&&(O="\u23AB",te="\u23A9",V="\u23AA",Ee="Size4-Regular");const Ye=ya(O,Ee,b),rt=Ye.height+Ye.depth,Mt=ya(V,Ee,b),Zt=Mt.height+Mt.depth,qt=ya(te,Ee,b),rr=qt.height+qt.depth;let er=0,wr=1;if(_!==null){const Or=ya(_,Ee,b);er=Or.height+Or.depth,wr=2}const Wr=rt+rr+er,Zr=Math.max(0,Math.ceil((a-Wr)/(wr*Zt))),pn=Wr+Zr*wr*Zt;let Io=h.fontMetrics().axisHeight;l&&(Io*=h.sizeMultiplier);const nr=pn/2-Io,dr=[];if(de.length>0){const Or=pn-rt-rr,Ar=Math.round(pn*1e3),mn=Se(de,Math.round(Or*1e3)),Eg=new br(de,mn),Vc=(pe/1e3).toFixed(3)+"em",Uc=(Ar/1e3).toFixed(3)+"em",Sg=new Fr([Eg],{width:Vc,height:Uc,viewBox:"0 0 "+pe+" "+Ar}),vi=me.makeSvgSpan([],[Sg],h);vi.height=Ar/1e3,vi.style.width=Vc,vi.style.height=Uc,dr.push({type:"elem",elem:vi})}else{if(dr.push(Hs(te,Ee,b)),dr.push(fi),_===null){const Or=pn-rt-rr+2*Ks;dr.push(qs(V,Or,h))}else{const Or=(pn-rt-rr-er)/2+2*Ks;dr.push(qs(V,Or,h)),dr.push(fi),dr.push(Hs(_,Ee,b)),dr.push(fi),dr.push(qs(V,Or,h))}dr.push(fi),dr.push(Hs(O,Ee,b))}const Cr=h.havingBaseStyle(z.TEXT),kr=me.makeVList({positionType:"bottom",positionData:nr,children:dr},Cr);return Ls(me.makeSpan(["delimsizing","mult"],[kr],Cr),z.TEXT,h,E)},Ws=80,Vs=.08,Us=function(s,a,l,h,b){const E=we(s,h,l),O=new br(s,E),_=new Fr([O],{width:"400em",height:ue(a),viewBox:"0 0 400000 "+l,preserveAspectRatio:"xMinYMin slice"});return me.makeSvgSpan(["hide-tail"],[_],b)},eg=function(s,a){const l=a.havingBaseSizing(),h=ic("\\surd",s*l.sizeMultiplier,ac,l);let b=l.sizeMultiplier;const E=Math.max(0,a.minRuleThickness-a.fontMetrics().sqrtRuleThickness);let O,_=0,V=0,te=0,de;return h.type==="small"?(te=1e3+1e3*E+Ws,s<1?b=1:s<1.4&&(b=.7),_=(1+E+Vs)/b,V=(1+E)/b,O=Us("sqrtMain",_,te,E,a),O.style.minWidth="0.853em",de=.833/b):h.type==="large"?(te=(1e3+Ws)*xa[h.size],V=(xa[h.size]+E)/b,_=(xa[h.size]+E+Vs)/b,O=Us("sqrtSize"+h.size,_,te,E,a),O.style.minWidth="1.02em",de=1/b):(_=s+E+Vs,V=s+E,te=Math.floor(1e3*s+E)+Ws,O=Us("sqrtTall",_,te,E,a),O.style.minWidth="0.742em",de=1.056),O.height=V,O.style.height=ue(_),{span:O,advanceWidth:de,ruleWidth:(a.fontMetrics().sqrtRuleThickness+E)*b}},nc=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","\\surd"],tg=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1"],oc=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],xa=[0,1.2,1.8,2.4,3],rg=function(s,a,l,h,b){if(s==="<"||s==="\\lt"||s==="\u27E8"?s="\\langle":(s===">"||s==="\\gt"||s==="\u27E9")&&(s="\\rangle"),nc.includes(s)||oc.includes(s))return tc(s,a,!1,l,h,b);if(tg.includes(s))return rc(s,xa[a],!1,l,h,b);throw new i("Illegal delimiter: '"+s+"'")},ng=[{type:"small",style:z.SCRIPTSCRIPT},{type:"small",style:z.SCRIPT},{type:"small",style:z.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],og=[{type:"small",style:z.SCRIPTSCRIPT},{type:"small",style:z.SCRIPT},{type:"small",style:z.TEXT},{type:"stack"}],ac=[{type:"small",style:z.SCRIPTSCRIPT},{type:"small",style:z.SCRIPT},{type:"small",style:z.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],ag=function(s){if(s.type==="small")return"Main-Regular";if(s.type==="large")return"Size"+s.size+"-Regular";if(s.type==="stack")return"Size4-Regular";throw new Error("Add support for delim type '"+s.type+"' here.")},ic=function(s,a,l,h){const b=Math.min(2,3-h.style.size);for(let E=b;E<l.length&&l[E].type!=="stack";E++){const O=ya(s,ag(l[E]),"math");let _=O.height+O.depth;if(l[E].type==="small"){const V=h.havingBaseStyle(l[E].style);_*=V.sizeMultiplier}if(_>a)return l[E]}return l[l.length-1]},sc=function(s,a,l,h,b,E){s==="<"||s==="\\lt"||s==="\u27E8"?s="\\langle":(s===">"||s==="\\gt"||s==="\u27E9")&&(s="\\rangle");let O;oc.includes(s)?O=ng:nc.includes(s)?O=ac:O=og;const _=ic(s,a,O,h);return _.type==="small"?Ym(s,_.style,l,h,b,E):_.type==="large"?tc(s,_.size,l,h,b,E):rc(s,a,l,h,b,E)};var qn={sqrtImage:eg,sizedDelim:rg,sizeToMaxHeight:xa,customSizedDelim:sc,leftRightDelim:function(s,a,l,h,b,E){const O=h.fontMetrics().axisHeight*h.sizeMultiplier,_=901,V=5/h.fontMetrics().ptPerEm,te=Math.max(a-O,l+O),de=Math.max(te/500*_,2*te-V);return sc(s,de,!0,h,b,E)}};const lc={"\\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}},ig=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","<",">","\\langle","\u27E8","\\rangle","\u27E9","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function hi(s,a){const l=ui(s);if(l&&ig.includes(l.text))return l;throw l?new i("Invalid delimiter '"+l.text+"' after '"+a.funcName+"'",s):new i("Invalid delimiter type '"+s.type+"'",s)}et({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:(s,a)=>{const l=hi(a[0],s);return{type:"delimsizing",mode:s.parser.mode,size:lc[s.funcName].size,mclass:lc[s.funcName].mclass,delim:l.text}},htmlBuilder:(s,a)=>s.delim==="."?me.makeSpan([s.mclass]):qn.sizedDelim(s.delim,s.size,a,s.mode,[s.mclass]),mathmlBuilder:s=>{const a=[];s.delim!=="."&&a.push(hn(s.delim,s.mode));const l=new Ge.MathNode("mo",a);s.mclass==="mopen"||s.mclass==="mclose"?l.setAttribute("fence","true"):l.setAttribute("fence","false"),l.setAttribute("stretchy","true");const h=ue(qn.sizeToMaxHeight[s.size]);return l.setAttribute("minsize",h),l.setAttribute("maxsize",h),l}});function uc(s){if(!s.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}et({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(s,a)=>{const l=s.parser.gullet.macros.get("\\current@color");if(l&&typeof l!="string")throw new i("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:s.parser.mode,delim:hi(a[0],s).text,color:l}}}),et({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(s,a)=>{const l=hi(a[0],s),h=s.parser;++h.leftrightDepth;const b=h.parseExpression(!1);--h.leftrightDepth,h.expect("\\right",!1);const E=Pt(h.parseFunction(),"leftright-right");return{type:"leftright",mode:h.mode,body:b,left:l.text,right:E.delim,rightColor:E.color}},htmlBuilder:(s,a)=>{uc(s);const l=_r(s.body,a,!0,["mopen","mclose"]);let h=0,b=0,E=!1;for(let V=0;V<l.length;V++)l[V].isMiddle?E=!0:(h=Math.max(l[V].height,h),b=Math.max(l[V].depth,b));h*=a.sizeMultiplier,b*=a.sizeMultiplier;let O;if(s.left==="."?O=ba(a,["mopen"]):O=qn.leftRightDelim(s.left,h,b,a,s.mode,["mopen"]),l.unshift(O),E)for(let V=1;V<l.length;V++){const te=l[V].isMiddle;te&&(l[V]=qn.leftRightDelim(te.delim,h,b,te.options,s.mode,[]))}let _;if(s.right===".")_=ba(a,["mclose"]);else{const V=s.rightColor?a.withColor(s.rightColor):a;_=qn.leftRightDelim(s.right,h,b,V,s.mode,["mclose"])}return l.push(_),me.makeSpan(["minner"],l,a)},mathmlBuilder:(s,a)=>{uc(s);const l=nn(s.body,a);if(s.left!=="."){const h=new Ge.MathNode("mo",[hn(s.left,s.mode)]);h.setAttribute("fence","true"),l.unshift(h)}if(s.right!=="."){const h=new Ge.MathNode("mo",[hn(s.right,s.mode)]);h.setAttribute("fence","true"),s.rightColor&&h.setAttribute("mathcolor",s.rightColor),l.push(h)}return Rs(l)}}),et({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(s,a)=>{const l=hi(a[0],s);if(!s.parser.leftrightDepth)throw new i("\\middle without preceding \\left",l);return{type:"middle",mode:s.parser.mode,delim:l.text}},htmlBuilder:(s,a)=>{let l;if(s.delim===".")l=ba(a,[]);else{l=qn.sizedDelim(s.delim,1,a,s.mode,[]);const h={delim:s.delim,options:a};l.isMiddle=h}return l},mathmlBuilder:(s,a)=>{const l=s.delim==="\\vert"||s.delim==="|"?hn("|","text"):hn(s.delim,s.mode),h=new Ge.MathNode("mo",[l]);return h.setAttribute("fence","true"),h.setAttribute("lspace","0.05em"),h.setAttribute("rspace","0.05em"),h}});const Xs=(s,a)=>{const l=me.wrapFragment(Qt(s.body,a),a),h=s.label.slice(1);let b=a.sizeMultiplier,E,O=0;const _=C.isCharacterBox(s.body);if(h==="sout")E=me.makeSpan(["stretchy","sout"]),E.height=a.fontMetrics().defaultRuleThickness/b,O=-.5*a.fontMetrics().xHeight;else if(h==="phase"){const te=Me({number:.6,unit:"pt"},a),de=Me({number:.35,unit:"ex"},a),pe=a.havingBaseSizing();b=b/pe.sizeMultiplier;const Ee=l.height+l.depth+te+de;l.style.paddingLeft=ue(Ee/2+te);const Ye=Math.floor(1e3*Ee*b),rt=oe(Ye),Mt=new Fr([new br("phase",rt)],{width:"400em",height:ue(Ye/1e3),viewBox:"0 0 400000 "+Ye,preserveAspectRatio:"xMinYMin slice"});E=me.makeSvgSpan(["hide-tail"],[Mt],a),E.style.height=ue(Ee),O=l.depth+te+de}else{/cancel/.test(h)?_||l.classes.push("cancel-pad"):h==="angl"?l.classes.push("anglpad"):l.classes.push("boxpad");let te=0,de=0,pe=0;/box/.test(h)?(pe=Math.max(a.fontMetrics().fboxrule,a.minRuleThickness),te=a.fontMetrics().fboxsep+(h==="colorbox"?0:pe),de=te):h==="angl"?(pe=Math.max(a.fontMetrics().defaultRuleThickness,a.minRuleThickness),te=4*pe,de=Math.max(0,.25-l.depth)):(te=_?.2:0,de=te),E=Hn.encloseSpan(l,h,te,de,a),/fbox|boxed|fcolorbox/.test(h)?(E.style.borderStyle="solid",E.style.borderWidth=ue(pe)):h==="angl"&&pe!==.049&&(E.style.borderTopWidth=ue(pe),E.style.borderRightWidth=ue(pe)),O=l.depth+de,s.backgroundColor&&(E.style.backgroundColor=s.backgroundColor,s.borderColor&&(E.style.borderColor=s.borderColor))}let V;if(s.backgroundColor)V=me.makeVList({positionType:"individualShift",children:[{type:"elem",elem:E,shift:O},{type:"elem",elem:l,shift:0}]},a);else{const te=/cancel|phase/.test(h)?["svg-align"]:[];V=me.makeVList({positionType:"individualShift",children:[{type:"elem",elem:l,shift:0},{type:"elem",elem:E,shift:O,wrapperClasses:te}]},a)}return/cancel/.test(h)&&(V.height=l.height,V.depth=l.depth),/cancel/.test(h)&&!_?me.makeSpan(["mord","cancel-lap"],[V],a):me.makeSpan(["mord"],[V],a)},Gs=(s,a)=>{let l=0;const h=new Ge.MathNode(s.label.indexOf("colorbox")>-1?"mpadded":"menclose",[hr(s.body,a)]);switch(s.label){case"\\cancel":h.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":h.setAttribute("notation","downdiagonalstrike");break;case"\\phase":h.setAttribute("notation","phasorangle");break;case"\\sout":h.setAttribute("notation","horizontalstrike");break;case"\\fbox":h.setAttribute("notation","box");break;case"\\angl":h.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(l=a.fontMetrics().fboxsep*a.fontMetrics().ptPerEm,h.setAttribute("width","+"+2*l+"pt"),h.setAttribute("height","+"+2*l+"pt"),h.setAttribute("lspace",l+"pt"),h.setAttribute("voffset",l+"pt"),s.label==="\\fcolorbox"){const b=Math.max(a.fontMetrics().fboxrule,a.minRuleThickness);h.setAttribute("style","border: "+b+"em solid "+String(s.borderColor))}break;case"\\xcancel":h.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return s.backgroundColor&&h.setAttribute("mathbackground",s.backgroundColor),h};et({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(s,a,l){let{parser:h,funcName:b}=s;const E=Pt(a[0],"color-token").color,O=a[1];return{type:"enclose",mode:h.mode,label:b,backgroundColor:E,body:O}},htmlBuilder:Xs,mathmlBuilder:Gs}),et({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(s,a,l){let{parser:h,funcName:b}=s;const E=Pt(a[0],"color-token").color,O=Pt(a[1],"color-token").color,_=a[2];return{type:"enclose",mode:h.mode,label:b,backgroundColor:O,borderColor:E,body:_}},htmlBuilder:Xs,mathmlBuilder:Gs}),et({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(s,a){let{parser:l}=s;return{type:"enclose",mode:l.mode,label:"\\fbox",body:a[0]}}}),et({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(s,a){let{parser:l,funcName:h}=s;const b=a[0];return{type:"enclose",mode:l.mode,label:h,body:b}},htmlBuilder:Xs,mathmlBuilder:Gs}),et({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(s,a){let{parser:l}=s;return{type:"enclose",mode:l.mode,label:"\\angl",body:a[0]}}});const cc={};function Nn(s){let{type:a,names:l,props:h,handler:b,htmlBuilder:E,mathmlBuilder:O}=s;const _={type:a,numArgs:h.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:b};for(let V=0;V<l.length;++V)cc[l[V]]=_;E&&(Tr[a]=E),O&&(wn[a]=O)}const dc={};function L(s,a){dc[s]=a}class on{constructor(a,l,h){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=a,this.start=l,this.end=h}static range(a,l){return l?!a||!a.loc||!l.loc||a.loc.lexer!==l.loc.lexer?null:new on(a.loc.lexer,a.loc.start,l.loc.end):a&&a.loc}}class cn{constructor(a,l){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=a,this.loc=l}range(a,l){return new cn(l,on.range(this,a))}}function fc(s){const a=[];s.consumeSpaces();let l=s.fetch().text;for(l==="\\relax"&&(s.consume(),s.consumeSpaces(),l=s.fetch().text);l==="\\hline"||l==="\\hdashline";)s.consume(),a.push(l==="\\hdashline"),s.consumeSpaces(),l=s.fetch().text;return a}const pi=s=>{if(!s.parser.settings.displayMode)throw new i("{"+s.envName+"} can be used only in display mode.")};function Ys(s){if(s.indexOf("ed")===-1)return s.indexOf("*")===-1}function eo(s,a,l){let{hskipBeforeAndAfter:h,addJot:b,cols:E,arraystretch:O,colSeparationType:_,autoTag:V,singleRow:te,emptySingleRow:de,maxNumCols:pe,leqno:Ee}=a;if(s.gullet.beginGroup(),te||s.gullet.macros.set("\\cr","\\\\\\relax"),!O){const wr=s.gullet.expandMacroAsText("\\arraystretch");if(wr==null)O=1;else if(O=parseFloat(wr),!O||O<0)throw new i("Invalid \\arraystretch: "+wr)}s.gullet.beginGroup();let Ye=[];const rt=[Ye],Mt=[],Zt=[],qt=V!=null?[]:void 0;function rr(){V&&s.gullet.macros.set("\\@eqnsw","1",!0)}function er(){qt&&(s.gullet.macros.get("\\df@tag")?(qt.push(s.subparse([new cn("\\df@tag")])),s.gullet.macros.set("\\df@tag",void 0,!0)):qt.push(!!V&&s.gullet.macros.get("\\@eqnsw")==="1"))}for(rr(),Zt.push(fc(s));;){let wr=s.parseExpression(!1,te?"\\end":"\\\\");s.gullet.endGroup(),s.gullet.beginGroup(),wr={type:"ordgroup",mode:s.mode,body:wr},l&&(wr={type:"styling",mode:s.mode,style:l,body:[wr]}),Ye.push(wr);const Wr=s.fetch().text;if(Wr==="&"){if(pe&&Ye.length===pe){if(te||_)throw new i("Too many tab characters: &",s.nextToken);s.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}s.consume()}else if(Wr==="\\end"){er(),Ye.length===1&&wr.type==="styling"&&wr.body[0].body.length===0&&(rt.length>1||!de)&&rt.pop(),Zt.length<rt.length+1&&Zt.push([]);break}else if(Wr==="\\\\"){s.consume();let Zr;s.gullet.future().text!==" "&&(Zr=s.parseSizeGroup(!0)),Mt.push(Zr?Zr.value:null),er(),Zt.push(fc(s)),Ye=[],rt.push(Ye),rr()}else throw new i("Expected & or \\\\ or \\cr or \\end",s.nextToken)}return s.gullet.endGroup(),s.gullet.endGroup(),{type:"array",mode:s.mode,addJot:b,arraystretch:O,body:rt,cols:E,rowGaps:Mt,hskipBeforeAndAfter:h,hLinesBeforeRow:Zt,colSeparationType:_,tags:qt,leqno:Ee}}function Zs(s){return s.slice(0,1)==="d"?"display":"text"}const Tn=function(s,a){let l,h;const b=s.body.length,E=s.hLinesBeforeRow;let O=0,_=new Array(b);const V=[],te=Math.max(a.fontMetrics().arrayRuleWidth,a.minRuleThickness),de=1/a.fontMetrics().ptPerEm;let pe=5*de;s.colSeparationType&&s.colSeparationType==="small"&&(pe=.2778*(a.havingStyle(z.SCRIPT).sizeMultiplier/a.sizeMultiplier));const Ee=s.colSeparationType==="CD"?Me({number:3,unit:"ex"},a):12*de,Ye=3*de,rt=s.arraystretch*Ee,Mt=.7*rt,Zt=.3*rt;let qt=0;function rr(nr){for(let dr=0;dr<nr.length;++dr)dr>0&&(qt+=.25),V.push({pos:qt,isDashed:nr[dr]})}for(rr(E[0]),l=0;l<s.body.length;++l){const nr=s.body[l];let dr=Mt,Cr=Zt;O<nr.length&&(O=nr.length);const kr=new Array(nr.length);for(h=0;h<nr.length;++h){const mn=Qt(nr[h],a);Cr<mn.depth&&(Cr=mn.depth),dr<mn.height&&(dr=mn.height),kr[h]=mn}const Or=s.rowGaps[l];let Ar=0;Or&&(Ar=Me(Or,a),Ar>0&&(Ar+=Zt,Cr<Ar&&(Cr=Ar),Ar=0)),s.addJot&&(Cr+=Ye),kr.height=dr,kr.depth=Cr,qt+=dr,kr.pos=qt,qt+=Cr+Ar,_[l]=kr,rr(E[l+1])}const er=qt/2+a.fontMetrics().axisHeight,wr=s.cols||[],Wr=[];let Zr,pn;const Io=[];if(s.tags&&s.tags.some(nr=>nr))for(l=0;l<b;++l){const nr=_[l],dr=nr.pos-er,Cr=s.tags[l];let kr;Cr===!0?kr=me.makeSpan(["eqn-num"],[],a):Cr===!1?kr=me.makeSpan([],[],a):kr=me.makeSpan([],_r(Cr,a,!0),a),kr.depth=nr.depth,kr.height=nr.height,Io.push({type:"elem",elem:kr,shift:dr})}for(h=0,pn=0;h<O||pn<wr.length;++h,++pn){let nr=wr[pn]||{},dr=!0;for(;nr.type==="separator";){if(dr||(Zr=me.makeSpan(["arraycolsep"],[]),Zr.style.width=ue(a.fontMetrics().doubleRuleSep),Wr.push(Zr)),nr.separator==="|"||nr.separator===":"){const Or=nr.separator==="|"?"solid":"dashed",Ar=me.makeSpan(["vertical-separator"],[],a);Ar.style.height=ue(qt),Ar.style.borderRightWidth=ue(te),Ar.style.borderRightStyle=Or,Ar.style.margin="0 "+ue(-te/2);const mn=qt-er;mn&&(Ar.style.verticalAlign=ue(-mn)),Wr.push(Ar)}else throw new i("Invalid separator type: "+nr.separator);pn++,nr=wr[pn]||{},dr=!1}if(h>=O)continue;let Cr;(h>0||s.hskipBeforeAndAfter)&&(Cr=C.deflt(nr.pregap,pe),Cr!==0&&(Zr=me.makeSpan(["arraycolsep"],[]),Zr.style.width=ue(Cr),Wr.push(Zr)));let kr=[];for(l=0;l<b;++l){const Or=_[l],Ar=Or[h];if(!Ar)continue;const mn=Or.pos-er;Ar.depth=Or.depth,Ar.height=Or.height,kr.push({type:"elem",elem:Ar,shift:mn})}kr=me.makeVList({positionType:"individualShift",children:kr},a),kr=me.makeSpan(["col-align-"+(nr.align||"c")],[kr]),Wr.push(kr),(h<O-1||s.hskipBeforeAndAfter)&&(Cr=C.deflt(nr.postgap,pe),Cr!==0&&(Zr=me.makeSpan(["arraycolsep"],[]),Zr.style.width=ue(Cr),Wr.push(Zr)))}if(_=me.makeSpan(["mtable"],Wr),V.length>0){const nr=me.makeLineSpan("hline",a,te),dr=me.makeLineSpan("hdashline",a,te),Cr=[{type:"elem",elem:_,shift:0}];for(;V.length>0;){const kr=V.pop(),Or=kr.pos-er;kr.isDashed?Cr.push({type:"elem",elem:dr,shift:Or}):Cr.push({type:"elem",elem:nr,shift:Or})}_=me.makeVList({positionType:"individualShift",children:Cr},a)}if(Io.length===0)return me.makeSpan(["mord"],[_],a);{let nr=me.makeVList({positionType:"individualShift",children:Io},a);return nr=me.makeSpan(["tag"],[nr],a),me.makeFragment([_,nr])}},sg={c:"center ",l:"left ",r:"right "},On=function(s,a){const l=[],h=new Ge.MathNode("mtd",[],["mtr-glue"]),b=new Ge.MathNode("mtd",[],["mml-eqn-num"]);for(let pe=0;pe<s.body.length;pe++){const Ee=s.body[pe],Ye=[];for(let rt=0;rt<Ee.length;rt++)Ye.push(new Ge.MathNode("mtd",[hr(Ee[rt],a)]));s.tags&&s.tags[pe]&&(Ye.unshift(h),Ye.push(h),s.leqno?Ye.unshift(b):Ye.push(b)),l.push(new Ge.MathNode("mtr",Ye))}let E=new Ge.MathNode("mtable",l);const O=s.arraystretch===.5?.1:.16+s.arraystretch-1+(s.addJot?.09:0);E.setAttribute("rowspacing",ue(O));let _="",V="";if(s.cols&&s.cols.length>0){const pe=s.cols;let Ee="",Ye=!1,rt=0,Mt=pe.length;pe[0].type==="separator"&&(_+="top ",rt=1),pe[pe.length-1].type==="separator"&&(_+="bottom ",Mt-=1);for(let Zt=rt;Zt<Mt;Zt++)pe[Zt].type==="align"?(V+=sg[pe[Zt].align],Ye&&(Ee+="none "),Ye=!0):pe[Zt].type==="separator"&&Ye&&(Ee+=pe[Zt].separator==="|"?"solid ":"dashed ",Ye=!1);E.setAttribute("columnalign",V.trim()),/[sd]/.test(Ee)&&E.setAttribute("columnlines",Ee.trim())}if(s.colSeparationType==="align"){const pe=s.cols||[];let Ee="";for(let Ye=1;Ye<pe.length;Ye++)Ee+=Ye%2?"0em ":"1em ";E.setAttribute("columnspacing",Ee.trim())}else s.colSeparationType==="alignat"||s.colSeparationType==="gather"?E.setAttribute("columnspacing","0em"):s.colSeparationType==="small"?E.setAttribute("columnspacing","0.2778em"):s.colSeparationType==="CD"?E.setAttribute("columnspacing","0.5em"):E.setAttribute("columnspacing","1em");let te="";const de=s.hLinesBeforeRow;_+=de[0].length>0?"left ":"",_+=de[de.length-1].length>0?"right ":"";for(let pe=1;pe<de.length-1;pe++)te+=de[pe].length===0?"none ":de[pe][0]?"dashed ":"solid ";return/[sd]/.test(te)&&E.setAttribute("rowlines",te.trim()),_!==""&&(E=new Ge.MathNode("menclose",[E]),E.setAttribute("notation",_.trim())),s.arraystretch&&s.arraystretch<1&&(E=new Ge.MathNode("mstyle",[E]),E.setAttribute("scriptlevel","1")),E},hc=function(s,a){s.envName.indexOf("ed")===-1&&pi(s);const l=[],h=s.envName.indexOf("at")>-1?"alignat":"align",b=s.envName==="split",E=eo(s.parser,{cols:l,addJot:!0,autoTag:b?void 0:Ys(s.envName),emptySingleRow:!0,colSeparationType:h,maxNumCols:b?2:void 0,leqno:s.parser.settings.leqno},"display");let O,_=0;const V={type:"ordgroup",mode:s.mode,body:[]};if(a[0]&&a[0].type==="ordgroup"){let de="";for(let pe=0;pe<a[0].body.length;pe++){const Ee=Pt(a[0].body[pe],"textord");de+=Ee.text}O=Number(de),_=O*2}const te=!_;E.body.forEach(function(de){for(let pe=1;pe<de.length;pe+=2){const Ee=Pt(de[pe],"styling");Pt(Ee.body[0],"ordgroup").body.unshift(V)}if(te)_<de.length&&(_=de.length);else{const pe=de.length/2;if(O<pe)throw new i("Too many math in a row: "+("expected "+O+", but got "+pe),de[0])}});for(let de=0;de<_;++de){let pe="r",Ee=0;de%2===1?pe="l":de>0&&te&&(Ee=1),l[de]={type:"align",align:pe,pregap:Ee,postgap:0}}return E.colSeparationType=te?"align":"alignat",E};Nn({type:"array",names:["array","darray"],props:{numArgs:1},handler(s,a){const l=(ui(a[0])?[a[0]]:Pt(a[0],"ordgroup").body).map(function(b){const E=_s(b).text;if("lcr".indexOf(E)!==-1)return{type:"align",align:E};if(E==="|")return{type:"separator",separator:"|"};if(E===":")return{type:"separator",separator:":"};throw new i("Unknown column alignment: "+E,b)}),h={cols:l,hskipBeforeAndAfter:!0,maxNumCols:l.length};return eo(s.parser,h,Zs(s.envName))},htmlBuilder:Tn,mathmlBuilder:On}),Nn({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(s){const a={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[s.envName.replace("*","")];let l="c";const h={hskipBeforeAndAfter:!1,cols:[{type:"align",align:l}]};if(s.envName.charAt(s.envName.length-1)==="*"){const O=s.parser;if(O.consumeSpaces(),O.fetch().text==="["){if(O.consume(),O.consumeSpaces(),l=O.fetch().text,"lcr".indexOf(l)===-1)throw new i("Expected l or c or r",O.nextToken);O.consume(),O.consumeSpaces(),O.expect("]"),O.consume(),h.cols=[{type:"align",align:l}]}}const b=eo(s.parser,h,Zs(s.envName)),E=Math.max(0,...b.body.map(O=>O.length));return b.cols=new Array(E).fill({type:"align",align:l}),a?{type:"leftright",mode:s.mode,body:[b],left:a[0],right:a[1],rightColor:void 0}:b},htmlBuilder:Tn,mathmlBuilder:On}),Nn({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(s){const a={arraystretch:.5},l=eo(s.parser,a,"script");return l.colSeparationType="small",l},htmlBuilder:Tn,mathmlBuilder:On}),Nn({type:"array",names:["subarray"],props:{numArgs:1},handler(s,a){const l=(ui(a[0])?[a[0]]:Pt(a[0],"ordgroup").body).map(function(b){const E=_s(b).text;if("lc".indexOf(E)!==-1)return{type:"align",align:E};throw new i("Unknown column alignment: "+E,b)});if(l.length>1)throw new i("{subarray} can contain only one column");let h={cols:l,hskipBeforeAndAfter:!1,arraystretch:.5};if(h=eo(s.parser,h,"script"),h.body.length>0&&h.body[0].length>1)throw new i("{subarray} can contain only one column");return h},htmlBuilder:Tn,mathmlBuilder:On}),Nn({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(s){const a={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},l=eo(s.parser,a,Zs(s.envName));return{type:"leftright",mode:s.mode,body:[l],left:s.envName.indexOf("r")>-1?".":"\\{",right:s.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:Tn,mathmlBuilder:On}),Nn({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:hc,htmlBuilder:Tn,mathmlBuilder:On}),Nn({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(s){["gather","gather*"].includes(s.envName)&&pi(s);const a={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Ys(s.envName),emptySingleRow:!0,leqno:s.parser.settings.leqno};return eo(s.parser,a,"display")},htmlBuilder:Tn,mathmlBuilder:On}),Nn({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:hc,htmlBuilder:Tn,mathmlBuilder:On}),Nn({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(s){pi(s);const a={autoTag:Ys(s.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:s.parser.settings.leqno};return eo(s.parser,a,"display")},htmlBuilder:Tn,mathmlBuilder:On}),Nn({type:"array",names:["CD"],props:{numArgs:0},handler(s){return pi(s),Xm(s.parser)},htmlBuilder:Tn,mathmlBuilder:On}),L("\\nonumber","\\gdef\\@eqnsw{0}"),L("\\notag","\\nonumber"),et({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(s,a){throw new i(s.funcName+" valid only within array environment")}});var pc=cc;et({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(s,a){let{parser:l,funcName:h}=s;const b=a[0];if(b.type!=="ordgroup")throw new i("Invalid environment name",b);let E="";for(let O=0;O<b.body.length;++O)E+=Pt(b.body[O],"textord").text;if(h==="\\begin"){if(!pc.hasOwnProperty(E))throw new i("No such environment: "+E,b);const O=pc[E],{args:_,optArgs:V}=l.parseArguments("\\begin{"+E+"}",O),te={mode:l.mode,envName:E,parser:l},de=O.handler(te,_,V);l.expect("\\end",!1);const pe=l.nextToken,Ee=Pt(l.parseFunction(),"environment");if(Ee.name!==E)throw new i("Mismatch: \\begin{"+E+"} matched by \\end{"+Ee.name+"}",pe);return de}return{type:"environment",mode:l.mode,name:E,nameGroup:b}}});const mc=(s,a)=>{const l=s.font,h=a.withFont(l);return Qt(s.body,h)},gc=(s,a)=>{const l=s.font,h=a.withFont(l);return hr(s.body,h)},vc={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};et({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(s,a)=>{let{parser:l,funcName:h}=s;const b=Bn(a[0]);let E=h;return E in vc&&(E=vc[E]),{type:"font",mode:l.mode,font:E.slice(1),body:b}},htmlBuilder:mc,mathmlBuilder:gc}),et({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(s,a)=>{let{parser:l}=s;const h=a[0],b=C.isCharacterBox(h);return{type:"mclass",mode:l.mode,mclass:di(h),body:[{type:"font",mode:l.mode,font:"boldsymbol",body:h}],isCharacterBox:b}}}),et({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(s,a)=>{let{parser:l,funcName:h,breakOnTokenText:b}=s;const{mode:E}=l,O=l.parseExpression(!0,b),_="math"+h.slice(1);return{type:"font",mode:E,font:_,body:{type:"ordgroup",mode:l.mode,body:O}}},htmlBuilder:mc,mathmlBuilder:gc});const bc=(s,a)=>{let l=a;return s==="display"?l=l.id>=z.SCRIPT.id?l.text():z.DISPLAY:s==="text"&&l.size===z.DISPLAY.size?l=z.TEXT:s==="script"?l=z.SCRIPT:s==="scriptscript"&&(l=z.SCRIPTSCRIPT),l},Js=(s,a)=>{const l=bc(s.size,a.style),h=l.fracNum(),b=l.fracDen();let E;E=a.havingStyle(h);const O=Qt(s.numer,E,a);if(s.continued){const rr=8.5/a.fontMetrics().ptPerEm,er=3.5/a.fontMetrics().ptPerEm;O.height=O.height<rr?rr:O.height,O.depth=O.depth<er?er:O.depth}E=a.havingStyle(b);const _=Qt(s.denom,E,a);let V,te,de;s.hasBarLine?(s.barSize?(te=Me(s.barSize,a),V=me.makeLineSpan("frac-line",a,te)):V=me.makeLineSpan("frac-line",a),te=V.height,de=V.height):(V=null,te=0,de=a.fontMetrics().defaultRuleThickness);let pe,Ee,Ye;l.size===z.DISPLAY.size||s.size==="display"?(pe=a.fontMetrics().num1,te>0?Ee=3*de:Ee=7*de,Ye=a.fontMetrics().denom1):(te>0?(pe=a.fontMetrics().num2,Ee=de):(pe=a.fontMetrics().num3,Ee=3*de),Ye=a.fontMetrics().denom2);let rt;if(V){const rr=a.fontMetrics().axisHeight;pe-O.depth-(rr+.5*te)<Ee&&(pe+=Ee-(pe-O.depth-(rr+.5*te))),rr-.5*te-(_.height-Ye)<Ee&&(Ye+=Ee-(rr-.5*te-(_.height-Ye)));const er=-(rr-.5*te);rt=me.makeVList({positionType:"individualShift",children:[{type:"elem",elem:_,shift:Ye},{type:"elem",elem:V,shift:er},{type:"elem",elem:O,shift:-pe}]},a)}else{const rr=pe-O.depth-(_.height-Ye);rr<Ee&&(pe+=.5*(Ee-rr),Ye+=.5*(Ee-rr)),rt=me.makeVList({positionType:"individualShift",children:[{type:"elem",elem:_,shift:Ye},{type:"elem",elem:O,shift:-pe}]},a)}E=a.havingStyle(l),rt.height*=E.sizeMultiplier/a.sizeMultiplier,rt.depth*=E.sizeMultiplier/a.sizeMultiplier;let Mt;l.size===z.DISPLAY.size?Mt=a.fontMetrics().delim1:l.size===z.SCRIPTSCRIPT.size?Mt=a.havingStyle(z.SCRIPT).fontMetrics().delim2:Mt=a.fontMetrics().delim2;let Zt,qt;return s.leftDelim==null?Zt=ba(a,["mopen"]):Zt=qn.customSizedDelim(s.leftDelim,Mt,!0,a.havingStyle(l),s.mode,["mopen"]),s.continued?qt=me.makeSpan([]):s.rightDelim==null?qt=ba(a,["mclose"]):qt=qn.customSizedDelim(s.rightDelim,Mt,!0,a.havingStyle(l),s.mode,["mclose"]),me.makeSpan(["mord"].concat(E.sizingClasses(a)),[Zt,me.makeSpan(["mfrac"],[rt]),qt],a)},Qs=(s,a)=>{let l=new Ge.MathNode("mfrac",[hr(s.numer,a),hr(s.denom,a)]);if(!s.hasBarLine)l.setAttribute("linethickness","0px");else if(s.barSize){const b=Me(s.barSize,a);l.setAttribute("linethickness",ue(b))}const h=bc(s.size,a.style);if(h.size!==a.style.size){l=new Ge.MathNode("mstyle",[l]);const b=h.size===z.DISPLAY.size?"true":"false";l.setAttribute("displaystyle",b),l.setAttribute("scriptlevel","0")}if(s.leftDelim!=null||s.rightDelim!=null){const b=[];if(s.leftDelim!=null){const E=new Ge.MathNode("mo",[new Ge.TextNode(s.leftDelim.replace("\\",""))]);E.setAttribute("fence","true"),b.push(E)}if(b.push(l),s.rightDelim!=null){const E=new Ge.MathNode("mo",[new Ge.TextNode(s.rightDelim.replace("\\",""))]);E.setAttribute("fence","true"),b.push(E)}return Rs(b)}return l};et({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(s,a)=>{let{parser:l,funcName:h}=s;const b=a[0],E=a[1];let O,_=null,V=null,te="auto";switch(h){case"\\dfrac":case"\\frac":case"\\tfrac":O=!0;break;case"\\\\atopfrac":O=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":O=!1,_="(",V=")";break;case"\\\\bracefrac":O=!1,_="\\{",V="\\}";break;case"\\\\brackfrac":O=!1,_="[",V="]";break;default:throw new Error("Unrecognized genfrac command")}switch(h){case"\\dfrac":case"\\dbinom":te="display";break;case"\\tfrac":case"\\tbinom":te="text";break}return{type:"genfrac",mode:l.mode,continued:!1,numer:b,denom:E,hasBarLine:O,leftDelim:_,rightDelim:V,size:te,barSize:null}},htmlBuilder:Js,mathmlBuilder:Qs}),et({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(s,a)=>{let{parser:l,funcName:h}=s;const b=a[0],E=a[1];return{type:"genfrac",mode:l.mode,continued:!0,numer:b,denom:E,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}}),et({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(s){let{parser:a,funcName:l,token:h}=s,b;switch(l){case"\\over":b="\\frac";break;case"\\choose":b="\\binom";break;case"\\atop":b="\\\\atopfrac";break;case"\\brace":b="\\\\bracefrac";break;case"\\brack":b="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:a.mode,replaceWith:b,token:h}}});const yc=["display","text","script","scriptscript"],xc=function(s){let a=null;return s.length>0&&(a=s,a=a==="."?null:a),a};et({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(s,a){let{parser:l}=s;const h=a[4],b=a[5],E=Bn(a[0]),O=E.type==="atom"&&E.family==="open"?xc(E.text):null,_=Bn(a[1]),V=_.type==="atom"&&_.family==="close"?xc(_.text):null,te=Pt(a[2],"size");let de,pe=null;te.isBlank?de=!0:(pe=te.value,de=pe.number>0);let Ee="auto",Ye=a[3];if(Ye.type==="ordgroup"){if(Ye.body.length>0){const rt=Pt(Ye.body[0],"textord");Ee=yc[Number(rt.text)]}}else Ye=Pt(Ye,"textord"),Ee=yc[Number(Ye.text)];return{type:"genfrac",mode:l.mode,numer:h,denom:b,continued:!1,hasBarLine:de,barSize:pe,leftDelim:O,rightDelim:V,size:Ee}},htmlBuilder:Js,mathmlBuilder:Qs}),et({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(s,a){let{parser:l,funcName:h,token:b}=s;return{type:"infix",mode:l.mode,replaceWith:"\\\\abovefrac",size:Pt(a[0],"size").value,token:b}}}),et({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(s,a)=>{let{parser:l,funcName:h}=s;const b=a[0],E=w(Pt(a[1],"infix").size),O=a[2],_=E.number>0;return{type:"genfrac",mode:l.mode,numer:b,denom:O,continued:!1,hasBarLine:_,barSize:E,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:Js,mathmlBuilder:Qs});const wc=(s,a)=>{const l=a.style;let h,b;s.type==="supsub"?(h=s.sup?Qt(s.sup,a.havingStyle(l.sup()),a):Qt(s.sub,a.havingStyle(l.sub()),a),b=Pt(s.base,"horizBrace")):b=Pt(s,"horizBrace");const E=Qt(b.base,a.havingBaseStyle(z.DISPLAY)),O=Hn.svgSpan(b,a);let _;if(b.isOver?(_=me.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:E},{type:"kern",size:.1},{type:"elem",elem:O}]},a),_.children[0].children[0].children[1].classes.push("svg-align")):(_=me.makeVList({positionType:"bottom",positionData:E.depth+.1+O.height,children:[{type:"elem",elem:O},{type:"kern",size:.1},{type:"elem",elem:E}]},a),_.children[0].children[0].children[0].classes.push("svg-align")),h){const V=me.makeSpan(["mord",b.isOver?"mover":"munder"],[_],a);b.isOver?_=me.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:V},{type:"kern",size:.2},{type:"elem",elem:h}]},a):_=me.makeVList({positionType:"bottom",positionData:V.depth+.2+h.height+h.depth,children:[{type:"elem",elem:h},{type:"kern",size:.2},{type:"elem",elem:V}]},a)}return me.makeSpan(["mord",b.isOver?"mover":"munder"],[_],a)};et({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(s,a){let{parser:l,funcName:h}=s;return{type:"horizBrace",mode:l.mode,label:h,isOver:/^\\over/.test(h),base:a[0]}},htmlBuilder:wc,mathmlBuilder:(s,a)=>{const l=Hn.mathMLnode(s.label);return new Ge.MathNode(s.isOver?"mover":"munder",[hr(s.base,a),l])}}),et({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(s,a)=>{let{parser:l}=s;const h=a[1],b=Pt(a[0],"url").url;return l.settings.isTrusted({command:"\\href",url:b})?{type:"href",mode:l.mode,href:b,body:xr(h)}:l.formatUnsupportedCmd("\\href")},htmlBuilder:(s,a)=>{const l=_r(s.body,a,!1);return me.makeAnchor(s.href,[],l,a)},mathmlBuilder:(s,a)=>{let l=Qn(s.body,a);return l instanceof un||(l=new un("mrow",[l])),l.setAttribute("href",s.href),l}}),et({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(s,a)=>{let{parser:l}=s;const h=Pt(a[0],"url").url;if(!l.settings.isTrusted({command:"\\url",url:h}))return l.formatUnsupportedCmd("\\url");const b=[];for(let O=0;O<h.length;O++){let _=h[O];_==="~"&&(_="\\textasciitilde"),b.push({type:"textord",mode:"text",text:_})}const E={type:"text",mode:l.mode,font:"\\texttt",body:b};return{type:"href",mode:l.mode,href:h,body:xr(E)}}}),et({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(s,a){let{parser:l}=s;return{type:"hbox",mode:l.mode,body:xr(a[0])}},htmlBuilder(s,a){const l=_r(s.body,a,!1);return me.makeFragment(l)},mathmlBuilder(s,a){return new Ge.MathNode("mrow",nn(s.body,a))}}),et({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(s,a)=>{let{parser:l,funcName:h,token:b}=s;const E=Pt(a[0],"raw").string,O=a[1];l.settings.strict&&l.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");let _;const V={};switch(h){case"\\htmlClass":V.class=E,_={command:"\\htmlClass",class:E};break;case"\\htmlId":V.id=E,_={command:"\\htmlId",id:E};break;case"\\htmlStyle":V.style=E,_={command:"\\htmlStyle",style:E};break;case"\\htmlData":{const te=E.split(",");for(let de=0;de<te.length;de++){const pe=te[de].split("=");if(pe.length!==2)throw new i("Error parsing key-value for \\htmlData");V["data-"+pe[0].trim()]=pe[1].trim()}_={command:"\\htmlData",attributes:V};break}default:throw new Error("Unrecognized html command")}return l.settings.isTrusted(_)?{type:"html",mode:l.mode,attributes:V,body:xr(O)}:l.formatUnsupportedCmd(h)},htmlBuilder:(s,a)=>{const l=_r(s.body,a,!1),h=["enclosing"];s.attributes.class&&h.push(...s.attributes.class.trim().split(/\s+/));const b=me.makeSpan(h,l,a);for(const E in s.attributes)E!=="class"&&s.attributes.hasOwnProperty(E)&&b.setAttribute(E,s.attributes[E]);return b},mathmlBuilder:(s,a)=>Qn(s.body,a)}),et({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(s,a)=>{let{parser:l}=s;return{type:"htmlmathml",mode:l.mode,html:xr(a[0]),mathml:xr(a[1])}},htmlBuilder:(s,a)=>{const l=_r(s.html,a,!1);return me.makeFragment(l)},mathmlBuilder:(s,a)=>Qn(s.mathml,a)});const el=function(s){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(s))return{number:+s,unit:"bp"};{const a=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(s);if(!a)throw new i("Invalid size: '"+s+"' in \\includegraphics");const l={number:+(a[1]+a[2]),unit:a[3]};if(!yt(l))throw new i("Invalid unit: '"+l.unit+"' in \\includegraphics.");return l}};et({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(s,a,l)=>{let{parser:h}=s,b={number:0,unit:"em"},E={number:.9,unit:"em"},O={number:0,unit:"em"},_="";if(l[0]){const te=Pt(l[0],"raw").string.split(",");for(let de=0;de<te.length;de++){const pe=te[de].split("=");if(pe.length===2){const Ee=pe[1].trim();switch(pe[0].trim()){case"alt":_=Ee;break;case"width":b=el(Ee);break;case"height":E=el(Ee);break;case"totalheight":O=el(Ee);break;default:throw new i("Invalid key: '"+pe[0]+"' in \\includegraphics.")}}}}const V=Pt(a[0],"url").url;return _===""&&(_=V,_=_.replace(/^.*[\\/]/,""),_=_.substring(0,_.lastIndexOf("."))),h.settings.isTrusted({command:"\\includegraphics",url:V})?{type:"includegraphics",mode:h.mode,alt:_,width:b,height:E,totalheight:O,src:V}:h.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(s,a)=>{const l=Me(s.height,a);let h=0;s.totalheight.number>0&&(h=Me(s.totalheight,a)-l);let b=0;s.width.number>0&&(b=Me(s.width,a));const E={height:ue(l+h)};b>0&&(E.width=ue(b)),h>0&&(E.verticalAlign=ue(-h));const O=new Gt(s.src,s.alt,E);return O.height=l,O.depth=h,O},mathmlBuilder:(s,a)=>{const l=new Ge.MathNode("mglyph",[]);l.setAttribute("alt",s.alt);const h=Me(s.height,a);let b=0;if(s.totalheight.number>0&&(b=Me(s.totalheight,a)-h,l.setAttribute("valign",ue(-b))),l.setAttribute("height",ue(h+b)),s.width.number>0){const E=Me(s.width,a);l.setAttribute("width",ue(E))}return l.setAttribute("src",s.src),l}}),et({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(s,a){let{parser:l,funcName:h}=s;const b=Pt(a[0],"size");if(l.settings.strict){const E=h[1]==="m",O=b.value.unit==="mu";E?(O||l.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+h+" supports only mu units, "+("not "+b.value.unit+" units")),l.mode!=="math"&&l.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+h+" works only in math mode")):O&&l.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+h+" doesn't support mu units")}return{type:"kern",mode:l.mode,dimension:b.value}},htmlBuilder(s,a){return me.makeGlue(s.dimension,a)},mathmlBuilder(s,a){const l=Me(s.dimension,a);return new Ge.SpaceNode(l)}}),et({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(s,a)=>{let{parser:l,funcName:h}=s;const b=a[0];return{type:"lap",mode:l.mode,alignment:h.slice(5),body:b}},htmlBuilder:(s,a)=>{let l;s.alignment==="clap"?(l=me.makeSpan([],[Qt(s.body,a)]),l=me.makeSpan(["inner"],[l],a)):l=me.makeSpan(["inner"],[Qt(s.body,a)]);const h=me.makeSpan(["fix"],[]);let b=me.makeSpan([s.alignment],[l,h],a);const E=me.makeSpan(["strut"]);return E.style.height=ue(b.height+b.depth),b.depth&&(E.style.verticalAlign=ue(-b.depth)),b.children.unshift(E),b=me.makeSpan(["thinbox"],[b],a),me.makeSpan(["mord","vbox"],[b],a)},mathmlBuilder:(s,a)=>{const l=new Ge.MathNode("mpadded",[hr(s.body,a)]);if(s.alignment!=="rlap"){const h=s.alignment==="llap"?"-1":"-0.5";l.setAttribute("lspace",h+"width")}return l.setAttribute("width","0px"),l}}),et({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(s,a){let{funcName:l,parser:h}=s;const b=h.mode;h.switchMode("math");const E=l==="\\("?"\\)":"$",O=h.parseExpression(!1,E);return h.expect(E),h.switchMode(b),{type:"styling",mode:h.mode,style:"text",body:O}}}),et({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(s,a){throw new i("Mismatched "+s.funcName)}});const Cc=(s,a)=>{switch(a.style.size){case z.DISPLAY.size:return s.display;case z.TEXT.size:return s.text;case z.SCRIPT.size:return s.script;case z.SCRIPTSCRIPT.size:return s.scriptscript;default:return s.text}};et({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(s,a)=>{let{parser:l}=s;return{type:"mathchoice",mode:l.mode,display:xr(a[0]),text:xr(a[1]),script:xr(a[2]),scriptscript:xr(a[3])}},htmlBuilder:(s,a)=>{const l=Cc(s,a),h=_r(l,a,!1);return me.makeFragment(h)},mathmlBuilder:(s,a)=>{const l=Cc(s,a);return Qn(l,a)}});const Dc=(s,a,l,h,b,E,O)=>{s=me.makeSpan([],[s]);const _=l&&C.isCharacterBox(l);let V,te;if(a){const Ee=Qt(a,h.havingStyle(b.sup()),h);te={elem:Ee,kern:Math.max(h.fontMetrics().bigOpSpacing1,h.fontMetrics().bigOpSpacing3-Ee.depth)}}if(l){const Ee=Qt(l,h.havingStyle(b.sub()),h);V={elem:Ee,kern:Math.max(h.fontMetrics().bigOpSpacing2,h.fontMetrics().bigOpSpacing4-Ee.height)}}let de;if(te&&V){const Ee=h.fontMetrics().bigOpSpacing5+V.elem.height+V.elem.depth+V.kern+s.depth+O;de=me.makeVList({positionType:"bottom",positionData:Ee,children:[{type:"kern",size:h.fontMetrics().bigOpSpacing5},{type:"elem",elem:V.elem,marginLeft:ue(-E)},{type:"kern",size:V.kern},{type:"elem",elem:s},{type:"kern",size:te.kern},{type:"elem",elem:te.elem,marginLeft:ue(E)},{type:"kern",size:h.fontMetrics().bigOpSpacing5}]},h)}else if(V){const Ee=s.height-O;de=me.makeVList({positionType:"top",positionData:Ee,children:[{type:"kern",size:h.fontMetrics().bigOpSpacing5},{type:"elem",elem:V.elem,marginLeft:ue(-E)},{type:"kern",size:V.kern},{type:"elem",elem:s}]},h)}else if(te){const Ee=s.depth+O;de=me.makeVList({positionType:"bottom",positionData:Ee,children:[{type:"elem",elem:s},{type:"kern",size:te.kern},{type:"elem",elem:te.elem,marginLeft:ue(E)},{type:"kern",size:h.fontMetrics().bigOpSpacing5}]},h)}else return s;const pe=[de];if(V&&E!==0&&!_){const Ee=me.makeSpan(["mspace"],[],h);Ee.style.marginRight=ue(E),pe.unshift(Ee)}return me.makeSpan(["mop","op-limits"],pe,h)},kc=["\\smallint"],_o=(s,a)=>{let l,h,b=!1,E;s.type==="supsub"?(l=s.sup,h=s.sub,E=Pt(s.base,"op"),b=!0):E=Pt(s,"op");const O=a.style;let _=!1;O.size===z.DISPLAY.size&&E.symbol&&!kc.includes(E.name)&&(_=!0);let V;if(E.symbol){const pe=_?"Size2-Regular":"Size1-Regular";let Ee="";if((E.name==="\\oiint"||E.name==="\\oiiint")&&(Ee=E.name.slice(1),E.name=Ee==="oiint"?"\\iint":"\\iiint"),V=me.makeSymbol(E.name,pe,"math",a,["mop","op-symbol",_?"large-op":"small-op"]),Ee.length>0){const Ye=V.italic,rt=me.staticSvg(Ee+"Size"+(_?"2":"1"),a);V=me.makeVList({positionType:"individualShift",children:[{type:"elem",elem:V,shift:0},{type:"elem",elem:rt,shift:_?.08:0}]},a),E.name="\\"+Ee,V.classes.unshift("mop"),V.italic=Ye}}else if(E.body){const pe=_r(E.body,a,!0);pe.length===1&&pe[0]instanceof Dt?(V=pe[0],V.classes[0]="mop"):V=me.makeSpan(["mop"],pe,a)}else{const pe=[];for(let Ee=1;Ee<E.name.length;Ee++)pe.push(me.mathsym(E.name[Ee],E.mode,a));V=me.makeSpan(["mop"],pe,a)}let te=0,de=0;return(V instanceof Dt||E.name==="\\oiint"||E.name==="\\oiiint")&&!E.suppressBaseShift&&(te=(V.height-V.depth)/2-a.fontMetrics().axisHeight,de=V.italic),b?Dc(V,l,h,a,O,de,te):(te&&(V.style.position="relative",V.style.top=ue(te)),V)},wa=(s,a)=>{let l;if(s.symbol)l=new un("mo",[hn(s.name,s.mode)]),kc.includes(s.name)&&l.setAttribute("largeop","false");else if(s.body)l=new un("mo",nn(s.body,a));else{l=new un("mi",[new Fn(s.name.slice(1))]);const h=new un("mo",[hn("\u2061","text")]);s.parentIsSupSub?l=new un("mrow",[l,h]):l=Lu([l,h])}return l},lg={"\u220F":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22C0":"\\bigwedge","\u22C1":"\\bigvee","\u22C2":"\\bigcap","\u22C3":"\\bigcup","\u2A00":"\\bigodot","\u2A01":"\\bigoplus","\u2A02":"\\bigotimes","\u2A04":"\\biguplus","\u2A06":"\\bigsqcup"};et({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","\u220F","\u2210","\u2211","\u22C0","\u22C1","\u22C2","\u22C3","\u2A00","\u2A01","\u2A02","\u2A04","\u2A06"],props:{numArgs:0},handler:(s,a)=>{let{parser:l,funcName:h}=s,b=h;return b.length===1&&(b=lg[b]),{type:"op",mode:l.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:b}},htmlBuilder:_o,mathmlBuilder:wa}),et({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(s,a)=>{let{parser:l}=s;const h=a[0];return{type:"op",mode:l.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:xr(h)}},htmlBuilder:_o,mathmlBuilder:wa});const ug={"\u222B":"\\int","\u222C":"\\iint","\u222D":"\\iiint","\u222E":"\\oint","\u222F":"\\oiint","\u2230":"\\oiiint"};et({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(s){let{parser:a,funcName:l}=s;return{type:"op",mode:a.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:l}},htmlBuilder:_o,mathmlBuilder:wa}),et({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(s){let{parser:a,funcName:l}=s;return{type:"op",mode:a.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:l}},htmlBuilder:_o,mathmlBuilder:wa}),et({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","\u222B","\u222C","\u222D","\u222E","\u222F","\u2230"],props:{numArgs:0},handler(s){let{parser:a,funcName:l}=s,h=l;return h.length===1&&(h=ug[h]),{type:"op",mode:a.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:h}},htmlBuilder:_o,mathmlBuilder:wa});const Ec=(s,a)=>{let l,h,b=!1,E;s.type==="supsub"?(l=s.sup,h=s.sub,E=Pt(s.base,"operatorname"),b=!0):E=Pt(s,"operatorname");let O;if(E.body.length>0){const _=E.body.map(te=>{const de=te.text;return typeof de=="string"?{type:"textord",mode:te.mode,text:de}:te}),V=_r(_,a.withFont("mathrm"),!0);for(let te=0;te<V.length;te++){const de=V[te];de instanceof Dt&&(de.text=de.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}O=me.makeSpan(["mop"],V,a)}else O=me.makeSpan(["mop"],[],a);return b?Dc(O,l,h,a,a.style,0,0):O};et({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(s,a)=>{let{parser:l,funcName:h}=s;const b=a[0];return{type:"operatorname",mode:l.mode,body:xr(b),alwaysHandleSupSub:h==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:Ec,mathmlBuilder:(s,a)=>{let l=nn(s.body,a.withFont("mathrm")),h=!0;for(let O=0;O<l.length;O++){const _=l[O];if(!(_ instanceof Ge.SpaceNode))if(_ instanceof Ge.MathNode)switch(_.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":{const V=_.children[0];_.children.length===1&&V instanceof Ge.TextNode?V.text=V.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):h=!1;break}default:h=!1}else h=!1}if(h){const O=l.map(_=>_.toText()).join("");l=[new Ge.TextNode(O)]}const b=new Ge.MathNode("mi",l);b.setAttribute("mathvariant","normal");const E=new Ge.MathNode("mo",[hn("\u2061","text")]);return s.parentIsSupSub?new Ge.MathNode("mrow",[b,E]):Ge.newDocumentFragment([b,E])}}),L("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),Yr({type:"ordgroup",htmlBuilder(s,a){return s.semisimple?me.makeFragment(_r(s.body,a,!1)):me.makeSpan(["mord"],_r(s.body,a,!0),a)},mathmlBuilder(s,a){return Qn(s.body,a,!0)}}),et({type:"overline",names:["\\overline"],props:{numArgs:1},handler(s,a){let{parser:l}=s;const h=a[0];return{type:"overline",mode:l.mode,body:h}},htmlBuilder(s,a){const l=Qt(s.body,a.havingCrampedStyle()),h=me.makeLineSpan("overline-line",a),b=a.fontMetrics().defaultRuleThickness,E=me.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:3*b},{type:"elem",elem:h},{type:"kern",size:b}]},a);return me.makeSpan(["mord","overline"],[E],a)},mathmlBuilder(s,a){const l=new Ge.MathNode("mo",[new Ge.TextNode("\u203E")]);l.setAttribute("stretchy","true");const h=new Ge.MathNode("mover",[hr(s.body,a),l]);return h.setAttribute("accent","true"),h}}),et({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(s,a)=>{let{parser:l}=s;const h=a[0];return{type:"phantom",mode:l.mode,body:xr(h)}},htmlBuilder:(s,a)=>{const l=_r(s.body,a.withPhantom(),!1);return me.makeFragment(l)},mathmlBuilder:(s,a)=>{const l=nn(s.body,a);return new Ge.MathNode("mphantom",l)}}),et({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(s,a)=>{let{parser:l}=s;const h=a[0];return{type:"hphantom",mode:l.mode,body:h}},htmlBuilder:(s,a)=>{let l=me.makeSpan([],[Qt(s.body,a.withPhantom())]);if(l.height=0,l.depth=0,l.children)for(let h=0;h<l.children.length;h++)l.children[h].height=0,l.children[h].depth=0;return l=me.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l}]},a),me.makeSpan(["mord"],[l],a)},mathmlBuilder:(s,a)=>{const l=nn(xr(s.body),a),h=new Ge.MathNode("mphantom",l),b=new Ge.MathNode("mpadded",[h]);return b.setAttribute("height","0px"),b.setAttribute("depth","0px"),b}}),et({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(s,a)=>{let{parser:l}=s;const h=a[0];return{type:"vphantom",mode:l.mode,body:h}},htmlBuilder:(s,a)=>{const l=me.makeSpan(["inner"],[Qt(s.body,a.withPhantom())]),h=me.makeSpan(["fix"],[]);return me.makeSpan(["mord","rlap"],[l,h],a)},mathmlBuilder:(s,a)=>{const l=nn(xr(s.body),a),h=new Ge.MathNode("mphantom",l),b=new Ge.MathNode("mpadded",[h]);return b.setAttribute("width","0px"),b}}),et({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(s,a){let{parser:l}=s;const h=Pt(a[0],"size").value,b=a[1];return{type:"raisebox",mode:l.mode,dy:h,body:b}},htmlBuilder(s,a){const l=Qt(s.body,a),h=Me(s.dy,a);return me.makeVList({positionType:"shift",positionData:-h,children:[{type:"elem",elem:l}]},a)},mathmlBuilder(s,a){const l=new Ge.MathNode("mpadded",[hr(s.body,a)]),h=s.dy.number+s.dy.unit;return l.setAttribute("voffset",h),l}}),et({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(s){let{parser:a}=s;return{type:"internal",mode:a.mode}}}),et({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(s,a,l){let{parser:h}=s;const b=l[0],E=Pt(a[0],"size"),O=Pt(a[1],"size");return{type:"rule",mode:h.mode,shift:b&&Pt(b,"size").value,width:E.value,height:O.value}},htmlBuilder(s,a){const l=me.makeSpan(["mord","rule"],[],a),h=Me(s.width,a),b=Me(s.height,a),E=s.shift?Me(s.shift,a):0;return l.style.borderRightWidth=ue(h),l.style.borderTopWidth=ue(b),l.style.bottom=ue(E),l.width=h,l.height=b+E,l.depth=-E,l.maxFontSize=b*1.125*a.sizeMultiplier,l},mathmlBuilder(s,a){const l=Me(s.width,a),h=Me(s.height,a),b=s.shift?Me(s.shift,a):0,E=a.color&&a.getColor()||"black",O=new Ge.MathNode("mspace");O.setAttribute("mathbackground",E),O.setAttribute("width",ue(l)),O.setAttribute("height",ue(h));const _=new Ge.MathNode("mpadded",[O]);return b>=0?_.setAttribute("height",ue(b)):(_.setAttribute("height",ue(b)),_.setAttribute("depth",ue(-b))),_.setAttribute("voffset",ue(b)),_}});function Sc(s,a,l){const h=_r(s,a,!1),b=a.sizeMultiplier/l.sizeMultiplier;for(let E=0;E<h.length;E++){const O=h[E].classes.indexOf("sizing");O<0?Array.prototype.push.apply(h[E].classes,a.sizingClasses(l)):h[E].classes[O+1]==="reset-size"+a.size&&(h[E].classes[O+1]="reset-size"+l.size),h[E].height*=b,h[E].depth*=b}return me.makeFragment(h)}const Ac=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"];et({type:"sizing",names:Ac,props:{numArgs:0,allowedInText:!0},handler:(s,a)=>{let{breakOnTokenText:l,funcName:h,parser:b}=s;const E=b.parseExpression(!1,l);return{type:"sizing",mode:b.mode,size:Ac.indexOf(h)+1,body:E}},htmlBuilder:(s,a)=>{const l=a.havingSize(s.size);return Sc(s.body,l,a)},mathmlBuilder:(s,a)=>{const l=a.havingSize(s.size),h=nn(s.body,l),b=new Ge.MathNode("mstyle",h);return b.setAttribute("mathsize",ue(l.sizeMultiplier)),b}}),et({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(s,a,l)=>{let{parser:h}=s,b=!1,E=!1;const O=l[0]&&Pt(l[0],"ordgroup");if(O){let V="";for(let te=0;te<O.body.length;++te)if(V=O.body[te].text,V==="t")b=!0;else if(V==="b")E=!0;else{b=!1,E=!1;break}}else b=!0,E=!0;const _=a[0];return{type:"smash",mode:h.mode,body:_,smashHeight:b,smashDepth:E}},htmlBuilder:(s,a)=>{const l=me.makeSpan([],[Qt(s.body,a)]);if(!s.smashHeight&&!s.smashDepth)return l;if(s.smashHeight&&(l.height=0,l.children))for(let b=0;b<l.children.length;b++)l.children[b].height=0;if(s.smashDepth&&(l.depth=0,l.children))for(let b=0;b<l.children.length;b++)l.children[b].depth=0;const h=me.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l}]},a);return me.makeSpan(["mord"],[h],a)},mathmlBuilder:(s,a)=>{const l=new Ge.MathNode("mpadded",[hr(s.body,a)]);return s.smashHeight&&l.setAttribute("height","0px"),s.smashDepth&&l.setAttribute("depth","0px"),l}}),et({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(s,a,l){let{parser:h}=s;const b=l[0],E=a[0];return{type:"sqrt",mode:h.mode,body:E,index:b}},htmlBuilder(s,a){let l=Qt(s.body,a.havingCrampedStyle());l.height===0&&(l.height=a.fontMetrics().xHeight),l=me.wrapFragment(l,a);const h=a.fontMetrics().defaultRuleThickness;let b=h;a.style.id<z.TEXT.id&&(b=a.fontMetrics().xHeight);let E=h+b/4;const O=l.height+l.depth+E+h,{span:_,ruleWidth:V,advanceWidth:te}=qn.sqrtImage(O,a),de=_.height-V;de>l.height+l.depth+E&&(E=(E+de-l.height-l.depth)/2);const pe=_.height-l.height-E-V;l.style.paddingLeft=ue(te);const Ee=me.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l,wrapperClasses:["svg-align"]},{type:"kern",size:-(l.height+pe)},{type:"elem",elem:_},{type:"kern",size:V}]},a);if(s.index){const Ye=a.havingStyle(z.SCRIPTSCRIPT),rt=Qt(s.index,Ye,a),Mt=.6*(Ee.height-Ee.depth),Zt=me.makeVList({positionType:"shift",positionData:-Mt,children:[{type:"elem",elem:rt}]},a),qt=me.makeSpan(["root"],[Zt]);return me.makeSpan(["mord","sqrt"],[qt,Ee],a)}else return me.makeSpan(["mord","sqrt"],[Ee],a)},mathmlBuilder(s,a){const{body:l,index:h}=s;return h?new Ge.MathNode("mroot",[hr(l,a),hr(h,a)]):new Ge.MathNode("msqrt",[hr(l,a)])}});const Bc={display:z.DISPLAY,text:z.TEXT,script:z.SCRIPT,scriptscript:z.SCRIPTSCRIPT};et({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(s,a){let{breakOnTokenText:l,funcName:h,parser:b}=s;const E=b.parseExpression(!0,l),O=h.slice(1,h.length-5);return{type:"styling",mode:b.mode,style:O,body:E}},htmlBuilder(s,a){const l=Bc[s.style],h=a.havingStyle(l).withFont("");return Sc(s.body,h,a)},mathmlBuilder(s,a){const l=Bc[s.style],h=a.havingStyle(l),b=nn(s.body,h),E=new Ge.MathNode("mstyle",b),O={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[s.style];return E.setAttribute("scriptlevel",O[0]),E.setAttribute("displaystyle",O[1]),E}});const cg=function(s,a){const l=s.base;return l?l.type==="op"?l.limits&&(a.style.size===z.DISPLAY.size||l.alwaysHandleSupSub)?_o:null:l.type==="operatorname"?l.alwaysHandleSupSub&&(a.style.size===z.DISPLAY.size||l.limits)?Ec:null:l.type==="accent"?C.isCharacterBox(l.base)?Is:null:l.type==="horizBrace"&&!s.sub===l.isOver?wc:null:null};Yr({type:"supsub",htmlBuilder(s,a){const l=cg(s,a);if(l)return l(s,a);const{base:h,sup:b,sub:E}=s,O=Qt(h,a);let _,V;const te=a.fontMetrics();let de=0,pe=0;const Ee=h&&C.isCharacterBox(h);if(b){const er=a.havingStyle(a.style.sup());_=Qt(b,er,a),Ee||(de=O.height-er.fontMetrics().supDrop*er.sizeMultiplier/a.sizeMultiplier)}if(E){const er=a.havingStyle(a.style.sub());V=Qt(E,er,a),Ee||(pe=O.depth+er.fontMetrics().subDrop*er.sizeMultiplier/a.sizeMultiplier)}let Ye;a.style===z.DISPLAY?Ye=te.sup1:a.style.cramped?Ye=te.sup3:Ye=te.sup2;const rt=a.sizeMultiplier,Mt=ue(.5/te.ptPerEm/rt);let Zt=null;if(V){const er=s.base&&s.base.type==="op"&&s.base.name&&(s.base.name==="\\oiint"||s.base.name==="\\oiiint");(O instanceof Dt||er)&&(Zt=ue(-O.italic))}let qt;if(_&&V){de=Math.max(de,Ye,_.depth+.25*te.xHeight),pe=Math.max(pe,te.sub2);const er=4*te.defaultRuleThickness;if(de-_.depth-(V.height-pe)<er){pe=er-(de-_.depth)+V.height;const Wr=.8*te.xHeight-(de-_.depth);Wr>0&&(de+=Wr,pe-=Wr)}const wr=[{type:"elem",elem:V,shift:pe,marginRight:Mt,marginLeft:Zt},{type:"elem",elem:_,shift:-de,marginRight:Mt}];qt=me.makeVList({positionType:"individualShift",children:wr},a)}else if(V){pe=Math.max(pe,te.sub1,V.height-.8*te.xHeight);const er=[{type:"elem",elem:V,marginLeft:Zt,marginRight:Mt}];qt=me.makeVList({positionType:"shift",positionData:pe,children:er},a)}else if(_)de=Math.max(de,Ye,_.depth+.25*te.xHeight),qt=me.makeVList({positionType:"shift",positionData:-de,children:[{type:"elem",elem:_,marginRight:Mt}]},a);else throw new Error("supsub must have either sup or sub.");const rr=$s(O,"right")||"mord";return me.makeSpan([rr],[O,me.makeSpan(["msupsub"],[qt])],a)},mathmlBuilder(s,a){let l=!1,h,b;s.base&&s.base.type==="horizBrace"&&(b=!!s.sup,b===s.base.isOver&&(l=!0,h=s.base.isOver)),s.base&&(s.base.type==="op"||s.base.type==="operatorname")&&(s.base.parentIsSupSub=!0);const E=[hr(s.base,a)];s.sub&&E.push(hr(s.sub,a)),s.sup&&E.push(hr(s.sup,a));let O;if(l)O=h?"mover":"munder";else if(s.sub)if(s.sup){const _=s.base;_&&_.type==="op"&&_.limits&&a.style===z.DISPLAY||_&&_.type==="operatorname"&&_.alwaysHandleSupSub&&(a.style===z.DISPLAY||_.limits)?O="munderover":O="msubsup"}else{const _=s.base;_&&_.type==="op"&&_.limits&&(a.style===z.DISPLAY||_.alwaysHandleSupSub)||_&&_.type==="operatorname"&&_.alwaysHandleSupSub&&(_.limits||a.style===z.DISPLAY)?O="munder":O="msub"}else{const _=s.base;_&&_.type==="op"&&_.limits&&(a.style===z.DISPLAY||_.alwaysHandleSupSub)||_&&_.type==="operatorname"&&_.alwaysHandleSupSub&&(_.limits||a.style===z.DISPLAY)?O="mover":O="msup"}return new Ge.MathNode(O,E)}}),Yr({type:"atom",htmlBuilder(s,a){return me.mathsym(s.text,s.mode,a,["m"+s.family])},mathmlBuilder(s,a){const l=new Ge.MathNode("mo",[hn(s.text,s.mode)]);if(s.family==="bin"){const h=Ps(s,a);h==="bold-italic"&&l.setAttribute("mathvariant",h)}else s.family==="punct"?l.setAttribute("separator","true"):(s.family==="open"||s.family==="close")&&l.setAttribute("stretchy","false");return l}});const Fc={mi:"italic",mn:"normal",mtext:"normal"};Yr({type:"mathord",htmlBuilder(s,a){return me.makeOrd(s,a,"mathord")},mathmlBuilder(s,a){const l=new Ge.MathNode("mi",[hn(s.text,s.mode,a)]),h=Ps(s,a)||"italic";return h!==Fc[l.type]&&l.setAttribute("mathvariant",h),l}}),Yr({type:"textord",htmlBuilder(s,a){return me.makeOrd(s,a,"textord")},mathmlBuilder(s,a){const l=hn(s.text,s.mode,a),h=Ps(s,a)||"normal";let b;return s.mode==="text"?b=new Ge.MathNode("mtext",[l]):/[0-9]/.test(s.text)?b=new Ge.MathNode("mn",[l]):s.text==="\\prime"?b=new Ge.MathNode("mo",[l]):b=new Ge.MathNode("mi",[l]),h!==Fc[b.type]&&b.setAttribute("mathvariant",h),b}});const tl={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},rl={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Yr({type:"spacing",htmlBuilder(s,a){if(rl.hasOwnProperty(s.text)){const l=rl[s.text].className||"";if(s.mode==="text"){const h=me.makeOrd(s,a,"textord");return h.classes.push(l),h}else return me.makeSpan(["mspace",l],[me.mathsym(s.text,s.mode,a)],a)}else{if(tl.hasOwnProperty(s.text))return me.makeSpan(["mspace",tl[s.text]],[],a);throw new i('Unknown type of space "'+s.text+'"')}},mathmlBuilder(s,a){let l;if(rl.hasOwnProperty(s.text))l=new Ge.MathNode("mtext",[new Ge.TextNode("\xA0")]);else{if(tl.hasOwnProperty(s.text))return new Ge.MathNode("mspace");throw new i('Unknown type of space "'+s.text+'"')}return l}});const Nc=()=>{const s=new Ge.MathNode("mtd",[]);return s.setAttribute("width","50%"),s};Yr({type:"tag",mathmlBuilder(s,a){const l=new Ge.MathNode("mtable",[new Ge.MathNode("mtr",[Nc(),new Ge.MathNode("mtd",[Qn(s.body,a)]),Nc(),new Ge.MathNode("mtd",[Qn(s.tag,a)])])]);return l.setAttribute("width","100%"),l}});const Tc={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Oc={"\\textbf":"textbf","\\textmd":"textmd"},dg={"\\textit":"textit","\\textup":"textup"},$c=(s,a)=>{const l=s.font;if(l){if(Tc[l])return a.withTextFontFamily(Tc[l]);if(Oc[l])return a.withTextFontWeight(Oc[l]);if(l==="\\emph")return a.fontShape==="textit"?a.withTextFontShape("textup"):a.withTextFontShape("textit")}else return a;return a.withTextFontShape(dg[l])};et({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(s,a){let{parser:l,funcName:h}=s;const b=a[0];return{type:"text",mode:l.mode,body:xr(b),font:h}},htmlBuilder(s,a){const l=$c(s,a),h=_r(s.body,l,!0);return me.makeSpan(["mord","text"],h,l)},mathmlBuilder(s,a){const l=$c(s,a);return Qn(s.body,l)}}),et({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(s,a){let{parser:l}=s;return{type:"underline",mode:l.mode,body:a[0]}},htmlBuilder(s,a){const l=Qt(s.body,a),h=me.makeLineSpan("underline-line",a),b=a.fontMetrics().defaultRuleThickness,E=me.makeVList({positionType:"top",positionData:l.height,children:[{type:"kern",size:b},{type:"elem",elem:h},{type:"kern",size:3*b},{type:"elem",elem:l}]},a);return me.makeSpan(["mord","underline"],[E],a)},mathmlBuilder(s,a){const l=new Ge.MathNode("mo",[new Ge.TextNode("\u203E")]);l.setAttribute("stretchy","true");const h=new Ge.MathNode("munder",[hr(s.body,a),l]);return h.setAttribute("accentunder","true"),h}}),et({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(s,a){let{parser:l}=s;return{type:"vcenter",mode:l.mode,body:a[0]}},htmlBuilder(s,a){const l=Qt(s.body,a),h=a.fontMetrics().axisHeight,b=.5*(l.height-h-(l.depth+h));return me.makeVList({positionType:"shift",positionData:b,children:[{type:"elem",elem:l}]},a)},mathmlBuilder(s,a){return new Ge.MathNode("mpadded",[hr(s.body,a)],["vcenter"])}}),et({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(s,a,l){throw new i("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(s,a){const l=Mc(s),h=[],b=a.havingStyle(a.style.text());for(let E=0;E<l.length;E++){let O=l[E];O==="~"&&(O="\\textasciitilde"),h.push(me.makeSymbol(O,"Typewriter-Regular",s.mode,b,["mord","texttt"]))}return me.makeSpan(["mord","text"].concat(b.sizingClasses(a)),me.tryCombineChars(h),b)},mathmlBuilder(s,a){const l=new Ge.TextNode(Mc(s)),h=new Ge.MathNode("mtext",[l]);return h.setAttribute("mathvariant","monospace"),h}});const Mc=s=>s.body.replace(/ /g,s.star?"\u2423":"\xA0");var to=Gr;const Rc=`[ \r
|
|
471
|
-
]`,fg="\\\\[a-zA-Z@]+",hg="\\\\[^\uD800-\uDFFF]",pg="("+fg+")"+Rc+"*",mg=`\\\\(
|
|
472
|
-
|[ \r ]+
|
|
473
|
-
?)[ \r ]*`,nl="[\u0300-\u036F]",gg=new RegExp(nl+"+$"),vg="("+Rc+"+)|"+(mg+"|")+"([!-\\[\\]-\u2027\u202A-\uD7FF\uF900-\uFFFF]"+(nl+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(nl+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+pg)+("|"+hg+")");class Pc{constructor(a,l){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=a,this.settings=l,this.tokenRegex=new RegExp(vg,"g"),this.catcodes={"%":14,"~":13}}setCatcode(a,l){this.catcodes[a]=l}lex(){const a=this.input,l=this.tokenRegex.lastIndex;if(l===a.length)return new cn("EOF",new on(this,l,l));const h=this.tokenRegex.exec(a);if(h===null||h.index!==l)throw new i("Unexpected character: '"+a[l]+"'",new cn(a[l],new on(this,l,l+1)));const b=h[6]||h[3]||(h[2]?"\\ ":" ");if(this.catcodes[b]===14){const E=a.indexOf(`
|
|
474
|
-
`,this.tokenRegex.lastIndex);return E===-1?(this.tokenRegex.lastIndex=a.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=E+1,this.lex()}return new cn(b,new on(this,l,this.tokenRegex.lastIndex))}}class bg{constructor(a,l){a===void 0&&(a={}),l===void 0&&(l={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=l,this.builtins=a,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new i("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");const a=this.undefStack.pop();for(const l in a)a.hasOwnProperty(l)&&(a[l]==null?delete this.current[l]:this.current[l]=a[l])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(a){return this.current.hasOwnProperty(a)||this.builtins.hasOwnProperty(a)}get(a){return this.current.hasOwnProperty(a)?this.current[a]:this.builtins[a]}set(a,l,h){if(h===void 0&&(h=!1),h){for(let b=0;b<this.undefStack.length;b++)delete this.undefStack[b][a];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][a]=l)}else{const b=this.undefStack[this.undefStack.length-1];b&&!b.hasOwnProperty(a)&&(b[a]=this.current[a])}l==null?delete this.current[a]:this.current[a]=l}}var yg=dc;L("\\noexpand",function(s){const a=s.popToken();return s.isExpandable(a.text)&&(a.noexpand=!0,a.treatAsRelax=!0),{tokens:[a],numArgs:0}}),L("\\expandafter",function(s){const a=s.popToken();return s.expandOnce(!0),{tokens:[a],numArgs:0}}),L("\\@firstoftwo",function(s){return{tokens:s.consumeArgs(2)[0],numArgs:0}}),L("\\@secondoftwo",function(s){return{tokens:s.consumeArgs(2)[1],numArgs:0}}),L("\\@ifnextchar",function(s){const a=s.consumeArgs(3);s.consumeSpaces();const l=s.future();return a[0].length===1&&a[0][0].text===l.text?{tokens:a[1],numArgs:0}:{tokens:a[2],numArgs:0}}),L("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),L("\\TextOrMath",function(s){const a=s.consumeArgs(2);return s.mode==="text"?{tokens:a[0],numArgs:0}:{tokens:a[1],numArgs:0}});const zc={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};L("\\char",function(s){let a=s.popToken(),l,h="";if(a.text==="'")l=8,a=s.popToken();else if(a.text==='"')l=16,a=s.popToken();else if(a.text==="`")if(a=s.popToken(),a.text[0]==="\\")h=a.text.charCodeAt(1);else{if(a.text==="EOF")throw new i("\\char` missing argument");h=a.text.charCodeAt(0)}else l=10;if(l){if(h=zc[a.text],h==null||h>=l)throw new i("Invalid base-"+l+" digit "+a.text);let b;for(;(b=zc[s.future().text])!=null&&b<l;)h*=l,h+=b,s.popToken()}return"\\@char{"+h+"}"});const ol=(s,a,l,h)=>{let b=s.consumeArg().tokens;if(b.length!==1)throw new i("\\newcommand's first argument must be a macro name");const E=b[0].text,O=s.isDefined(E);if(O&&!a)throw new i("\\newcommand{"+E+"} attempting to redefine "+(E+"; use \\renewcommand"));if(!O&&!l)throw new i("\\renewcommand{"+E+"} when command "+E+" does not yet exist; use \\newcommand");let _=0;if(b=s.consumeArg().tokens,b.length===1&&b[0].text==="["){let V="",te=s.expandNextToken();for(;te.text!=="]"&&te.text!=="EOF";)V+=te.text,te=s.expandNextToken();if(!V.match(/^\s*[0-9]+\s*$/))throw new i("Invalid number of arguments: "+V);_=parseInt(V),b=s.consumeArg().tokens}return O&&h||s.macros.set(E,{tokens:b,numArgs:_}),""};L("\\newcommand",s=>ol(s,!1,!0,!1)),L("\\renewcommand",s=>ol(s,!0,!1,!1)),L("\\providecommand",s=>ol(s,!0,!0,!0)),L("\\message",s=>{const a=s.consumeArgs(1)[0];return console.log(a.reverse().map(l=>l.text).join("")),""}),L("\\errmessage",s=>{const a=s.consumeArgs(1)[0];return console.error(a.reverse().map(l=>l.text).join("")),""}),L("\\show",s=>{const a=s.popToken(),l=a.text;return console.log(a,s.macros.get(l),to[l],Vt.math[l],Vt.text[l]),""}),L("\\bgroup","{"),L("\\egroup","}"),L("~","\\nobreakspace"),L("\\lq","`"),L("\\rq","'"),L("\\aa","\\r a"),L("\\AA","\\r A"),L("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`\xA9}"),L("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),L("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`\xAE}"),L("\u212C","\\mathscr{B}"),L("\u2130","\\mathscr{E}"),L("\u2131","\\mathscr{F}"),L("\u210B","\\mathscr{H}"),L("\u2110","\\mathscr{I}"),L("\u2112","\\mathscr{L}"),L("\u2133","\\mathscr{M}"),L("\u211B","\\mathscr{R}"),L("\u212D","\\mathfrak{C}"),L("\u210C","\\mathfrak{H}"),L("\u2128","\\mathfrak{Z}"),L("\\Bbbk","\\Bbb{k}"),L("\xB7","\\cdotp"),L("\\llap","\\mathllap{\\textrm{#1}}"),L("\\rlap","\\mathrlap{\\textrm{#1}}"),L("\\clap","\\mathclap{\\textrm{#1}}"),L("\\mathstrut","\\vphantom{(}"),L("\\underbar","\\underline{\\text{#1}}"),L("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),L("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`\u2260}}"),L("\\ne","\\neq"),L("\u2260","\\neq"),L("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`\u2209}}"),L("\u2209","\\notin"),L("\u2258","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`\u2258}}"),L("\u2259","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}"),L("\u225A","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225A}}"),L("\u225B","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`\u225B}}"),L("\u225D","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`\u225D}}"),L("\u225E","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`\u225E}}"),L("\u225F","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225F}}"),L("\u27C2","\\perp"),L("\u203C","\\mathclose{!\\mkern-0.8mu!}"),L("\u220C","\\notni"),L("\u231C","\\ulcorner"),L("\u231D","\\urcorner"),L("\u231E","\\llcorner"),L("\u231F","\\lrcorner"),L("\xA9","\\copyright"),L("\xAE","\\textregistered"),L("\uFE0F","\\textregistered"),L("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),L("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),L("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),L("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),L("\\vdots","{\\varvdots\\rule{0pt}{15pt}}"),L("\u22EE","\\vdots"),L("\\varGamma","\\mathit{\\Gamma}"),L("\\varDelta","\\mathit{\\Delta}"),L("\\varTheta","\\mathit{\\Theta}"),L("\\varLambda","\\mathit{\\Lambda}"),L("\\varXi","\\mathit{\\Xi}"),L("\\varPi","\\mathit{\\Pi}"),L("\\varSigma","\\mathit{\\Sigma}"),L("\\varUpsilon","\\mathit{\\Upsilon}"),L("\\varPhi","\\mathit{\\Phi}"),L("\\varPsi","\\mathit{\\Psi}"),L("\\varOmega","\\mathit{\\Omega}"),L("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),L("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),L("\\boxed","\\fbox{$\\displaystyle{#1}$}"),L("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),L("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),L("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;"),L("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}"),L("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");const _c={",":"\\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"};L("\\dots",function(s){let a="\\dotso";const l=s.expandAfterFuture().text;return l in _c?a=_c[l]:(l.slice(0,4)==="\\not"||l in Vt.math&&["bin","rel"].includes(Vt.math[l].group))&&(a="\\dotsb"),a});const al={")":!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};L("\\dotso",function(s){return s.future().text in al?"\\ldots\\,":"\\ldots"}),L("\\dotsc",function(s){const a=s.future().text;return a in al&&a!==","?"\\ldots\\,":"\\ldots"}),L("\\cdots",function(s){return s.future().text in al?"\\@cdots\\,":"\\@cdots"}),L("\\dotsb","\\cdots"),L("\\dotsm","\\cdots"),L("\\dotsi","\\!\\cdots"),L("\\dotsx","\\ldots\\,"),L("\\DOTSI","\\relax"),L("\\DOTSB","\\relax"),L("\\DOTSX","\\relax"),L("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),L("\\,","\\tmspace+{3mu}{.1667em}"),L("\\thinspace","\\,"),L("\\>","\\mskip{4mu}"),L("\\:","\\tmspace+{4mu}{.2222em}"),L("\\medspace","\\:"),L("\\;","\\tmspace+{5mu}{.2777em}"),L("\\thickspace","\\;"),L("\\!","\\tmspace-{3mu}{.1667em}"),L("\\negthinspace","\\!"),L("\\negmedspace","\\tmspace-{4mu}{.2222em}"),L("\\negthickspace","\\tmspace-{5mu}{.277em}"),L("\\enspace","\\kern.5em "),L("\\enskip","\\hskip.5em\\relax"),L("\\quad","\\hskip1em\\relax"),L("\\qquad","\\hskip2em\\relax"),L("\\tag","\\@ifstar\\tag@literal\\tag@paren"),L("\\tag@paren","\\tag@literal{({#1})}"),L("\\tag@literal",s=>{if(s.macros.get("\\df@tag"))throw new i("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),L("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),L("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),L("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),L("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),L("\\newline","\\\\\\relax"),L("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");const Ic=ue(Te["Main-Regular"][84][1]-.7*Te["Main-Regular"][65][1]);L("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+Ic+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}"),L("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+Ic+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}"),L("\\hspace","\\@ifstar\\@hspacer\\@hspace"),L("\\@hspace","\\hskip #1\\relax"),L("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),L("\\ordinarycolon",":"),L("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),L("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),L("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),L("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),L("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),L("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),L("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),L("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),L("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),L("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),L("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),L("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),L("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),L("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),L("\u2237","\\dblcolon"),L("\u2239","\\eqcolon"),L("\u2254","\\coloneqq"),L("\u2255","\\eqqcolon"),L("\u2A74","\\Coloneqq"),L("\\ratio","\\vcentcolon"),L("\\coloncolon","\\dblcolon"),L("\\colonequals","\\coloneqq"),L("\\coloncolonequals","\\Coloneqq"),L("\\equalscolon","\\eqqcolon"),L("\\equalscoloncolon","\\Eqqcolon"),L("\\colonminus","\\coloneq"),L("\\coloncolonminus","\\Coloneq"),L("\\minuscolon","\\eqcolon"),L("\\minuscoloncolon","\\Eqcolon"),L("\\coloncolonapprox","\\Colonapprox"),L("\\coloncolonsim","\\Colonsim"),L("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),L("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),L("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),L("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),L("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220C}}"),L("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),L("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),L("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),L("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),L("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),L("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),L("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),L("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),L("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}"),L("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}"),L("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}"),L("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}"),L("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}"),L("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}"),L("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}"),L("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}"),L("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}"),L("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}"),L("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228A}"),L("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2ACB}"),L("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228B}"),L("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2ACC}"),L("\\imath","\\html@mathml{\\@imath}{\u0131}"),L("\\jmath","\\html@mathml{\\@jmath}{\u0237}"),L("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27E6}}"),L("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27E7}}"),L("\u27E6","\\llbracket"),L("\u27E7","\\rrbracket"),L("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}"),L("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}"),L("\u2983","\\lBrace"),L("\u2984","\\rBrace"),L("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`\u29B5}}"),L("\u29B5","\\minuso"),L("\\darr","\\downarrow"),L("\\dArr","\\Downarrow"),L("\\Darr","\\Downarrow"),L("\\lang","\\langle"),L("\\rang","\\rangle"),L("\\uarr","\\uparrow"),L("\\uArr","\\Uparrow"),L("\\Uarr","\\Uparrow"),L("\\N","\\mathbb{N}"),L("\\R","\\mathbb{R}"),L("\\Z","\\mathbb{Z}"),L("\\alef","\\aleph"),L("\\alefsym","\\aleph"),L("\\Alpha","\\mathrm{A}"),L("\\Beta","\\mathrm{B}"),L("\\bull","\\bullet"),L("\\Chi","\\mathrm{X}"),L("\\clubs","\\clubsuit"),L("\\cnums","\\mathbb{C}"),L("\\Complex","\\mathbb{C}"),L("\\Dagger","\\ddagger"),L("\\diamonds","\\diamondsuit"),L("\\empty","\\emptyset"),L("\\Epsilon","\\mathrm{E}"),L("\\Eta","\\mathrm{H}"),L("\\exist","\\exists"),L("\\harr","\\leftrightarrow"),L("\\hArr","\\Leftrightarrow"),L("\\Harr","\\Leftrightarrow"),L("\\hearts","\\heartsuit"),L("\\image","\\Im"),L("\\infin","\\infty"),L("\\Iota","\\mathrm{I}"),L("\\isin","\\in"),L("\\Kappa","\\mathrm{K}"),L("\\larr","\\leftarrow"),L("\\lArr","\\Leftarrow"),L("\\Larr","\\Leftarrow"),L("\\lrarr","\\leftrightarrow"),L("\\lrArr","\\Leftrightarrow"),L("\\Lrarr","\\Leftrightarrow"),L("\\Mu","\\mathrm{M}"),L("\\natnums","\\mathbb{N}"),L("\\Nu","\\mathrm{N}"),L("\\Omicron","\\mathrm{O}"),L("\\plusmn","\\pm"),L("\\rarr","\\rightarrow"),L("\\rArr","\\Rightarrow"),L("\\Rarr","\\Rightarrow"),L("\\real","\\Re"),L("\\reals","\\mathbb{R}"),L("\\Reals","\\mathbb{R}"),L("\\Rho","\\mathrm{P}"),L("\\sdot","\\cdot"),L("\\sect","\\S"),L("\\spades","\\spadesuit"),L("\\sub","\\subset"),L("\\sube","\\subseteq"),L("\\supe","\\supseteq"),L("\\Tau","\\mathrm{T}"),L("\\thetasym","\\vartheta"),L("\\weierp","\\wp"),L("\\Zeta","\\mathrm{Z}"),L("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),L("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),L("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),L("\\bra","\\mathinner{\\langle{#1}|}"),L("\\ket","\\mathinner{|{#1}\\rangle}"),L("\\braket","\\mathinner{\\langle{#1}\\rangle}"),L("\\Bra","\\left\\langle#1\\right|"),L("\\Ket","\\left|#1\\right\\rangle");const jc=s=>a=>{const l=a.consumeArg().tokens,h=a.consumeArg().tokens,b=a.consumeArg().tokens,E=a.consumeArg().tokens,O=a.macros.get("|"),_=a.macros.get("\\|");a.macros.beginGroup();const V=pe=>Ee=>{s&&(Ee.macros.set("|",O),b.length&&Ee.macros.set("\\|",_));let Ye=pe;return!pe&&b.length&&Ee.future().text==="|"&&(Ee.popToken(),Ye=!0),{tokens:Ye?b:h,numArgs:0}};a.macros.set("|",V(!1)),b.length&&a.macros.set("\\|",V(!0));const te=a.consumeArg().tokens,de=a.expandTokens([...E,...te,...l]);return a.macros.endGroup(),{tokens:de.reverse(),numArgs:0}};L("\\bra@ket",jc(!1)),L("\\bra@set",jc(!0)),L("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),L("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),L("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),L("\\angln","{\\angl n}"),L("\\blue","\\textcolor{##6495ed}{#1}"),L("\\orange","\\textcolor{##ffa500}{#1}"),L("\\pink","\\textcolor{##ff00af}{#1}"),L("\\red","\\textcolor{##df0030}{#1}"),L("\\green","\\textcolor{##28ae7b}{#1}"),L("\\gray","\\textcolor{gray}{#1}"),L("\\purple","\\textcolor{##9d38bd}{#1}"),L("\\blueA","\\textcolor{##ccfaff}{#1}"),L("\\blueB","\\textcolor{##80f6ff}{#1}"),L("\\blueC","\\textcolor{##63d9ea}{#1}"),L("\\blueD","\\textcolor{##11accd}{#1}"),L("\\blueE","\\textcolor{##0c7f99}{#1}"),L("\\tealA","\\textcolor{##94fff5}{#1}"),L("\\tealB","\\textcolor{##26edd5}{#1}"),L("\\tealC","\\textcolor{##01d1c1}{#1}"),L("\\tealD","\\textcolor{##01a995}{#1}"),L("\\tealE","\\textcolor{##208170}{#1}"),L("\\greenA","\\textcolor{##b6ffb0}{#1}"),L("\\greenB","\\textcolor{##8af281}{#1}"),L("\\greenC","\\textcolor{##74cf70}{#1}"),L("\\greenD","\\textcolor{##1fab54}{#1}"),L("\\greenE","\\textcolor{##0d923f}{#1}"),L("\\goldA","\\textcolor{##ffd0a9}{#1}"),L("\\goldB","\\textcolor{##ffbb71}{#1}"),L("\\goldC","\\textcolor{##ff9c39}{#1}"),L("\\goldD","\\textcolor{##e07d10}{#1}"),L("\\goldE","\\textcolor{##a75a05}{#1}"),L("\\redA","\\textcolor{##fca9a9}{#1}"),L("\\redB","\\textcolor{##ff8482}{#1}"),L("\\redC","\\textcolor{##f9685d}{#1}"),L("\\redD","\\textcolor{##e84d39}{#1}"),L("\\redE","\\textcolor{##bc2612}{#1}"),L("\\maroonA","\\textcolor{##ffbde0}{#1}"),L("\\maroonB","\\textcolor{##ff92c6}{#1}"),L("\\maroonC","\\textcolor{##ed5fa6}{#1}"),L("\\maroonD","\\textcolor{##ca337c}{#1}"),L("\\maroonE","\\textcolor{##9e034e}{#1}"),L("\\purpleA","\\textcolor{##ddd7ff}{#1}"),L("\\purpleB","\\textcolor{##c6b9fc}{#1}"),L("\\purpleC","\\textcolor{##aa87ff}{#1}"),L("\\purpleD","\\textcolor{##7854ab}{#1}"),L("\\purpleE","\\textcolor{##543b78}{#1}"),L("\\mintA","\\textcolor{##f5f9e8}{#1}"),L("\\mintB","\\textcolor{##edf2df}{#1}"),L("\\mintC","\\textcolor{##e0e5cc}{#1}"),L("\\grayA","\\textcolor{##f6f7f7}{#1}"),L("\\grayB","\\textcolor{##f0f1f2}{#1}"),L("\\grayC","\\textcolor{##e3e5e6}{#1}"),L("\\grayD","\\textcolor{##d6d8da}{#1}"),L("\\grayE","\\textcolor{##babec2}{#1}"),L("\\grayF","\\textcolor{##888d93}{#1}"),L("\\grayG","\\textcolor{##626569}{#1}"),L("\\grayH","\\textcolor{##3b3e40}{#1}"),L("\\grayI","\\textcolor{##21242c}{#1}"),L("\\kaBlue","\\textcolor{##314453}{#1}"),L("\\kaGreen","\\textcolor{##71B307}{#1}");const Lc={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class xg{constructor(a,l,h){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=l,this.expansionCount=0,this.feed(a),this.macros=new bg(yg,l.macros),this.mode=h,this.stack=[]}feed(a){this.lexer=new Pc(a,this.settings)}switchMode(a){this.mode=a}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(a){this.stack.push(a)}pushTokens(a){this.stack.push(...a)}scanArgument(a){let l,h,b;if(a){if(this.consumeSpaces(),this.future().text!=="[")return null;l=this.popToken(),{tokens:b,end:h}=this.consumeArg(["]"])}else({tokens:b,start:l,end:h}=this.consumeArg());return this.pushToken(new cn("EOF",h.loc)),this.pushTokens(b),new cn("",on.range(l,h))}consumeSpaces(){for(;this.future().text===" ";)this.stack.pop()}consumeArg(a){const l=[],h=a&&a.length>0;h||this.consumeSpaces();const b=this.future();let E,O=0,_=0;do{if(E=this.popToken(),l.push(E),E.text==="{")++O;else if(E.text==="}"){if(--O,O===-1)throw new i("Extra }",E)}else if(E.text==="EOF")throw new i("Unexpected end of input in a macro argument, expected '"+(a&&h?a[_]:"}")+"'",E);if(a&&h)if((O===0||O===1&&a[_]==="{")&&E.text===a[_]){if(++_,_===a.length){l.splice(-_,_);break}}else _=0}while(O!==0||h);return b.text==="{"&&l[l.length-1].text==="}"&&(l.pop(),l.shift()),l.reverse(),{tokens:l,start:b,end:E}}consumeArgs(a,l){if(l){if(l.length!==a+1)throw new i("The length of delimiters doesn't match the number of args!");const b=l[0];for(let E=0;E<b.length;E++){const O=this.popToken();if(b[E]!==O.text)throw new i("Use of the macro doesn't match its definition",O)}}const h=[];for(let b=0;b<a;b++)h.push(this.consumeArg(l&&l[b+1]).tokens);return h}countExpansion(a){if(this.expansionCount+=a,this.expansionCount>this.settings.maxExpand)throw new i("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(a){const l=this.popToken(),h=l.text,b=l.noexpand?null:this._getExpansion(h);if(b==null||a&&b.unexpandable){if(a&&b==null&&h[0]==="\\"&&!this.isDefined(h))throw new i("Undefined control sequence: "+h);return this.pushToken(l),!1}this.countExpansion(1);let E=b.tokens;const O=this.consumeArgs(b.numArgs,b.delimiters);if(b.numArgs){E=E.slice();for(let _=E.length-1;_>=0;--_){let V=E[_];if(V.text==="#"){if(_===0)throw new i("Incomplete placeholder at end of macro body",V);if(V=E[--_],V.text==="#")E.splice(_+1,1);else if(/^[1-9]$/.test(V.text))E.splice(_,2,...O[+V.text-1]);else throw new i("Not a valid argument number",V)}}}return this.pushTokens(E),E.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){const a=this.stack.pop();return a.treatAsRelax&&(a.text="\\relax"),a}throw new Error}expandMacro(a){return this.macros.has(a)?this.expandTokens([new cn(a)]):void 0}expandTokens(a){const l=[],h=this.stack.length;for(this.pushTokens(a);this.stack.length>h;)if(this.expandOnce(!0)===!1){const b=this.stack.pop();b.treatAsRelax&&(b.noexpand=!1,b.treatAsRelax=!1),l.push(b)}return this.countExpansion(l.length),l}expandMacroAsText(a){const l=this.expandMacro(a);return l&&l.map(h=>h.text).join("")}_getExpansion(a){const l=this.macros.get(a);if(l==null)return l;if(a.length===1){const b=this.lexer.catcodes[a];if(b!=null&&b!==13)return}const h=typeof l=="function"?l(this):l;if(typeof h=="string"){let b=0;if(h.indexOf("#")!==-1){const V=h.replace(/##/g,"");for(;V.indexOf("#"+(b+1))!==-1;)++b}const E=new Pc(h,this.settings),O=[];let _=E.lex();for(;_.text!=="EOF";)O.push(_),_=E.lex();return O.reverse(),{tokens:O,numArgs:b}}return h}isDefined(a){return this.macros.has(a)||to.hasOwnProperty(a)||Vt.math.hasOwnProperty(a)||Vt.text.hasOwnProperty(a)||Lc.hasOwnProperty(a)}isExpandable(a){const l=this.macros.get(a);return l!=null?typeof l=="string"||typeof l=="function"||!l.unexpandable:to.hasOwnProperty(a)&&!to[a].primitive}}const Hc=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,mi=Object.freeze({"\u208A":"+","\u208B":"-","\u208C":"=","\u208D":"(","\u208E":")","\u2080":"0","\u2081":"1","\u2082":"2","\u2083":"3","\u2084":"4","\u2085":"5","\u2086":"6","\u2087":"7","\u2088":"8","\u2089":"9","\u2090":"a","\u2091":"e","\u2095":"h","\u1D62":"i","\u2C7C":"j","\u2096":"k","\u2097":"l","\u2098":"m","\u2099":"n","\u2092":"o","\u209A":"p","\u1D63":"r","\u209B":"s","\u209C":"t","\u1D64":"u","\u1D65":"v","\u2093":"x","\u1D66":"\u03B2","\u1D67":"\u03B3","\u1D68":"\u03C1","\u1D69":"\u03D5","\u1D6A":"\u03C7","\u207A":"+","\u207B":"-","\u207C":"=","\u207D":"(","\u207E":")","\u2070":"0","\xB9":"1","\xB2":"2","\xB3":"3","\u2074":"4","\u2075":"5","\u2076":"6","\u2077":"7","\u2078":"8","\u2079":"9","\u1D2C":"A","\u1D2E":"B","\u1D30":"D","\u1D31":"E","\u1D33":"G","\u1D34":"H","\u1D35":"I","\u1D36":"J","\u1D37":"K","\u1D38":"L","\u1D39":"M","\u1D3A":"N","\u1D3C":"O","\u1D3E":"P","\u1D3F":"R","\u1D40":"T","\u1D41":"U","\u2C7D":"V","\u1D42":"W","\u1D43":"a","\u1D47":"b","\u1D9C":"c","\u1D48":"d","\u1D49":"e","\u1DA0":"f","\u1D4D":"g",\u02B0:"h","\u2071":"i",\u02B2:"j","\u1D4F":"k",\u02E1:"l","\u1D50":"m",\u207F:"n","\u1D52":"o","\u1D56":"p",\u02B3:"r",\u02E2:"s","\u1D57":"t","\u1D58":"u","\u1D5B":"v",\u02B7:"w",\u02E3:"x",\u02B8:"y","\u1DBB":"z","\u1D5D":"\u03B2","\u1D5E":"\u03B3","\u1D5F":"\u03B4","\u1D60":"\u03D5","\u1D61":"\u03C7","\u1DBF":"\u03B8"}),il={"\u0301":{text:"\\'",math:"\\acute"},"\u0300":{text:"\\`",math:"\\grave"},"\u0308":{text:'\\"',math:"\\ddot"},"\u0303":{text:"\\~",math:"\\tilde"},"\u0304":{text:"\\=",math:"\\bar"},"\u0306":{text:"\\u",math:"\\breve"},"\u030C":{text:"\\v",math:"\\check"},"\u0302":{text:"\\^",math:"\\hat"},"\u0307":{text:"\\.",math:"\\dot"},"\u030A":{text:"\\r",math:"\\mathring"},"\u030B":{text:"\\H"},"\u0327":{text:"\\c"}},qc={\u00E1:"a\u0301",\u00E0:"a\u0300",\u00E4:"a\u0308",\u01DF:"a\u0308\u0304",\u00E3:"a\u0303",\u0101:"a\u0304",\u0103:"a\u0306",\u1EAF:"a\u0306\u0301",\u1EB1:"a\u0306\u0300",\u1EB5:"a\u0306\u0303",\u01CE:"a\u030C",\u00E2:"a\u0302",\u1EA5:"a\u0302\u0301",\u1EA7:"a\u0302\u0300",\u1EAB:"a\u0302\u0303",\u0227:"a\u0307",\u01E1:"a\u0307\u0304",\u00E5:"a\u030A",\u01FB:"a\u030A\u0301",\u1E03:"b\u0307",\u0107:"c\u0301",\u1E09:"c\u0327\u0301",\u010D:"c\u030C",\u0109:"c\u0302",\u010B:"c\u0307",\u00E7:"c\u0327",\u010F:"d\u030C",\u1E0B:"d\u0307",\u1E11:"d\u0327",\u00E9:"e\u0301",\u00E8:"e\u0300",\u00EB:"e\u0308",\u1EBD:"e\u0303",\u0113:"e\u0304",\u1E17:"e\u0304\u0301",\u1E15:"e\u0304\u0300",\u0115:"e\u0306",\u1E1D:"e\u0327\u0306",\u011B:"e\u030C",\u00EA:"e\u0302",\u1EBF:"e\u0302\u0301",\u1EC1:"e\u0302\u0300",\u1EC5:"e\u0302\u0303",\u0117:"e\u0307",\u0229:"e\u0327",\u1E1F:"f\u0307",\u01F5:"g\u0301",\u1E21:"g\u0304",\u011F:"g\u0306",\u01E7:"g\u030C",\u011D:"g\u0302",\u0121:"g\u0307",\u0123:"g\u0327",\u1E27:"h\u0308",\u021F:"h\u030C",\u0125:"h\u0302",\u1E23:"h\u0307",\u1E29:"h\u0327",\u00ED:"i\u0301",\u00EC:"i\u0300",\u00EF:"i\u0308",\u1E2F:"i\u0308\u0301",\u0129:"i\u0303",\u012B:"i\u0304",\u012D:"i\u0306",\u01D0:"i\u030C",\u00EE:"i\u0302",\u01F0:"j\u030C",\u0135:"j\u0302",\u1E31:"k\u0301",\u01E9:"k\u030C",\u0137:"k\u0327",\u013A:"l\u0301",\u013E:"l\u030C",\u013C:"l\u0327",\u1E3F:"m\u0301",\u1E41:"m\u0307",\u0144:"n\u0301",\u01F9:"n\u0300",\u00F1:"n\u0303",\u0148:"n\u030C",\u1E45:"n\u0307",\u0146:"n\u0327",\u00F3:"o\u0301",\u00F2:"o\u0300",\u00F6:"o\u0308",\u022B:"o\u0308\u0304",\u00F5:"o\u0303",\u1E4D:"o\u0303\u0301",\u1E4F:"o\u0303\u0308",\u022D:"o\u0303\u0304",\u014D:"o\u0304",\u1E53:"o\u0304\u0301",\u1E51:"o\u0304\u0300",\u014F:"o\u0306",\u01D2:"o\u030C",\u00F4:"o\u0302",\u1ED1:"o\u0302\u0301",\u1ED3:"o\u0302\u0300",\u1ED7:"o\u0302\u0303",\u022F:"o\u0307",\u0231:"o\u0307\u0304",\u0151:"o\u030B",\u1E55:"p\u0301",\u1E57:"p\u0307",\u0155:"r\u0301",\u0159:"r\u030C",\u1E59:"r\u0307",\u0157:"r\u0327",\u015B:"s\u0301",\u1E65:"s\u0301\u0307",\u0161:"s\u030C",\u1E67:"s\u030C\u0307",\u015D:"s\u0302",\u1E61:"s\u0307",\u015F:"s\u0327",\u1E97:"t\u0308",\u0165:"t\u030C",\u1E6B:"t\u0307",\u0163:"t\u0327",\u00FA:"u\u0301",\u00F9:"u\u0300",\u00FC:"u\u0308",\u01D8:"u\u0308\u0301",\u01DC:"u\u0308\u0300",\u01D6:"u\u0308\u0304",\u01DA:"u\u0308\u030C",\u0169:"u\u0303",\u1E79:"u\u0303\u0301",\u016B:"u\u0304",\u1E7B:"u\u0304\u0308",\u016D:"u\u0306",\u01D4:"u\u030C",\u00FB:"u\u0302",\u016F:"u\u030A",\u0171:"u\u030B",\u1E7D:"v\u0303",\u1E83:"w\u0301",\u1E81:"w\u0300",\u1E85:"w\u0308",\u0175:"w\u0302",\u1E87:"w\u0307",\u1E98:"w\u030A",\u1E8D:"x\u0308",\u1E8B:"x\u0307",\u00FD:"y\u0301",\u1EF3:"y\u0300",\u00FF:"y\u0308",\u1EF9:"y\u0303",\u0233:"y\u0304",\u0177:"y\u0302",\u1E8F:"y\u0307",\u1E99:"y\u030A",\u017A:"z\u0301",\u017E:"z\u030C",\u1E91:"z\u0302",\u017C:"z\u0307",\u00C1:"A\u0301",\u00C0:"A\u0300",\u00C4:"A\u0308",\u01DE:"A\u0308\u0304",\u00C3:"A\u0303",\u0100:"A\u0304",\u0102:"A\u0306",\u1EAE:"A\u0306\u0301",\u1EB0:"A\u0306\u0300",\u1EB4:"A\u0306\u0303",\u01CD:"A\u030C",\u00C2:"A\u0302",\u1EA4:"A\u0302\u0301",\u1EA6:"A\u0302\u0300",\u1EAA:"A\u0302\u0303",\u0226:"A\u0307",\u01E0:"A\u0307\u0304",\u00C5:"A\u030A",\u01FA:"A\u030A\u0301",\u1E02:"B\u0307",\u0106:"C\u0301",\u1E08:"C\u0327\u0301",\u010C:"C\u030C",\u0108:"C\u0302",\u010A:"C\u0307",\u00C7:"C\u0327",\u010E:"D\u030C",\u1E0A:"D\u0307",\u1E10:"D\u0327",\u00C9:"E\u0301",\u00C8:"E\u0300",\u00CB:"E\u0308",\u1EBC:"E\u0303",\u0112:"E\u0304",\u1E16:"E\u0304\u0301",\u1E14:"E\u0304\u0300",\u0114:"E\u0306",\u1E1C:"E\u0327\u0306",\u011A:"E\u030C",\u00CA:"E\u0302",\u1EBE:"E\u0302\u0301",\u1EC0:"E\u0302\u0300",\u1EC4:"E\u0302\u0303",\u0116:"E\u0307",\u0228:"E\u0327",\u1E1E:"F\u0307",\u01F4:"G\u0301",\u1E20:"G\u0304",\u011E:"G\u0306",\u01E6:"G\u030C",\u011C:"G\u0302",\u0120:"G\u0307",\u0122:"G\u0327",\u1E26:"H\u0308",\u021E:"H\u030C",\u0124:"H\u0302",\u1E22:"H\u0307",\u1E28:"H\u0327",\u00CD:"I\u0301",\u00CC:"I\u0300",\u00CF:"I\u0308",\u1E2E:"I\u0308\u0301",\u0128:"I\u0303",\u012A:"I\u0304",\u012C:"I\u0306",\u01CF:"I\u030C",\u00CE:"I\u0302",\u0130:"I\u0307",\u0134:"J\u0302",\u1E30:"K\u0301",\u01E8:"K\u030C",\u0136:"K\u0327",\u0139:"L\u0301",\u013D:"L\u030C",\u013B:"L\u0327",\u1E3E:"M\u0301",\u1E40:"M\u0307",\u0143:"N\u0301",\u01F8:"N\u0300",\u00D1:"N\u0303",\u0147:"N\u030C",\u1E44:"N\u0307",\u0145:"N\u0327",\u00D3:"O\u0301",\u00D2:"O\u0300",\u00D6:"O\u0308",\u022A:"O\u0308\u0304",\u00D5:"O\u0303",\u1E4C:"O\u0303\u0301",\u1E4E:"O\u0303\u0308",\u022C:"O\u0303\u0304",\u014C:"O\u0304",\u1E52:"O\u0304\u0301",\u1E50:"O\u0304\u0300",\u014E:"O\u0306",\u01D1:"O\u030C",\u00D4:"O\u0302",\u1ED0:"O\u0302\u0301",\u1ED2:"O\u0302\u0300",\u1ED6:"O\u0302\u0303",\u022E:"O\u0307",\u0230:"O\u0307\u0304",\u0150:"O\u030B",\u1E54:"P\u0301",\u1E56:"P\u0307",\u0154:"R\u0301",\u0158:"R\u030C",\u1E58:"R\u0307",\u0156:"R\u0327",\u015A:"S\u0301",\u1E64:"S\u0301\u0307",\u0160:"S\u030C",\u1E66:"S\u030C\u0307",\u015C:"S\u0302",\u1E60:"S\u0307",\u015E:"S\u0327",\u0164:"T\u030C",\u1E6A:"T\u0307",\u0162:"T\u0327",\u00DA:"U\u0301",\u00D9:"U\u0300",\u00DC:"U\u0308",\u01D7:"U\u0308\u0301",\u01DB:"U\u0308\u0300",\u01D5:"U\u0308\u0304",\u01D9:"U\u0308\u030C",\u0168:"U\u0303",\u1E78:"U\u0303\u0301",\u016A:"U\u0304",\u1E7A:"U\u0304\u0308",\u016C:"U\u0306",\u01D3:"U\u030C",\u00DB:"U\u0302",\u016E:"U\u030A",\u0170:"U\u030B",\u1E7C:"V\u0303",\u1E82:"W\u0301",\u1E80:"W\u0300",\u1E84:"W\u0308",\u0174:"W\u0302",\u1E86:"W\u0307",\u1E8C:"X\u0308",\u1E8A:"X\u0307",\u00DD:"Y\u0301",\u1EF2:"Y\u0300",\u0178:"Y\u0308",\u1EF8:"Y\u0303",\u0232:"Y\u0304",\u0176:"Y\u0302",\u1E8E:"Y\u0307",\u0179:"Z\u0301",\u017D:"Z\u030C",\u1E90:"Z\u0302",\u017B:"Z\u0307",\u03AC:"\u03B1\u0301",\u1F70:"\u03B1\u0300",\u1FB1:"\u03B1\u0304",\u1FB0:"\u03B1\u0306",\u03AD:"\u03B5\u0301",\u1F72:"\u03B5\u0300",\u03AE:"\u03B7\u0301",\u1F74:"\u03B7\u0300",\u03AF:"\u03B9\u0301",\u1F76:"\u03B9\u0300",\u03CA:"\u03B9\u0308",\u0390:"\u03B9\u0308\u0301",\u1FD2:"\u03B9\u0308\u0300",\u1FD1:"\u03B9\u0304",\u1FD0:"\u03B9\u0306",\u03CC:"\u03BF\u0301",\u1F78:"\u03BF\u0300",\u03CD:"\u03C5\u0301",\u1F7A:"\u03C5\u0300",\u03CB:"\u03C5\u0308",\u03B0:"\u03C5\u0308\u0301",\u1FE2:"\u03C5\u0308\u0300",\u1FE1:"\u03C5\u0304",\u1FE0:"\u03C5\u0306",\u03CE:"\u03C9\u0301",\u1F7C:"\u03C9\u0300",\u038E:"\u03A5\u0301",\u1FEA:"\u03A5\u0300",\u03AB:"\u03A5\u0308",\u1FE9:"\u03A5\u0304",\u1FE8:"\u03A5\u0306",\u038F:"\u03A9\u0301",\u1FFA:"\u03A9\u0300"};class gi{constructor(a,l){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 xg(a,l,this.mode),this.settings=l,this.leftrightDepth=0}expect(a,l){if(l===void 0&&(l=!0),this.fetch().text!==a)throw new i("Expected '"+a+"', got '"+this.fetch().text+"'",this.fetch());l&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(a){this.mode=a,this.gullet.switchMode(a)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{const a=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),a}finally{this.gullet.endGroups()}}subparse(a){const l=this.nextToken;this.consume(),this.gullet.pushToken(new cn("}")),this.gullet.pushTokens(a);const h=this.parseExpression(!1);return this.expect("}"),this.nextToken=l,h}parseExpression(a,l){const h=[];for(;;){this.mode==="math"&&this.consumeSpaces();const b=this.fetch();if(gi.endOfExpression.indexOf(b.text)!==-1||l&&b.text===l||a&&to[b.text]&&to[b.text].infix)break;const E=this.parseAtom(l);if(E){if(E.type==="internal")continue}else break;h.push(E)}return this.mode==="text"&&this.formLigatures(h),this.handleInfixNodes(h)}handleInfixNodes(a){let l=-1,h;for(let b=0;b<a.length;b++)if(a[b].type==="infix"){if(l!==-1)throw new i("only one infix operator per group",a[b].token);l=b,h=a[b].replaceWith}if(l!==-1&&h){let b,E;const O=a.slice(0,l),_=a.slice(l+1);O.length===1&&O[0].type==="ordgroup"?b=O[0]:b={type:"ordgroup",mode:this.mode,body:O},_.length===1&&_[0].type==="ordgroup"?E=_[0]:E={type:"ordgroup",mode:this.mode,body:_};let V;return h==="\\\\abovefrac"?V=this.callFunction(h,[b,a[l],E],[]):V=this.callFunction(h,[b,E],[]),[V]}else return a}handleSupSubscript(a){const l=this.fetch(),h=l.text;this.consume(),this.consumeSpaces();let b;do{var E;b=this.parseGroup(a)}while(((E=b)==null?void 0:E.type)==="internal");if(!b)throw new i("Expected group after '"+h+"'",l);return b}formatUnsupportedCmd(a){const l=[];for(let b=0;b<a.length;b++)l.push({type:"textord",mode:"text",text:a[b]});const h={type:"text",mode:this.mode,body:l};return{type:"color",mode:this.mode,color:this.settings.errorColor,body:[h]}}parseAtom(a){const l=this.parseGroup("atom",a);if((l==null?void 0:l.type)==="internal"||this.mode==="text")return l;let h,b;for(;;){this.consumeSpaces();const E=this.fetch();if(E.text==="\\limits"||E.text==="\\nolimits"){if(l&&l.type==="op"){const O=E.text==="\\limits";l.limits=O,l.alwaysHandleSupSub=!0}else if(l&&l.type==="operatorname")l.alwaysHandleSupSub&&(l.limits=E.text==="\\limits");else throw new i("Limit controls must follow a math operator",E);this.consume()}else if(E.text==="^"){if(h)throw new i("Double superscript",E);h=this.handleSupSubscript("superscript")}else if(E.text==="_"){if(b)throw new i("Double subscript",E);b=this.handleSupSubscript("subscript")}else if(E.text==="'"){if(h)throw new i("Double superscript",E);const O={type:"textord",mode:this.mode,text:"\\prime"},_=[O];for(this.consume();this.fetch().text==="'";)_.push(O),this.consume();this.fetch().text==="^"&&_.push(this.handleSupSubscript("superscript")),h={type:"ordgroup",mode:this.mode,body:_}}else if(mi[E.text]){const O=Hc.test(E.text),_=[];for(_.push(new cn(mi[E.text])),this.consume();;){const te=this.fetch().text;if(!mi[te]||Hc.test(te)!==O)break;_.unshift(new cn(mi[te])),this.consume()}const V=this.subparse(_);O?b={type:"ordgroup",mode:"math",body:V}:h={type:"ordgroup",mode:"math",body:V}}else break}return h||b?{type:"supsub",mode:this.mode,base:l,sup:h,sub:b}:l}parseFunction(a,l){const h=this.fetch(),b=h.text,E=to[b];if(!E)return null;if(this.consume(),l&&l!=="atom"&&!E.allowedInArgument)throw new i("Got function '"+b+"' with no arguments"+(l?" as "+l:""),h);if(this.mode==="text"&&!E.allowedInText)throw new i("Can't use function '"+b+"' in text mode",h);if(this.mode==="math"&&E.allowedInMath===!1)throw new i("Can't use function '"+b+"' in math mode",h);const{args:O,optArgs:_}=this.parseArguments(b,E);return this.callFunction(b,O,_,h,a)}callFunction(a,l,h,b,E){const O={funcName:a,parser:this,token:b,breakOnTokenText:E},_=to[a];if(_&&_.handler)return _.handler(O,l,h);throw new i("No function handler for "+a)}parseArguments(a,l){const h=l.numArgs+l.numOptionalArgs;if(h===0)return{args:[],optArgs:[]};const b=[],E=[];for(let O=0;O<h;O++){let _=l.argTypes&&l.argTypes[O];const V=O<l.numOptionalArgs;(l.primitive&&_==null||l.type==="sqrt"&&O===1&&E[0]==null)&&(_="primitive");const te=this.parseGroupOfType("argument to '"+a+"'",_,V);if(V)E.push(te);else if(te!=null)b.push(te);else throw new i("Null argument, please report this as a bug")}return{args:b,optArgs:E}}parseGroupOfType(a,l,h){switch(l){case"color":return this.parseColorGroup(h);case"size":return this.parseSizeGroup(h);case"url":return this.parseUrlGroup(h);case"math":case"text":return this.parseArgumentGroup(h,l);case"hbox":{const b=this.parseArgumentGroup(h,"text");return b!=null?{type:"styling",mode:b.mode,body:[b],style:"text"}:null}case"raw":{const b=this.parseStringGroup("raw",h);return b!=null?{type:"raw",mode:"text",string:b.text}:null}case"primitive":{if(h)throw new i("A primitive argument cannot be optional");const b=this.parseGroup(a);if(b==null)throw new i("Expected group as "+a,this.fetch());return b}case"original":case null:case void 0:return this.parseArgumentGroup(h);default:throw new i("Unknown group type as "+a,this.fetch())}}consumeSpaces(){for(;this.fetch().text===" ";)this.consume()}parseStringGroup(a,l){const h=this.gullet.scanArgument(l);if(h==null)return null;let b="",E;for(;(E=this.fetch()).text!=="EOF";)b+=E.text,this.consume();return this.consume(),h.text=b,h}parseRegexGroup(a,l){const h=this.fetch();let b=h,E="",O;for(;(O=this.fetch()).text!=="EOF"&&a.test(E+O.text);)b=O,E+=b.text,this.consume();if(E==="")throw new i("Invalid "+l+": '"+h.text+"'",h);return h.range(b,E)}parseColorGroup(a){const l=this.parseStringGroup("color",a);if(l==null)return null;const h=/^(#[a-f0-9]{3,4}|#[a-f0-9]{6}|#[a-f0-9]{8}|[a-f0-9]{6}|[a-z]+)$/i.exec(l.text);if(!h)throw new i("Invalid color: '"+l.text+"'",l);let b=h[0];return/^[0-9a-f]{6}$/i.test(b)&&(b="#"+b),{type:"color-token",mode:this.mode,color:b}}parseSizeGroup(a){let l,h=!1;if(this.gullet.consumeSpaces(),!a&&this.gullet.future().text!=="{"?l=this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size"):l=this.parseStringGroup("size",a),!l)return null;!a&&l.text.length===0&&(l.text="0pt",h=!0);const b=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(l.text);if(!b)throw new i("Invalid size: '"+l.text+"'",l);const E={number:+(b[1]+b[2]),unit:b[3]};if(!yt(E))throw new i("Invalid unit: '"+E.unit+"'",l);return{type:"size",mode:this.mode,value:E,isBlank:h}}parseUrlGroup(a){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);const l=this.parseStringGroup("url",a);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),l==null)return null;const h=l.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:h}}parseArgumentGroup(a,l){const h=this.gullet.scanArgument(a);if(h==null)return null;const b=this.mode;l&&this.switchMode(l),this.gullet.beginGroup();const E=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();const O={type:"ordgroup",mode:this.mode,loc:h.loc,body:E};return l&&this.switchMode(b),O}parseGroup(a,l){const h=this.fetch(),b=h.text;let E;if(b==="{"||b==="\\begingroup"){this.consume();const O=b==="{"?"}":"\\endgroup";this.gullet.beginGroup();const _=this.parseExpression(!1,O),V=this.fetch();this.expect(O),this.gullet.endGroup(),E={type:"ordgroup",mode:this.mode,loc:on.range(h,V),body:_,semisimple:b==="\\begingroup"||void 0}}else if(E=this.parseFunction(l,a)||this.parseSymbol(),E==null&&b[0]==="\\"&&!Lc.hasOwnProperty(b)){if(this.settings.throwOnError)throw new i("Undefined control sequence: "+b,h);E=this.formatUnsupportedCmd(b),this.consume()}return E}formLigatures(a){let l=a.length-1;for(let h=0;h<l;++h){const b=a[h],E=b.text;E==="-"&&a[h+1].text==="-"&&(h+1<l&&a[h+2].text==="-"?(a.splice(h,3,{type:"textord",mode:"text",loc:on.range(b,a[h+2]),text:"---"}),l-=2):(a.splice(h,2,{type:"textord",mode:"text",loc:on.range(b,a[h+1]),text:"--"}),l-=1)),(E==="'"||E==="`")&&a[h+1].text===E&&(a.splice(h,2,{type:"textord",mode:"text",loc:on.range(b,a[h+1]),text:E+E}),l-=1)}}parseSymbol(){const a=this.fetch();let l=a.text;if(/^\\verb[^a-zA-Z]/.test(l)){this.consume();let E=l.slice(5);const O=E.charAt(0)==="*";if(O&&(E=E.slice(1)),E.length<2||E.charAt(0)!==E.slice(-1))throw new i(`\\verb assertion failed --
|
|
475
|
-
please report what input caused this bug`);return E=E.slice(1,-1),{type:"verb",mode:"text",body:E,star:O}}qc.hasOwnProperty(l[0])&&!Vt[this.mode][l[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+l[0]+'" used in math mode',a),l=qc[l[0]]+l.slice(1));const h=gg.exec(l);h&&(l=l.substring(0,h.index),l==="i"?l="\u0131":l==="j"&&(l="\u0237"));let b;if(Vt[this.mode][l]){this.settings.strict&&this.mode==="math"&&Ue.indexOf(l)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+l[0]+'" used in math mode',a);const E=Vt[this.mode][l].group,O=on.range(a);let _;if(Ir.hasOwnProperty(E)){const V=E;_={type:"atom",mode:this.mode,family:V,loc:O,text:l}}else _={type:E,mode:this.mode,loc:O,text:l};b=_}else if(l.charCodeAt(0)>=128)this.settings.strict&&(Ae(l.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+l[0]+'" used in math mode',a):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+l[0]+'"'+(" ("+l.charCodeAt(0)+")"),a)),b={type:"textord",mode:"text",loc:on.range(a),text:l};else return null;if(this.consume(),h)for(let E=0;E<h[0].length;E++){const O=h[0][E];if(!il[O])throw new i("Unknown accent ' "+O+"'",a);const _=il[O][this.mode]||il[O].text;if(!_)throw new i("Accent "+O+" unsupported in "+this.mode+" mode",a);b={type:"accent",mode:this.mode,loc:on.range(a),label:_,isStretchy:!1,isShifty:!0,base:b}}return b}}gi.endOfExpression=["}","\\endgroup","\\end","\\right","&"];var sl=function(s,a){if(!(typeof s=="string"||s instanceof String))throw new TypeError("KaTeX can only parse string typed expression");const l=new gi(s,a);delete l.gullet.macros.current["\\df@tag"];let h=l.parse();if(delete l.gullet.macros.current["\\current@color"],delete l.gullet.macros.current["\\color"],l.gullet.macros.get("\\df@tag")){if(!a.displayMode)throw new i("\\tag works only in display equations");h=[{type:"tag",mode:"text",body:h,tag:l.subparse([new cn("\\df@tag")])}]}return h};let Kc=function(s,a,l){a.textContent="";const h=ll(s,l).toNode();a.appendChild(h)};typeof document<"u"&&document.compatMode!=="CSS1Compat"&&(typeof console<"u"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),Kc=function(){throw new i("KaTeX doesn't work in quirks mode.")});const wg=function(s,a){return ll(s,a).toMarkup()},Cg=function(s,a){const l=new S(a);return sl(s,l)},Wc=function(s,a,l){if(l.throwOnError||!(s instanceof i))throw s;const h=me.makeSpan(["katex-error"],[new Dt(a)]);return h.setAttribute("title",s.toString()),h.setAttribute("style","color:"+l.errorColor),h},ll=function(s,a){const l=new S(a);try{const h=sl(s,l);return zm(h,s,l)}catch(h){return Wc(h,s,l)}};var Dg={version:"0.16.25",render:Kc,renderToString:wg,ParseError:i,SETTINGS_SCHEMA:m,__parse:Cg,__renderToDomTree:ll,__renderToHTMLTree:function(s,a){const l=new S(a);try{const h=sl(s,l);return _m(h,s,l)}catch(h){return Wc(h,s,l)}},__setFontMetrics:ut,__defineSymbol:y,__defineFunction:et,__defineMacro:L,__domTree:{Span:Ct,Anchor:_t,SymbolNode:Dt,SvgNode:Fr,PathNode:br,LineNode:or}},kg=Dg;return n=n.default,n})()})})(W0)),W0.exports}var iw=Ki.exports,qh;function sw(){return qh||(qh=1,(function(e,t){(function(r,n){n(t,He,nw(),aw())})(iw,function(r,n,o,i){Object.defineProperty(r,"__esModule",{value:!0});function c(m,A){for(var S in A)Object.defineProperty(m,S,{enumerable:!0,get:A[S]})}c(r,{BlockMath:()=>w,InlineMath:()=>C}),n=d(n),o=u(o),i=u(i);function u(m){return m&&m.__esModule?m:{default:m}}function f(m){if(typeof WeakMap!="function")return null;var A=new WeakMap,S=new WeakMap;return(f=function(D){return D?S:A})(m)}function d(m,A){if(m&&m.__esModule)return m;if(m===null||typeof m!="object"&&typeof m!="function")return{default:m};var S=f(A);if(S&&S.has(m))return S.get(m);var D={},$=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var F in m)if(F!=="default"&&Object.prototype.hasOwnProperty.call(m,F)){var B=$?Object.getOwnPropertyDescriptor(m,F):null;B&&(B.get||B.set)?Object.defineProperty(D,F,B):D[F]=m[F]}return D.default=m,S&&S.set(m,D),D}const p=(m,{displayMode:A})=>{const S=({children:D,errorColor:$,math:F,renderError:B})=>{const R=F??D,{html:I,error:T}=(0,n.useMemo)(()=>{try{return{html:i.default.renderToString(R,{displayMode:A,errorColor:$,throwOnError:!!B}),error:void 0}}catch(W){if(W instanceof i.default.ParseError||W instanceof TypeError)return{error:W};throw W}},[R,$,B]);return T?B?B(T):n.default.createElement(m,{html:`${T.message}`}):n.default.createElement(m,{html:I})};return S.propTypes={children:o.default.string,errorColor:o.default.string,math:o.default.string,renderError:o.default.func},S},v={html:o.default.string.isRequired},g=({html:m})=>n.default.createElement("div",{"data-testid":"react-katex",dangerouslySetInnerHTML:{__html:m}});g.propTypes=v;const x=({html:m})=>n.default.createElement("span",{"data-testid":"react-katex",dangerouslySetInnerHTML:{__html:m}});x.propTypes=v;const w=p(g,{displayMode:!0}),C=p(x,{displayMode:!1})})})(Ki,Ki.exports)),Ki.exports}var Am=sw();const lw=Le.span.attrs({className:"latex-inline-wrapper"})`
|
|
476
|
-
display: inline-flex;
|
|
477
|
-
align-items: baseline;
|
|
478
|
-
column-gap: 4px;
|
|
479
|
-
line-height: 1.2;
|
|
480
|
-
color: ${({$color:e})=>e||"inherit"};
|
|
481
|
-
`,uw=Le.span.attrs({className:"latex-inline-error"})`
|
|
482
|
-
display: inline-flex;
|
|
483
|
-
align-items: center;
|
|
484
|
-
column-gap: 6px;
|
|
485
|
-
padding: 2px 4px;
|
|
486
|
-
border-radius: 4px;
|
|
487
|
-
background: rgba(215, 58, 73, 0.08);
|
|
488
|
-
color: #d73a49;
|
|
489
|
-
font-size: 0.85em;
|
|
490
|
-
`,cw=Le.span.attrs({className:"latex-inline-error-message"})`
|
|
491
|
-
font-size: 0.75em;
|
|
492
|
-
color: #d73a49;
|
|
493
|
-
`,dw=({attributes:e,formula:t,styles:r})=>{var i;const n=ht(()=>(t||"").trim(),[t]),o=(i=r==null?void 0:r.text)==null?void 0:i.color;return n?q.jsx(lw,{...e,$color:o,children:q.jsx(Am.InlineMath,{math:n,errorColor:"#d73a49",renderError:c=>q.jsxs(uw,{children:[q.jsx("span",{children:n}),q.jsx(cw,{children:c==null?void 0:c.message})]})})}):null},fw=Le.div.attrs({className:"latex-block-wrapper"})`
|
|
494
|
-
width: 100%;
|
|
495
|
-
display: flex;
|
|
496
|
-
justify-content: center;
|
|
497
|
-
align-items: center;
|
|
498
|
-
margin: 1.25rem 0;
|
|
499
|
-
padding: 0.75rem;
|
|
500
|
-
border-radius: 8px;
|
|
501
|
-
background: rgba(2, 132, 199, 0.05);
|
|
502
|
-
color: ${({$textColor:e})=>e||"inherit"};
|
|
503
|
-
`,hw=Le.div.attrs({className:"latex-block-error"})`
|
|
504
|
-
display: flex;
|
|
505
|
-
flex-direction: column;
|
|
506
|
-
width: 100%;
|
|
507
|
-
gap: 6px;
|
|
508
|
-
padding: 0.75rem;
|
|
509
|
-
background: rgba(215, 58, 73, 0.08);
|
|
510
|
-
border: 1px dashed #d73a49;
|
|
511
|
-
border-radius: 8px;
|
|
512
|
-
font-size: 0.9rem;
|
|
513
|
-
color: #d73a49;
|
|
514
|
-
`,pw=Le.span.attrs({className:"latex-block-error-title"})`
|
|
515
|
-
font-weight: 600;
|
|
516
|
-
`,mw=Le.code.attrs({className:"latex-block-error-formula"})`
|
|
517
|
-
font-size: 0.85rem;
|
|
518
|
-
color: #d73a49;
|
|
519
|
-
overflow-x: auto;
|
|
520
|
-
`,gw=({attributes:e,formula:t,styles:r})=>{var i;const n=ht(()=>(t||"").trim(),[t]),o=(i=r==null?void 0:r.text)==null?void 0:i.color;return n?q.jsx(fw,{...e,$textColor:o,children:q.jsx(Am.BlockMath,{math:n,errorColor:"#d73a49",renderError:c=>q.jsxs(hw,{children:[q.jsx(pw,{children:"\u516C\u5F0F\u6E32\u67D3\u5931\u8D25"}),q.jsx(mw,{children:n}),q.jsx("span",{children:c==null?void 0:c.message})]})})}):null};/**
|
|
521
|
-
* @license lucide-react v0.456.0 - ISC
|
|
522
|
-
*
|
|
523
|
-
* This source code is licensed under the ISC license.
|
|
524
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
525
|
-
*/const vw=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Bm=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/**
|
|
526
|
-
* @license lucide-react v0.456.0 - ISC
|
|
527
|
-
*
|
|
528
|
-
* This source code is licensed under the ISC license.
|
|
529
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
530
|
-
*/var bw={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
531
|
-
* @license lucide-react v0.456.0 - ISC
|
|
532
|
-
*
|
|
533
|
-
* This source code is licensed under the ISC license.
|
|
534
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
535
|
-
*/const yw=Za(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:i,iconNode:c,...u},f)=>Wi("svg",{ref:f,...bw,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:Bm("lucide",o),...u},[...c.map(([d,p])=>Wi(d,p)),...Array.isArray(i)?i:[i]]));/**
|
|
536
|
-
* @license lucide-react v0.456.0 - ISC
|
|
537
|
-
*
|
|
538
|
-
* This source code is licensed under the ISC license.
|
|
539
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
540
|
-
*/const $r=(e,t)=>{const r=Za(({className:n,...o},i)=>Wi(yw,{ref:i,iconNode:t,className:Bm(`lucide-${vw(e)}`,n),...o}));return r.displayName=`${e}`,r};/**
|
|
541
|
-
* @license lucide-react v0.456.0 - ISC
|
|
542
|
-
*
|
|
543
|
-
* This source code is licensed under the ISC license.
|
|
544
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
545
|
-
*/const xw=$r("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
546
|
-
* @license lucide-react v0.456.0 - ISC
|
|
547
|
-
*
|
|
548
|
-
* This source code is licensed under the ISC license.
|
|
549
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
550
|
-
*/const Ba=$r("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
551
|
-
* @license lucide-react v0.456.0 - ISC
|
|
552
|
-
*
|
|
553
|
-
* This source code is licensed under the ISC license.
|
|
554
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
555
|
-
*/const ww=$r("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
556
|
-
* @license lucide-react v0.456.0 - ISC
|
|
557
|
-
*
|
|
558
|
-
* This source code is licensed under the ISC license.
|
|
559
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
560
|
-
*/const Fa=$r("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
|
561
|
-
* @license lucide-react v0.456.0 - ISC
|
|
562
|
-
*
|
|
563
|
-
* This source code is licensed under the ISC license.
|
|
564
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
565
|
-
*/$r("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/**
|
|
566
|
-
* @license lucide-react v0.456.0 - ISC
|
|
567
|
-
*
|
|
568
|
-
* This source code is licensed under the ISC license.
|
|
569
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
570
|
-
*/const Fm=$r("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
|
|
571
|
-
* @license lucide-react v0.456.0 - ISC
|
|
572
|
-
*
|
|
573
|
-
* This source code is licensed under the ISC license.
|
|
574
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
575
|
-
*/const Cw=$r("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
|
|
576
|
-
* @license lucide-react v0.456.0 - ISC
|
|
577
|
-
*
|
|
578
|
-
* This source code is licensed under the ISC license.
|
|
579
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
580
|
-
*/const Dw=$r("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
|
|
581
|
-
* @license lucide-react v0.456.0 - ISC
|
|
582
|
-
*
|
|
583
|
-
* This source code is licensed under the ISC license.
|
|
584
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
585
|
-
*/const kw=$r("FileSearch",[["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M4.268 21a2 2 0 0 0 1.727 1H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v3",key:"ms7g94"}],["path",{d:"m9 18-1.5-1.5",key:"1j6qii"}],["circle",{cx:"5",cy:"14",r:"3",key:"ufru5t"}]]);/**
|
|
586
|
-
* @license lucide-react v0.456.0 - ISC
|
|
587
|
-
*
|
|
588
|
-
* This source code is licensed under the ISC license.
|
|
589
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
590
|
-
*/const Ew=$r("MessageSquareDot",[["path",{d:"M11.7 3H5a2 2 0 0 0-2 2v16l4-4h12a2 2 0 0 0 2-2v-2.7",key:"uodpkb"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}]]);/**
|
|
591
|
-
* @license lucide-react v0.456.0 - ISC
|
|
592
|
-
*
|
|
593
|
-
* This source code is licensed under the ISC license.
|
|
594
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
595
|
-
*/$r("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
|
|
596
|
-
* @license lucide-react v0.456.0 - ISC
|
|
597
|
-
*
|
|
598
|
-
* This source code is licensed under the ISC license.
|
|
599
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
600
|
-
*/const Sw=$r("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]]);/**
|
|
601
|
-
* @license lucide-react v0.456.0 - ISC
|
|
602
|
-
*
|
|
603
|
-
* This source code is licensed under the ISC license.
|
|
604
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
605
|
-
*/const Aw=$r("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
|
|
606
|
-
* @license lucide-react v0.456.0 - ISC
|
|
607
|
-
*
|
|
608
|
-
* This source code is licensed under the ISC license.
|
|
609
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
610
|
-
*/const Bw=$r("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
|
|
611
|
-
* @license lucide-react v0.456.0 - ISC
|
|
612
|
-
*
|
|
613
|
-
* This source code is licensed under the ISC license.
|
|
614
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
615
|
-
*/$r("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
616
|
-
* @license lucide-react v0.456.0 - ISC
|
|
617
|
-
*
|
|
618
|
-
* This source code is licensed under the ISC license.
|
|
619
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
620
|
-
*/const Fw=$r("Share",[["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}],["polyline",{points:"16 6 12 2 8 6",key:"m901s6"}],["line",{x1:"12",x2:"12",y1:"2",y2:"15",key:"1p0rca"}]]);/**
|
|
621
|
-
* @license lucide-react v0.456.0 - ISC
|
|
622
|
-
*
|
|
623
|
-
* This source code is licensed under the ISC license.
|
|
624
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
625
|
-
*/const Nw=$r("ThumbsDown",[["path",{d:"M17 14V2",key:"8ymqnk"}],["path",{d:"M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z",key:"m61m77"}]]);/**
|
|
626
|
-
* @license lucide-react v0.456.0 - ISC
|
|
627
|
-
*
|
|
628
|
-
* This source code is licensed under the ISC license.
|
|
629
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
630
|
-
*/const Tw=$r("ThumbsUp",[["path",{d:"M7 10v12",key:"1qc93n"}],["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}]]);/**
|
|
631
|
-
* @license lucide-react v0.456.0 - ISC
|
|
632
|
-
*
|
|
633
|
-
* This source code is licensed under the ISC license.
|
|
634
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
635
|
-
*/const Ow=$r("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
|
636
|
-
* @license lucide-react v0.456.0 - ISC
|
|
637
|
-
*
|
|
638
|
-
* This source code is licensed under the ISC license.
|
|
639
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
640
|
-
*/const $w=$r("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
|
|
641
|
-
* @license lucide-react v0.456.0 - ISC
|
|
642
|
-
*
|
|
643
|
-
* This source code is licensed under the ISC license.
|
|
644
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
645
|
-
*/$r("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);const Kh={javascript:()=>fr(()=>import("./prism-javascript-CLux6jF8-2LMHe_9g.js"),[],import.meta.url),typescript:()=>fr(()=>import("./prism-typescript-DSWPRTnC-CeVC8Yup.js"),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url).then(e=>e.p),ts:()=>fr(()=>import("./prism-typescript-DSWPRTnC-CeVC8Yup.js"),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url).then(e=>e.p),python:()=>fr(()=>import("./prism-python-CP37PFZv-BvLoHz-u.js"),__vite__mapDeps([7,1,2,3,4,5,6]),import.meta.url).then(e=>e.p),py:()=>fr(()=>import("./prism-python-CP37PFZv-BvLoHz-u.js"),__vite__mapDeps([7,1,2,3,4,5,6]),import.meta.url).then(e=>e.p),css:()=>fr(()=>import("./prism-css-3Jya3wSQ-B-W7RKWG.js"),[],import.meta.url),html:()=>fr(()=>import("./prism-markup-BNGj0Tvm-LX0ylPSt.js"),[],import.meta.url),json:()=>fr(()=>import("./prism-json-iVb7He6L-xwnKirkR.js"),[],import.meta.url),jsx:()=>fr(()=>import("./prism-jsx-yfun9EDN-BfrbuX8i.js"),[],import.meta.url),tsx:()=>fr(()=>import("./prism-tsx-D_jjxt3I-DTNho6I-.js"),[],import.meta.url),bash:()=>fr(()=>import("./prism-bash-zSjFhtUz-cl4oq_rS.js"),[],import.meta.url),shell:()=>fr(()=>import("./prism-bash-zSjFhtUz-cl4oq_rS.js"),[],import.meta.url),sql:()=>fr(()=>import("./prism-sql-8Y2-THrf-AgAyy5H_.js"),[],import.meta.url),java:()=>fr(()=>import("./prism-java-l04-K_JR-DTIQeGI0.js"),__vite__mapDeps([8,1,2,3,4,5,6]),import.meta.url).then(e=>e.p),cpp:()=>fr(()=>import("./prism-cpp-DTm5qrps-DEcnTKnd.js"),__vite__mapDeps([9,1,2,3,4,5,6]),import.meta.url).then(e=>e.p),c:()=>fr(()=>import("./prism-c-CXS5tkeN-BI05wwL9.js"),[],import.meta.url),go:()=>fr(()=>import("./prism-go-CHuRSSd--CyY0RbE6.js"),[],import.meta.url),rust:()=>fr(()=>import("./prism-rust-CuWIv8B8-D_BYGjS-.js"),__vite__mapDeps([10,1,2,3,4,5,6]),import.meta.url).then(e=>e.p),php:()=>fr(()=>import("./prism-php-Cq3Hq1Wv-BQ6y6LDZ.js"),__vite__mapDeps([11,1,2,3,4,5,6]),import.meta.url).then(e=>e.p),ruby:()=>fr(()=>import("./prism-ruby-DcAmdHPZ-CavK5dyy.js"),__vite__mapDeps([12,1,2,3,4,5,6]),import.meta.url).then(e=>e.p),swift:()=>fr(()=>import("./prism-swift-CeDyTyXT--kriB360.js"),[],import.meta.url),kotlin:()=>fr(()=>import("./prism-kotlin-QHMLy1lI-BxfM_G_h.js"),[],import.meta.url),yaml:()=>fr(()=>import("./prism-yaml-DwdKlmeG-Dm3L3oXv.js"),[],import.meta.url),yml:()=>fr(()=>import("./prism-yaml-DwdKlmeG-Dm3L3oXv.js"),[],import.meta.url),markdown:()=>fr(()=>import("./prism-markdown-tjNeCMi3-mpwv5EuF.js"),[],import.meta.url),md:()=>fr(()=>import("./prism-markdown-tjNeCMi3-mpwv5EuF.js"),[],import.meta.url),xml:()=>fr(()=>import("./prism-markup-BNGj0Tvm-LX0ylPSt.js"),[],import.meta.url),diff:()=>fr(()=>import("./prism-diff-Apx1lkH_-b-nTbU2H.js"),[],import.meta.url)},Wh=new Set,Mw=async e=>{if(!e||Wh.has(e))return;const t=e.toLowerCase();if(Kh[t])try{await Kh[t](),Wh.add(t)}catch(r){console.warn(`Failed to load language: ${e}`,r)}},Rw=Le.div.attrs({className:"rtext-code-block-wrapper"})`
|
|
646
|
-
position: relative;
|
|
647
|
-
margin: 20px 0;
|
|
648
|
-
border-radius: 8px;
|
|
649
|
-
overflow: hidden;
|
|
650
|
-
border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#e1e4e8"}};
|
|
651
|
-
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
652
|
-
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
|
|
653
|
-
transition: box-shadow 0.2s ease;
|
|
654
|
-
|
|
655
|
-
&:hover {
|
|
656
|
-
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
657
|
-
}
|
|
658
|
-
`,Pw=Le.div.attrs({className:"rtext-code-block-language"})`
|
|
659
|
-
display: flex;
|
|
660
|
-
align-items: center;
|
|
661
|
-
justify-content: space-between;
|
|
662
|
-
padding: 10px 16px;
|
|
663
|
-
background: ${e=>{var r;const t=((r=e.theme)==null?void 0:r.disabledBackground)||"#f6f8fa";return t==="#f6f8fa"||t.includes("f6f8fa")?"#f0f2f5":t==="#ffffff"||t.includes("ffffff")?"#f6f8fa":t}};
|
|
664
|
-
border-bottom: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#e1e4e8"}};
|
|
665
|
-
font-size: 11px;
|
|
666
|
-
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#656d76"}};
|
|
667
|
-
font-weight: 600;
|
|
668
|
-
letter-spacing: 0.5px;
|
|
669
|
-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
|
|
670
|
-
|
|
671
|
-
span:first-child {
|
|
672
|
-
opacity: 0.85;
|
|
673
|
-
font-variant: small-caps;
|
|
674
|
-
}
|
|
675
|
-
`,zw=Le.pre.attrs({className:"rtext-simple-code-block"})`
|
|
676
|
-
margin: 16px 0;
|
|
677
|
-
padding: 12px 16px;
|
|
678
|
-
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
679
|
-
border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#e1e4e8"}};
|
|
680
|
-
border-radius: 6px;
|
|
681
|
-
overflow-x: auto;
|
|
682
|
-
font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Droid Sans Mono', 'Source Code Pro', 'Consolas', 'Liberation Mono', 'Menlo', monospace;
|
|
683
|
-
font-size: 13px;
|
|
684
|
-
line-height: 1.6;
|
|
685
|
-
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
686
|
-
|
|
687
|
-
code {
|
|
688
|
-
background: transparent;
|
|
689
|
-
padding: 0;
|
|
690
|
-
color: inherit;
|
|
691
|
-
font-size: inherit;
|
|
692
|
-
font-family: inherit;
|
|
693
|
-
white-space: pre;
|
|
694
|
-
}
|
|
695
|
-
`,_w=Le.pre.attrs({className:"rtext-code-block-container"})`
|
|
696
|
-
margin: 0 !important;
|
|
697
|
-
border: none !important;
|
|
698
|
-
padding: 16px 20px;
|
|
699
|
-
overflow-x: auto;
|
|
700
|
-
background: ${e=>{var r;const t=((r=e.theme)==null?void 0:r.disabledBackground)||"#f6f8fa";return t==="#f6f8fa"||t.includes("f6f8fa")||t.includes("f0f2f5")||t==="#ffffff"||t.includes("ffffff")?"#ffffff":t}};
|
|
701
|
-
font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Droid Sans Mono', 'Source Code Pro', 'Consolas', 'Liberation Mono', 'Menlo', monospace;
|
|
702
|
-
font-size: 13px;
|
|
703
|
-
line-height: 1.7;
|
|
704
|
-
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
705
|
-
tab-size: 2;
|
|
706
|
-
-webkit-font-smoothing: antialiased;
|
|
707
|
-
-moz-osx-font-smoothing: grayscale;
|
|
708
|
-
|
|
709
|
-
/* 美化滚动条 */
|
|
710
|
-
&::-webkit-scrollbar {
|
|
711
|
-
height: 8px;
|
|
712
|
-
}
|
|
713
|
-
|
|
714
|
-
&::-webkit-scrollbar-track {
|
|
715
|
-
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
716
|
-
}
|
|
717
|
-
|
|
718
|
-
&::-webkit-scrollbar-thumb {
|
|
719
|
-
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#c1c7cd"}};
|
|
720
|
-
border-radius: 4px;
|
|
721
|
-
|
|
722
|
-
&:hover {
|
|
723
|
-
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#8b949e"}};
|
|
724
|
-
}
|
|
725
|
-
}
|
|
726
|
-
|
|
727
|
-
code {
|
|
728
|
-
background: transparent;
|
|
729
|
-
padding: 0;
|
|
730
|
-
color: inherit;
|
|
731
|
-
font-size: inherit;
|
|
732
|
-
font-family: inherit;
|
|
733
|
-
white-space: pre;
|
|
734
|
-
}
|
|
735
|
-
|
|
736
|
-
/* 优化 PrismJS 高亮样式 - 参考 DeepSeek/飞书设计 */
|
|
737
|
-
.token.comment,
|
|
738
|
-
.token.prolog,
|
|
739
|
-
.token.doctype,
|
|
740
|
-
.token.cdata {
|
|
741
|
-
color: #6a737d;
|
|
742
|
-
font-style: italic;
|
|
743
|
-
}
|
|
744
|
-
|
|
745
|
-
.token.punctuation {
|
|
746
|
-
color: #24292f;
|
|
747
|
-
}
|
|
748
|
-
|
|
749
|
-
.token.property,
|
|
750
|
-
.token.tag,
|
|
751
|
-
.token.boolean,
|
|
752
|
-
.token.number,
|
|
753
|
-
.token.constant,
|
|
754
|
-
.token.symbol,
|
|
755
|
-
.token.deleted {
|
|
756
|
-
color: #005cc5;
|
|
757
|
-
}
|
|
758
|
-
|
|
759
|
-
.token.selector,
|
|
760
|
-
.token.attr-name,
|
|
761
|
-
.token.string,
|
|
762
|
-
.token.char,
|
|
763
|
-
.token.builtin,
|
|
764
|
-
.token.inserted {
|
|
765
|
-
color: #032f62;
|
|
766
|
-
}
|
|
767
|
-
|
|
768
|
-
.token.operator,
|
|
769
|
-
.token.entity,
|
|
770
|
-
.token.url,
|
|
771
|
-
.language-css .token.string,
|
|
772
|
-
.style .token.string {
|
|
773
|
-
color: #d73a49;
|
|
774
|
-
}
|
|
775
|
-
|
|
776
|
-
.token.atrule,
|
|
777
|
-
.token.attr-value,
|
|
778
|
-
.token.keyword {
|
|
779
|
-
color: #d73a49;
|
|
780
|
-
}
|
|
781
|
-
|
|
782
|
-
.token.function,
|
|
783
|
-
.token.class-name {
|
|
784
|
-
color: #6f42c1;
|
|
785
|
-
}
|
|
786
|
-
|
|
787
|
-
.token.regex,
|
|
788
|
-
.token.important,
|
|
789
|
-
.token.variable {
|
|
790
|
-
color: #e36209;
|
|
791
|
-
}
|
|
792
|
-
`,Iw=Le.button.attrs({className:"rtext-code-block-copy-btn"})`
|
|
793
|
-
display: inline-flex;
|
|
794
|
-
align-items: center;
|
|
795
|
-
justify-content: center;
|
|
796
|
-
gap: 5px;
|
|
797
|
-
padding: 5px 10px;
|
|
798
|
-
background: ${e=>e.$error?"#d73a49":e.$copied?"#2da44e":"transparent"};
|
|
799
|
-
border: 1px solid ${e=>{var t;return e.$error?"#d73a49":e.$copied?"#2da44e":((t=e.theme)==null?void 0:t.borderColor)||"#d0d7de"}};
|
|
800
|
-
border-radius: 5px;
|
|
801
|
-
color: ${e=>{var t;return e.$error||e.$copied?"#ffffff":((t=e.theme)==null?void 0:t.textColor)||"#57606a"}};
|
|
802
|
-
cursor: pointer;
|
|
803
|
-
font-size: 12px;
|
|
804
|
-
font-weight: 500;
|
|
805
|
-
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
806
|
-
min-width: 64px;
|
|
807
|
-
height: 28px;
|
|
808
|
-
user-select: none;
|
|
809
|
-
|
|
810
|
-
&:hover {
|
|
811
|
-
background: ${e=>{var t;return e.$error?"#b6232f":e.$copied?"#28a745":((t=e.theme)==null?void 0:t.hoverBackground)||"rgba(0, 0, 0, 0.05)"}};
|
|
812
|
-
border-color: ${e=>{var t;return e.$error?"#b6232f":e.$copied?"#28a745":((t=e.theme)==null?void 0:t.textColor)||"#8b949e"}};
|
|
813
|
-
transform: translateY(-1px);
|
|
814
|
-
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
815
|
-
}
|
|
816
|
-
|
|
817
|
-
&:active {
|
|
818
|
-
transform: translateY(0);
|
|
819
|
-
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
|
|
820
|
-
}
|
|
821
|
-
|
|
822
|
-
svg {
|
|
823
|
-
width: 14px;
|
|
824
|
-
height: 14px;
|
|
825
|
-
flex-shrink: 0;
|
|
826
|
-
}
|
|
827
|
-
|
|
828
|
-
span {
|
|
829
|
-
white-space: nowrap;
|
|
830
|
-
}
|
|
831
|
-
`,jw=({attributes:e,language:t,children:r,styles:n,codeText:o,enablePrism:i=!1})=>{const c=Ht(null),[u,f]=St(!1),[d,p]=St(!1),v=ht(()=>{if(o)return o;const C=A=>typeof A=="string"?A:typeof A=="number"?String(A):A==null?"":Array.isArray(A)?A.map(C).join(""):typeof A=="object"&&A!==null?"text"in A?String(A.text||""):He.isValidElement(A)?A.props&&A.props.children?C(A.props.children):"":"textContent"in A?String(A.textContent||""):"":"";return C(r)},[r,o]),g=ht(()=>{if(!t)return;const C=t.toLowerCase();return C.startsWith("language-")?C.replace("language-",""):C},[t]);Jt(()=>{!c.current||(v&&(c.current.textContent=v),!i||!v)||(async()=>{try{if(g&&await Mw(g),g&&Qo.languages[g]){const C=Qo.highlight(v,Qo.languages[g],g);c.current&&(c.current.innerHTML=C)}else c.current&&!c.current.textContent&&(c.current.textContent=v)}catch(C){console.warn("Failed to highlight code:",C),c.current&&!c.current.textContent&&(c.current.textContent=v)}})()},[v,g,i]);const x=async()=>{if(v)try{await navigator.clipboard.writeText(v),f(!0),p(!1),setTimeout(()=>{f(!1)},2e3)}catch(C){console.error("Failed to copy code:",C),p(!0),f(!1),setTimeout(()=>{p(!1)},2e3)}},w=ht(()=>(n==null?void 0:n.theme)||{},[n]);return i?q.jsxs(Rw,{...e,theme:w,children:[q.jsxs(Pw,{theme:w,children:[q.jsx("span",{children:g?g.toUpperCase():"CODE"}),q.jsx(Iw,{theme:w,$copied:u,$error:d,onClick:x,title:u?"\u5DF2\u590D\u5236":d?"\u590D\u5236\u5931\u8D25":"\u590D\u5236\u4EE3\u7801",children:d?q.jsxs(q.Fragment,{children:[q.jsx($w,{size:14}),q.jsx("span",{children:"\u5931\u8D25"})]}):u?q.jsxs(q.Fragment,{children:[q.jsx(xw,{size:14}),q.jsx("span",{children:"\u5DF2\u590D\u5236"})]}):q.jsxs(q.Fragment,{children:[q.jsx(Fm,{size:14}),q.jsx("span",{children:"\u590D\u5236"})]})})]}),q.jsx(_w,{theme:w,children:q.jsx("code",{ref:c,className:g?`language-${g}`:"",children:v})})]}):q.jsx(zw,{...e,theme:w,children:q.jsx("code",{ref:c,children:v})})},Lw=e=>{var i,c,u,f,d,p,v,g;const{styles:t}=e,{element:r,children:n,attributes:o}=e;switch(r.type){case"paragraph":return q.jsx("div",{...o,style:{letterSpacing:t==null?void 0:t.letterSpacing,lineHeight:t==null?void 0:t.lineHeight,color:`${(i=t==null?void 0:t.text)==null?void 0:i.color} !important`,margin:"0 0 0.75rem 0"},children:n});case"heading-one":return q.jsx("h1",{...o,style:{letterSpacing:t==null?void 0:t.letterSpacing,lineHeight:t==null?void 0:t.lineHeight,color:`${(c=t==null?void 0:t.text)==null?void 0:c.color} !important`},children:n});case"heading-two":return q.jsx("h2",{...o,style:{letterSpacing:t==null?void 0:t.letterSpacing,lineHeight:t==null?void 0:t.lineHeight,color:`${(u=t==null?void 0:t.text)==null?void 0:u.color} !important`},children:n});case"heading-three":return q.jsx("h3",{...o,style:{letterSpacing:t==null?void 0:t.letterSpacing,lineHeight:t==null?void 0:t.lineHeight,color:`${(f=t==null?void 0:t.text)==null?void 0:f.color} !important`},children:n});case"bulleted-list":return q.jsx("ul",{...o,children:n});case"numbered-list":return q.jsx("ol",{...o,children:n});case"list-item":return q.jsx("li",{...o,children:n});case"table":return q.jsx("div",{className:"table-container",children:q.jsx("table",{...o,children:q.jsx("tbody",{children:n})})});case"table-row":return q.jsx("tr",{...o,children:n});case"table-cell":return r.header?q.jsx("th",{...o,children:n}):q.jsx("td",{...o,children:n});case"block-quote":return q.jsx("blockquote",{...o,style:{letterSpacing:t==null?void 0:t.letterSpacing,lineHeight:t==null?void 0:t.lineHeight,color:`${(d=t==null?void 0:t.text)==null?void 0:d.color} !important`},children:n});case"code-block":const x=((p=r.children)==null?void 0:p.map(D=>D.text||"").join(""))||"",w=e.enablePrism??!1;return q.jsx(jw,{attributes:o,language:r.language,styles:t,codeText:x,enablePrism:w,children:n});case"think":const C=e.extraProps||{},m=C.isCollapsed!==void 0?C.isCollapsed:Object.values(C)[1]===!0,A={...C,isCollapsed:m};return q.jsx(ew,{attributes:o,styles:t,extraProps:A,children:n});case"template":return q.jsx(Em,{...o,element:r,children:n,styles:t});case"latex-inline":return q.jsx(dw,{attributes:o,formula:r.formula,styles:t});case"latex-block":return q.jsx(gw,{attributes:o,formula:r.formula,styles:t});case"retrieve-sql-data":const S=(D=>{if(!D)return null;try{const $=typeof D=="string"?JSON.parse(D):D;return{queryReplyPairList:[{reply:{databaseReference:Array.isArray($)?$[0]:$}}]}}catch($){return console.error("Failed to parse databaseReference:",$),null}})(((v=e.extraProps)==null?void 0:v.databaseReference)||e.databaseReference);return q.jsx(Sm,{...o,element:r,children:n,styles:t,eventsEmit:e.eventsEmit,dataSource:S||void 0,tagIndex:1});case"image":return console.log("\u6E32\u67D3\u56FE\u7247\u5143\u7D20:",{url:r.url,alt:r.alt}),q.jsx("img",{...o,src:r.url,alt:r.alt||"",style:{maxWidth:"100%",height:"auto",borderRadius:"0.5rem",margin:"1rem 0",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.1)",transition:"transform 0.2s ease-in-out",display:"block"},onError:D=>{const $=D.target;$.style.display="none",console.warn("\u56FE\u7247\u52A0\u8F7D\u5931\u8D25:",r.url)}});case"iframe":return console.log("\u6E32\u67D3iframe\u5143\u7D20:",{src:r.src,width:r.width,height:r.height}),q.jsx("iframe",{...o,src:r.src,width:r.width||"100%",height:r.height||"400",frameBorder:r.frameborder||"0",title:r.title||"",style:{width:r.width||"100%",height:r.height||"400px",border:"none",borderRadius:"0.5rem",margin:"1rem 0",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.1)",display:"block"},onError:D=>{const $=D.target;$.style.display="none",console.warn("iframe\u52A0\u8F7D\u5931\u8D25:",r.src)}});default:return q.jsx("div",{...o,className:"mb-4",style:{letterSpacing:t==null?void 0:t.letterSpacing,lineHeight:t==null?void 0:t.lineHeight,color:`${(g=t==null?void 0:t.text)==null?void 0:g.color} !important`},children:n})}},Hw=e=>{var c,u,f,d,p,v;const{attributes:t,children:r,leaf:n,styles:o}=e;(c=o==null?void 0:o.text)!=null&&c.color&&console.log("renderLeaf - \u63A5\u6536\u5230\u7684\u6587\u672C\u989C\u8272:",o.text.color);let i=r;if(n.retrive){const g=n.fromtype==="0",x=n.fromtype==="1",w=n.fromtype==="2",C=n.text||"";let m=C,A="#e6f7ff",S="#1890ff",D="#bae7ff";return g?(m=`${C}`,A="#e6f7ff",S="#1890ff",D="#bae7ff"):x?(m=`${C}`,A="#f6ffed",S="#52c41a",D="#d9f7be"):w&&(m=`${C}`,A="#E7F8FB",S="#10BBD9",D="#E7F8FB"),i=q.jsx("span",{...t,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",background:A,color:S,minWidth:24,height:24,borderRadius:4,padding:"0 6px",margin:"0 2px",fontWeight:600,fontSize:10,lineHeight:"20px",cursor:"pointer",verticalAlign:"middle",boxSizing:"border-box"},onClick:()=>{e.onRetriveTagClick&&e.onRetriveTagClick(n,t)},onMouseEnter:$=>$.currentTarget.style.background=D,onMouseLeave:$=>$.currentTarget.style.background=A,children:m}),i}if(n.code)i=q.jsx("code",{...t,style:{color:`${(u=o==null?void 0:o.text)==null?void 0:u.color} !important`},children:i});else{const g=[n.bold&&"bold",n.italic&&"italic",n.underline&&"underline",n.strikethrough&&"strikethrough"].filter(Boolean).join(" "),x={color:`${(f=o==null?void 0:o.text)==null?void 0:f.color} !important`,fontSize:(d=o==null?void 0:o.text)==null?void 0:d.fontSize,lineHeight:(p=o==null?void 0:o.text)==null?void 0:p.lineHeight,letterSpacing:o==null?void 0:o.letterSpacing};i=q.jsx("span",{...t,className:g,style:x,children:i})}return n.link&&(i=q.jsx("a",{href:n.link,target:"_blank",rel:"noopener noreferrer",className:"link",style:{color:`${(v=o==null?void 0:o.text)==null?void 0:v.color} !important`},children:i})),i},Gl=Le.div.attrs({className:"unified-rich-text-container"})`
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
& > * + * {
|
|
835
|
-
margin-top: ${e=>{var t;return((t=e.theme)==null?void 0:t.margin)||"0.5rem"}};
|
|
836
|
-
}
|
|
837
|
-
|
|
838
|
-
/* 标题样式 */
|
|
839
|
-
& h1 {
|
|
840
|
-
font-size: ${e=>e.$size==="sm"?"20px":"32px"};
|
|
841
|
-
font-weight: 600;
|
|
842
|
-
margin: 24px 0 16px 0;
|
|
843
|
-
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
844
|
-
border-bottom: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#d0d7de"}};
|
|
845
|
-
padding-bottom: 8px;
|
|
846
|
-
}
|
|
847
|
-
|
|
848
|
-
& h2 {
|
|
849
|
-
font-size: ${e=>e.$size==="sm"?"18px":"24px"};
|
|
850
|
-
font-weight: 600;
|
|
851
|
-
margin: 24px 0 16px 0;
|
|
852
|
-
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
853
|
-
border-bottom: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#d0d7de"}};
|
|
854
|
-
padding-bottom: 6px;
|
|
855
|
-
}
|
|
856
|
-
|
|
857
|
-
& h3 {
|
|
858
|
-
font-size: ${e=>e.$size==="sm"?"16px":"20px"};
|
|
859
|
-
font-weight: 600;
|
|
860
|
-
margin: 24px 0 16px 0;
|
|
861
|
-
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
862
|
-
}
|
|
863
|
-
|
|
864
|
-
/* 段落样式 */
|
|
865
|
-
& p {
|
|
866
|
-
font-size: ${e=>e.$size==="sm"?"14px":"16px"};
|
|
867
|
-
margin: 16px 0;
|
|
868
|
-
line-height: 1.6;
|
|
869
|
-
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
870
|
-
}
|
|
871
|
-
|
|
872
|
-
/* 列表样式 - GitHub 风格简约设计 */
|
|
873
|
-
& ul, & ol {
|
|
874
|
-
margin: 16px 0;
|
|
875
|
-
padding-left: 24px;
|
|
876
|
-
line-height: 1.6;
|
|
877
|
-
}
|
|
878
|
-
|
|
879
|
-
& ul {
|
|
880
|
-
list-style-type: disc;
|
|
881
|
-
}
|
|
882
|
-
|
|
883
|
-
& ol {
|
|
884
|
-
list-style-type: decimal;
|
|
885
|
-
}
|
|
886
|
-
|
|
887
|
-
& li {
|
|
888
|
-
margin: 4px 0;
|
|
889
|
-
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
890
|
-
}
|
|
891
|
-
|
|
892
|
-
/* 嵌套列表 */
|
|
893
|
-
& ul ul, & ol ol, & ul ol, & ol ul {
|
|
894
|
-
margin: 8px 0;
|
|
895
|
-
}
|
|
896
|
-
|
|
897
|
-
/* 引用块样式 */
|
|
898
|
-
& blockquote {
|
|
899
|
-
font-size: ${e=>e.$size==="sm"?"14px":"16px"};
|
|
900
|
-
border-left: 4px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#d0d7de"}};
|
|
901
|
-
padding: 0 16px;
|
|
902
|
-
margin: 16px 0;
|
|
903
|
-
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textSecondary)||"#656d76"}};
|
|
904
|
-
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
905
|
-
}
|
|
906
|
-
|
|
907
|
-
/* 行内代码样式 */
|
|
908
|
-
& code {
|
|
909
|
-
font-size: 0.875em;
|
|
910
|
-
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
911
|
-
padding: 0.125em 0.25em;
|
|
912
|
-
border-radius: 6px;
|
|
913
|
-
font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
|
|
914
|
-
color: #d73a49;
|
|
915
|
-
}
|
|
916
|
-
|
|
917
|
-
/* 代码块样式 */
|
|
918
|
-
& pre {
|
|
919
|
-
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
920
|
-
padding: 16px;
|
|
921
|
-
border-radius: 6px;
|
|
922
|
-
overflow-x: auto;
|
|
923
|
-
margin: 16px 0;
|
|
924
|
-
border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#d0d7de"}};
|
|
925
|
-
}
|
|
926
|
-
|
|
927
|
-
& pre code {
|
|
928
|
-
background-color: transparent;
|
|
929
|
-
padding: 0;
|
|
930
|
-
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
931
|
-
}
|
|
932
|
-
|
|
933
|
-
/* 表格容器样式 */
|
|
934
|
-
& .table-container {
|
|
935
|
-
overflow: auto;
|
|
936
|
-
border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#e5e7eb"}};
|
|
937
|
-
border-radius: 6px;
|
|
938
|
-
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"transparent"}};
|
|
939
|
-
margin: 16px 0;
|
|
940
|
-
}
|
|
941
|
-
|
|
942
|
-
/* 表格样式 */
|
|
943
|
-
& .table-container table,
|
|
944
|
-
& table {
|
|
945
|
-
width: 100%;
|
|
946
|
-
border-collapse: collapse;
|
|
947
|
-
border: none;
|
|
948
|
-
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"transparent"}};
|
|
949
|
-
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
950
|
-
}
|
|
951
|
-
|
|
952
|
-
& .table-container th,
|
|
953
|
-
& .table-container td,
|
|
954
|
-
& th, & td {
|
|
955
|
-
border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#e5e7eb"}};
|
|
956
|
-
padding: 8px 12px;
|
|
957
|
-
text-align: left;
|
|
958
|
-
}
|
|
959
|
-
|
|
960
|
-
& .table-container th,
|
|
961
|
-
& th {
|
|
962
|
-
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
963
|
-
font-weight: 600;
|
|
964
|
-
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
965
|
-
}
|
|
966
|
-
|
|
967
|
-
& .table-container tr:nth-child(even) td,
|
|
968
|
-
& tr:nth-child(even) {
|
|
969
|
-
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
970
|
-
}
|
|
971
|
-
|
|
972
|
-
& .table-container td,
|
|
973
|
-
& td {
|
|
974
|
-
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
975
|
-
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"transparent"}};
|
|
976
|
-
}
|
|
977
|
-
|
|
978
|
-
/* 图片样式 */
|
|
979
|
-
& img {
|
|
980
|
-
max-width: 100%;
|
|
981
|
-
height: auto;
|
|
982
|
-
border-radius: 6px;
|
|
983
|
-
margin: 16px 0;
|
|
984
|
-
}
|
|
985
|
-
|
|
986
|
-
/* 链接样式 */
|
|
987
|
-
& a {
|
|
988
|
-
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.primaryColor)||"#0969da"}};
|
|
989
|
-
text-decoration: none;
|
|
990
|
-
|
|
991
|
-
&:hover {
|
|
992
|
-
text-decoration: underline;
|
|
993
|
-
}
|
|
994
|
-
}
|
|
995
|
-
|
|
996
|
-
/* 文本样式 */
|
|
997
|
-
& strong {
|
|
998
|
-
font-weight: 600;
|
|
999
|
-
}
|
|
1000
|
-
|
|
1001
|
-
& em {
|
|
1002
|
-
font-style: italic;
|
|
1003
|
-
}
|
|
1004
|
-
|
|
1005
|
-
& u {
|
|
1006
|
-
text-decoration: underline;
|
|
1007
|
-
}
|
|
1008
|
-
|
|
1009
|
-
& s {
|
|
1010
|
-
text-decoration: line-through;
|
|
1011
|
-
}
|
|
1012
|
-
|
|
1013
|
-
/* 分割线样式 */
|
|
1014
|
-
& hr {
|
|
1015
|
-
border: none;
|
|
1016
|
-
border-top: 1px solid #d0d7de;
|
|
1017
|
-
margin: 24px 0;
|
|
1018
|
-
}
|
|
1019
|
-
|
|
1020
|
-
/* 思考容器样式 */
|
|
1021
|
-
& .think-container {
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
}
|
|
1025
|
-
|
|
1026
|
-
& .think-header {
|
|
1027
|
-
|
|
1028
|
-
}
|
|
1029
|
-
|
|
1030
|
-
& .think-icon {
|
|
1031
|
-
|
|
1032
|
-
}
|
|
1033
|
-
|
|
1034
|
-
& .think-title {
|
|
1035
|
-
font-weight: 600;
|
|
1036
|
-
color: #24292f;
|
|
1037
|
-
font-size: 14px;
|
|
1038
|
-
}
|
|
1039
|
-
|
|
1040
|
-
& .think-text {
|
|
1041
|
-
color: #86909C;
|
|
1042
|
-
font-size: 14px;
|
|
1043
|
-
line-height: 1.6;
|
|
1044
|
-
}
|
|
1045
|
-
|
|
1046
|
-
/* 召回标签样式 */
|
|
1047
|
-
& .retrive-tag {
|
|
1048
|
-
display: inline-block;
|
|
1049
|
-
background: #e6f7ff;
|
|
1050
|
-
color: #1890ff;
|
|
1051
|
-
border: 1px solid rgba(114, 187, 255, 0.3);
|
|
1052
|
-
border-radius: 6px;
|
|
1053
|
-
padding: 2px 6px;
|
|
1054
|
-
margin: 0 2px;
|
|
1055
|
-
font-weight: 500;
|
|
1056
|
-
font-size: 12px;
|
|
1057
|
-
line-height: 1.4;
|
|
1058
|
-
cursor: pointer;
|
|
1059
|
-
vertical-align: middle;
|
|
1060
|
-
transition: background-color 0.2s ease;
|
|
1061
|
-
}
|
|
1062
|
-
|
|
1063
|
-
& .retrive-tag:hover {
|
|
1064
|
-
background: #bae7ff;
|
|
1065
|
-
}
|
|
1066
|
-
`;function Nm(e){return e.map(t=>!t.children||t.children.length===0?{...t,children:[{text:""}]}:{...t,children:t.children.map(r=>typeof r=="object"&&"type"in r?Nm([r])[0]:r)})}const Vh="__rtext_escaped_dollar__";function ds(e){if(!e)return"";try{return decodeURIComponent(e)}catch(t){return console.warn("Failed to decode LaTeX formula:",e,t),e}}function qw(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Kw(e){const t=new Map;let r=e||"";if(!r)return{content:r,placeholders:t};let n=0;r=r.replace(/\\\$/g,Vh);const o=(u,f)=>{const d=`RTEXT_LATEX_PLACEHOLDER_${n++}_${u.toUpperCase()}`;return t.set(d,{type:u,formula:(f||"").trim()}),d},i=/\$\$([\s\S]+?)\$\$/g;r=r.replace(i,(u,f)=>o("block",f));const c=new RegExp("(?<!\\\\)\\$(?!\\$)([\\s\\S]+?)(?<!\\\\)\\$(?!\\$)","g");return r=r.replace(c,(u,f)=>o("inline",f)),r=r.replace(new RegExp(Vh,"g"),"\\$"),{content:r,placeholders:t}}function Ww(e,t){if(!e||t.size===0)return e;let r=e;return t.forEach((n,o)=>{const i=n.type==="block"?"latex-block":"latex-inline",c=encodeURIComponent(n.formula),u=`<${i} data-formula="${c}"></${i}>`;r=r.replace(new RegExp(qw(o),"g"),u)}),r}function Tm(e,t){const r=(t==null?void 0:t.disabledTags)||[];console.log("\u{1F50D} deserializeMarkdown \u5F00\u59CB\u5904\u7406:",{markdownLength:e.length,basePath:t==null?void 0:t.basePath,hasImgTags:e.includes("<img"),hasMarkdownImages:e.includes("![")});function n(d){var p;if(d.indexOf("<think>")>-1)if(d.indexOf("</think>")>-1){const v=/<think>([\s\S]*?)<\/think>([\s\S]*)/s,g=d.match(v);return g?{thinkContent:g[1],content:g[2],finish:!0}:{thinkContent:"",content:d,finish:!0}}else{const v=/<think>(.*?)(?=<|\s*$)/s;return{thinkContent:((p=d.match(v))==null?void 0:p[1])||"",content:""}}else return{thinkContent:"",content:d}}const{thinkContent:o,content:i,finish:c}=n(e||"");let u=[],f=0;if(!r.includes("think")&&o){const d=o.split(/\n+/).map(p=>p.trim()).filter(Boolean).flatMap(p=>{if(/<retrive-tag/i.test(p)){const v=document.createElement("div");return v.innerHTML=p,Uh(v,t==null?void 0:t.basePath)}else return[{type:"paragraph",children:[{text:p}]}]});u.push({type:"think",id:`think-${f++}`,thinkContent:o,finish:c,children:d})}if(i){const{content:d,placeholders:p}=Kw(i);let v=d;r.includes("retrive")||(v=v.replace(/\[retrive-tag([^\]]*)\]\[([^\]]+)\]\[\/retrive-tag\]/g,(w,C,m)=>`<retrive-tag${C?" "+C.trim():""}>${m}</retrive-tag>`)),r.includes("retrieve-sql-data")||(v=v.replace(/<retrieve-sql-data\s+id="([^"]+)"\s*\/?>/g,(w,C)=>`<retrieve-sql-data id="${C}"></retrieve-sql-data>`)),ar.setOptions({gfm:!0,breaks:!0,pedantic:!1});const g=ar(v);let x=typeof g=="string"?g:"";if(x=Ww(x,p),console.log("\u{1F4DD} marked \u89E3\u6790\u540E\u7684 HTML:",{htmlLength:x.length,hasImgTags:x.includes("<img"),basePath:t==null?void 0:t.basePath,htmlContent:x}),typeof g=="string"){const w=document.createElement("div");w.innerHTML=x,console.log("\u{1F527} \u521B\u5EFA DOM \u5143\u7D20\uFF0C\u51C6\u5907\u89E3\u6790:",{childNodesCount:w.childNodes.length,basePath:t==null?void 0:t.basePath,allElements:Array.from(w.querySelectorAll("*")).map(m=>m.tagName),imgElements:Array.from(w.querySelectorAll("img")).map(m=>({src:m.src,alt:m.alt}))});const C=Uh(w,t==null?void 0:t.basePath);console.log("\u2705 deserializeHtmlNode \u89E3\u6790\u7ED3\u679C:",{partLength:C.length,hasImageElements:C.some(m=>m.type==="image")}),C&&C.length>0&&(u=u.concat(C))}}return!u||u.length===0?[{type:"paragraph",children:[{text:""}]}]:Nm(u)}function Uh(e,t){const r=[];return console.log("\u{1F3AF} deserializeHtmlNode \u5F00\u59CB\u89E3\u6790:",{nodeType:e.nodeType,nodeName:e.nodeName,basePath:t,childNodesCount:e.childNodes.length}),((n,o)=>(o.forEach(i=>{var c;if(i.nodeType===Node.ELEMENT_NODE){const u=i;switch(console.log("\u{1F50D} \u5904\u7406\u5143\u7D20\u8282\u70B9:",{tagName:u.tagName,isImg:u.tagName==="IMG",src:u.getAttribute("src"),basePath:t}),u.tagName.toLowerCase()){case"p":n.push({type:"paragraph",children:jr(u,t)});break;case"h1":n.push({type:"heading-one",children:jr(u,t)});break;case"h2":n.push({type:"heading-two",children:jr(u,t)});break;case"h3":n.push({type:"heading-three",children:jr(u,t)});break;case"ul":n.push({type:"bulleted-list",children:Array.from(u.children).map(d=>({type:"list-item",children:jr(d)}))});break;case"ol":const f={type:"numbered-list",children:Array.from(u.children).map(d=>({type:"list-item",children:jr(d)}))};n.push(f);break;case"li":n.push({type:"list-item",children:jr(u,t)});break;case"pre":{const d=u.querySelector("code");let p;if(d){const v=(d.getAttribute("class")||"").match(/language-(\w+)/);v&&(p=v[1]),n.push({type:"code-block",language:p,children:jr(d)})}else n.push({type:"code-block",language:p,children:jr(u,t)});break}case"code":{u.closest("pre")||n.push({type:"paragraph",children:jr(u,t)});break}case"retrive-tag":{const d=jr(u,t);d.length>0&&n.push({type:"paragraph",children:d});break}case"retrieve-sql-data":{const d=u.getAttribute("id")||"";n.push({type:"retrieve-sql-data",id:d,children:[{text:""}]});break}case"blockquote":n.push({type:"block-quote",children:jr(u,t)});break;case"table":n.push(Vw(u));break;case"img":{const d=u.getAttribute("src")||"",p=u.getAttribute("alt")||"";let v=d;if(t)if(d.startsWith("./"))v=d.replace(/^\.\//,t+"/");else if(d.startsWith("../")){const g=t.substring(0,t.lastIndexOf("/"));v=d.replace(/^\.\.\//,g+"/")}else!d.startsWith("/")&&!d.startsWith("http")&&(v=`${t}/${d}`);console.log("\u56FE\u7247\u8DEF\u5F84\u5904\u7406:",{src:d,basePath:t,processedSrc:v}),n.push({type:"image",url:v,alt:p,children:[{text:""}]});break}case"iframe":{const d=u.getAttribute("src")||"",p=u.getAttribute("width")||"100%",v=u.getAttribute("height")||"400",g=u.getAttribute("frameborder")||"0",x=u.getAttribute("title")||"";let w=d;if(t)if(d.startsWith("./"))w=d.replace(/^\.\//,t+"/");else if(d.startsWith("../")){const C=t.substring(0,t.lastIndexOf("/"));w=d.replace(/^\.\.\//,C+"/")}else!d.startsWith("/")&&!d.startsWith("http")&&(w=`${t}/${d}`);console.log("iframe\u8DEF\u5F84\u5904\u7406:",{src:d,basePath:t,processedSrc:w}),n.push({type:"iframe",src:w,width:p,height:v,frameborder:g,title:x,children:[{text:""}]});break}case"latex-inline":{const d=ds(u.getAttribute("data-formula"));n.push({type:"latex-inline",formula:d,children:[{text:""}]});break}case"latex-block":{const d=ds(u.getAttribute("data-formula"));n.push({type:"latex-block",formula:d,children:[{text:""}]});break}case"think-block":n.push({type:"think",children:jr(u)});break;default:n.push({type:"paragraph",children:jr(u,t)});break}}else i.nodeType===Node.TEXT_NODE&&((c=i.textContent)!=null&&c.trim())&&n.push({type:"paragraph",children:[{text:i.textContent}]})}),n))(r,e.childNodes),r}function jr(e,t){const r=[];function n(i){const c=[];let u="",f=!1,d=!1,p=0;for(;p<i.length;)i.startsWith("**",p)?(u&&(c.push({text:u,code:!0,bold:f,italic:d}),u=""),f=!f,p+=2):i.startsWith("*",p)?(u&&(c.push({text:u,code:!0,bold:f,italic:d}),u=""),d=!d,p+=1):(u+=i[p],p+=1);return u&&c.push({text:u,code:!0,bold:f,italic:d}),c}function o(i,c={}){var u,f;if(i.nodeType===Node.TEXT_NODE){const d=(u=i.textContent)==null?void 0:u.trim();return d?c.code?n(d):[{text:d,...c}]:[]}if(i.nodeType===Node.ELEMENT_NODE){const d=i,p={...c};switch(d.tagName.toLowerCase()){case"em":case"i":p.italic=!0;break;case"strong":case"b":p.bold=!0;break;case"code":d.closest("pre")||(p.code=!0);break;case"del":case"s":p.strikethrough=!0;break;case"u":p.underline=!0;break;case"a":p.link=d.getAttribute("href")||void 0;break;case"retrive-tag":{const g={};for(const{name:x,value:w}of Array.from(d.attributes))g[x]=w;return[{text:d.textContent||""||"[0]",retrive:!0,...g}]}case"retrieve-sql-data":return[{type:"retrieve-sql-data",id:d.getAttribute("id")||"",children:[{text:""}]}];case"img":{const g=d.getAttribute("src")||"",x=d.getAttribute("alt")||"";console.log("\u{1F50D} deserializeChildren \u5904\u7406\u5D4C\u5957\u56FE\u7247:",{src:g,alt:x,basePath:t});let w=g;if(t)if(g.startsWith("./"))w=g.replace(/^\.\//,t+"/");else if(g.startsWith("../")){const C=t.substring(0,t.lastIndexOf("/"));w=g.replace(/^\.\.\//,C+"/")}else!g.startsWith("/")&&!g.startsWith("http")&&(w=`${t}/${g}`);return console.log("\u{1F50D} deserializeChildren \u56FE\u7247\u8DEF\u5F84\u8F6C\u6362:",{src:g,processedSrc:w}),[{type:"image",url:w,alt:x,children:[{text:""}]}]}case"iframe":{const g=d.getAttribute("src")||"",x=d.getAttribute("width")||"100%",w=d.getAttribute("height")||"400",C=d.getAttribute("frameborder")||"0",m=d.getAttribute("title")||"";console.log("\u{1F50D} deserializeChildren \u5904\u7406\u5D4C\u5957iframe:",{src:g,width:x,height:w,basePath:t});let A=g;if(t)if(g.startsWith("./"))A=g.replace(/^\.\//,t+"/");else if(g.startsWith("../")){const S=t.substring(0,t.lastIndexOf("/"));A=g.replace(/^\.\.\//,S+"/")}else!g.startsWith("/")&&!g.startsWith("http")&&(A=`${t}/${g}`);return console.log("\u{1F50D} deserializeChildren iframe\u8DEF\u5F84\u8F6C\u6362:",{src:g,processedSrc:A}),[{type:"iframe",src:A,width:x,height:w,frameborder:C,title:m,children:[{text:""}]}]}case"latex-inline":return[{type:"latex-inline",formula:ds(d.getAttribute("data-formula")),children:[{text:""}]}];case"latex-block":return[{type:"latex-block",formula:ds(d.getAttribute("data-formula")),children:[{text:""}]}]}if(d.childNodes.length===0&&((f=d.textContent)!=null&&f.trim()))return p.code?n(d.textContent):[{text:d.textContent,...p}];let v=[];for(const g of Array.from(d.childNodes))v=v.concat(o(g,p));return v}return[]}for(const i of Array.from(e.childNodes))r.push(...o(i));return r}function Vw(e){const t=[],r=e.querySelector("thead"),n=e.querySelector("tbody");if(!r&&!n){const o=Array.from(e.querySelectorAll("tr"));o.length>0&&(t.push({type:"table-row",children:Array.from(o[0].children).map(i=>({type:"table-cell",header:!0,children:jr(i)}))}),o.slice(1).forEach(i=>{t.push({type:"table-row",children:Array.from(i.children).map(c=>({type:"table-cell",header:!1,children:jr(c)}))})}))}else{if(r){const o=r.querySelector("tr");o&&t.push({type:"table-row",children:Array.from(o.querySelectorAll("th")).map(i=>({type:"table-cell",header:!0,children:jr(i)}))})}n&&Array.from(n.querySelectorAll("tr")).forEach(o=>{t.push({type:"table-row",children:Array.from(o.querySelectorAll("td")).map(i=>({type:"table-cell",header:!1,children:jr(i)}))})})}return{type:"table",children:t}}const Uw=Le.div.attrs({className:"unified-rich-text-container"})`
|
|
1067
|
-
border: ${e=>e.$isEditing?"1px solid #dee2e6":"none"};
|
|
1068
|
-
border-radius: ${e=>{var t;return((t=e.theme)==null?void 0:t.borderRadius)||"4px"}};
|
|
1069
|
-
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"transparent"}};
|
|
1070
|
-
min-height: ${e=>{var t;return((t=e.theme)==null?void 0:t.minHeight)||"200px"}};
|
|
1071
|
-
overflow: hidden;
|
|
1072
|
-
transition: all 0.2s ease-in-out;
|
|
1073
|
-
padding-top: 14px;
|
|
1074
|
-
${e=>{var t,r;return e.$isEditing&&`
|
|
1075
|
-
&:focus-within {
|
|
1076
|
-
border-color: ${((t=e.theme)==null?void 0:t.primaryColor)||"#007bff"};
|
|
1077
|
-
box-shadow: 0 0 0 2px ${((r=e.theme)==null?void 0:r.primaryColor)||"#007bff"}20;
|
|
1078
|
-
}
|
|
1079
|
-
`}}
|
|
1080
|
-
`,Yl=Le.div.attrs({className:"unified-rich-text-editable-container"})`
|
|
1081
|
-
padding: ${e=>{var t;return((t=e.theme)==null?void 0:t.padding)||"0rem 1rem"}};
|
|
1082
|
-
min-height: inherit;
|
|
1083
|
-
outline: none;
|
|
1084
|
-
|
|
1085
|
-
& > * + * {
|
|
1086
|
-
margin-top: ${e=>{var t;return((t=e.theme)==null?void 0:t.margin)||"0.5rem"}};
|
|
1087
|
-
}
|
|
1088
|
-
`,Xh=(e,t)=>t<0?e:`${e.slice(0,t)}\\${e.slice(t)}`,Gh=(e,t)=>{if(!e)return-1;const r=t.length;let n=-1;for(let o=0;o<e.length;o++){if(e[o]==="\\"){o+=1;continue}if(r===2){if(e.startsWith("$$",o)){n===-1?n=o:n=-1,o+=1;continue}}else if(r===1&&e[o]==="$"){if(e[o+1]==="$"){o+=1;continue}n===-1?n=o:n=-1}}return n},Xw=e=>{const t=e||"";if(!t)return{content:"",hasPendingLatex:!1};let r=t,n=!1;const o=[],i=Gh(t,"$$");i!==-1&&(r=Xh(r,i),o.push(i),n=!0);const c=Gh(t,"$");if(c!==-1){const u=o.filter(f=>f<=c).length;r=Xh(r,c+u),n=!0}return{content:r,hasPendingLatex:n}};var Ya=(e=>(e.SLATE="slate",e.MARKDOWN="markdown",e.HTML="html",e.TEXT="text",e))(Ya||{});const Fs=({dataSource:e,isEditing:t=!1,placeholder:r="\u5F00\u59CB\u8F93\u5165...",basePath:n,size:o="sm",theme:i={},onChange:c,onFocus:u,onBlur:f,renderElement:d,renderLeaf:p,onRetriveTagClick:v,eventsEmit:g,onEditorReady:x,extraProps:w={},className:C,style:m,styles:A,enableTemplateInput:S=!1,disabledTags:D=[],enablePrism:$=!1})=>{const F=fs(),B=ht(()=>{var be,X,fe,ce,se,oe,he,we,Ce;return{primaryColor:((be=F==null?void 0:F.colors)==null?void 0:be.primary)||(i==null?void 0:i.primaryColor)||"#007bff",secondaryColor:((X=F==null?void 0:F.colors)==null?void 0:X.secondary)||(i==null?void 0:i.secondaryColor)||"#6c757d",backgroundColor:((fe=F==null?void 0:F.colors)==null?void 0:fe.background)||(i==null?void 0:i.backgroundColor)||"transparent",textColor:((ce=F==null?void 0:F.colors)==null?void 0:ce.text)||(i==null?void 0:i.textColor)||"#24292f",borderColor:((se=F==null?void 0:F.colors)==null?void 0:se.border)||(i==null?void 0:i.borderColor)||"#dee2e6",disabledBackground:((oe=F==null?void 0:F.colors)==null?void 0:oe.disabledBackground)||(i==null?void 0:i.disabledBackground)||"#f8f9fa",hoverBackground:(i==null?void 0:i.hoverBackground)||"rgba(0,0,0,0.06)",borderRadius:((he=F==null?void 0:F.space)==null?void 0:he.radius)||(i==null?void 0:i.borderRadius)||"4px",padding:((we=F==null?void 0:F.space)==null?void 0:we.padding)||(i==null?void 0:i.padding)||"0rem 1rem",margin:((Ce=F==null?void 0:F.space)==null?void 0:Ce.margin)||(i==null?void 0:i.margin)||"0.5rem",minHeight:(i==null?void 0:i.minHeight)||"200px",baseFontSize:(i==null?void 0:i.baseFontSize)||(o==="md"?14:12),...i}},[F,i,o]),R=Ht();if(!R.current){const be=e8(),X=py(be),{isInline:fe}=X;X.isInline=oe=>!D.includes("template")&&oe.type==="template"?!0:fe(oe);const{isVoid:ce}=X;X.isVoid=oe=>!D.includes("template")&&oe.type==="template"?!0:ce(oe);const se=oe=>{if(!(S&&!D.includes("template")))return oe;const{insertText:he,insertData:we}=oe,Ce=()=>{const ke=/<template>([^<]*)<\/template>/g,Se=Array.from(P.nodes(oe,{match:Te=>ct.isText(Te)&&ke.test(Te.text)}));if(Se.length!==0)for(const Te of Se){const[Ie,We]=Te,ut=Ie.text||"",ot=[];let Oe=0,je;for(ke.lastIndex=0;(je=ke.exec(ut))!==null;){if(je.index>Oe){const Ve=ut.slice(Oe,je.index);Ve&&ot.push({text:Ve})}ot.push({type:"template",placeholder:(je[1]||"").trim(),value:"",style:"blue",fieldId:`template-${Date.now()}-${Math.random().toString(36).slice(2,7)}`,children:[{text:""}],inline:!0}),Oe=je.index+je[0].length}if(Oe<ut.length){const Ve=ut.slice(Oe);Ve&&ot.push({text:Ve})}qe.removeNodes(oe,{at:We}),qe.insertNodes(oe,ot,{at:We})}};return oe.insertText=ke=>{he(ke),Ce()},oe.insertData=ke=>{const Se=ke.getData("text/plain");if(Se&&/<template>[\s\S]*?<\/template>/.test(Se)){he(Se),Ce();return}return we(ke)},oe};R.current=se(X)}const I=R.current;Jt(()=>{I&&x&&t&&x(I)},[I,x,t]);const[T,W]=St(()=>e.type==="slate"?e.content||[{type:"paragraph",children:[{text:""}]}]:[{type:"paragraph",children:[{text:""}]}]),[H,Z]=St(0);Jt(()=>{if(e.type==="slate"){console.log("UnifiedRichText: dataSource.content \u53D8\u5316:",e.content);const be=e.content||[{type:"paragraph",children:[{text:""}]}];console.log("UnifiedRichText: \u8BBE\u7F6E\u65B0\u7684 value:",be),W(be),Z(X=>X+1)}},[e.type,e.content]);const Y=Ht(void 0),j=ht(()=>{if(e.type!=="markdown")return{content:"",hasPendingLatex:!1};const be=typeof e.content=="string"?e.content:JSON.stringify(e.content||"");return Xw(be)},[e.type,e.content]);Jt(()=>{if(e.type!=="markdown")return;const be=j.content;Y.current!==be&&(Y.current=be,Z(X=>X+1))},[e.type,j.content]);const K=ht(()=>e.type!=="markdown"?w:{...w||{},hasPendingLatex:j.hasPendingLatex},[w,e.type,j.hasPendingLatex]),U=Ht("");Jt(()=>{if(e.type!=="markdown")return;const be=JSON.stringify(K||{});be!==U.current&&(U.current=be,Z(X=>X+1))},[K,e.type]);const G=Bt(be=>{console.log("UnifiedRichText: \u5185\u5BB9\u53D8\u5316:",be),be&&Array.isArray(be)?(W(be),c==null||c(be,"slate")):console.log("UnifiedRichText: \u5FFD\u7565\u65E0\u6548\u7684\u5185\u5BB9\u53D8\u5316:",be)},[c]),J=ht(()=>{const be=B==null?void 0:B.baseFontSize;return typeof be=="number"&&!Number.isNaN(be)?be:o==="md"?14:12},[B,o]),z=Bt(be=>{const X={...be,size:o,styles:A,eventsEmit:g,extraProps:K,enablePrism:$};return d?d(X):Lw(X)},[d,o,A,g,K,$]),ie=Bt(be=>{const X={...be,styles:A,onRetriveTagClick:v};return p?p(X):Hw(X)},[p,A,v]);Jt(()=>(window.copyCodeFromData=be=>{const X=be.getAttribute("data-code");if(!X){console.error("No code content found");return}const fe=X.replace(/\\n/g,`
|
|
1089
|
-
`).replace(/\\r/g,"\r").replace(/\\t/g," ").replace(/\\'/g,"'").replace(/\\\\/g,"\\").replace(/"/g,'"');navigator.clipboard.writeText(fe).then(()=>{const ce=be.innerHTML;be.innerHTML='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#2da44e" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20,6 9,17 4,12"></polyline></svg>',be.classList.add("copied"),setTimeout(()=>{be.innerHTML=ce,be.classList.remove("copied")},2e3)}).catch(ce=>{console.error("\u590D\u5236\u5931\u8D25:",ce);const se=be.innerHTML;be.innerHTML='<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>',be.style.background="#d73a49",be.style.borderColor="#d73a49",be.style.color="white",setTimeout(()=>{be.innerHTML=se,be.style.background="",be.style.borderColor="",be.style.color=""},2e3)})},()=>{delete window.copyCodeFromData}),[]);const ge=ht(()=>{var be,X;if(e.type!=="markdown")return null;try{console.log("\u{1F50D} UnifiedRichText processing Markdown content:",{contentLength:(be=j.content)==null?void 0:be.length,basePath:n,hasImages:(X=j.content)==null?void 0:X.includes("![")});const fe=Tm(j.content||"",{basePath:n});if(console.log("\u{1F3AF} Deserialized Slate content:",{slateLength:fe.length,hasImageElements:fe.some(Ce=>Ce.type==="image"),imageElements:fe.filter(Ce=>Ce.type==="image")}),fe&&fe.length>0)return q.jsx(Gl,{theme:B,$size:o,children:q.jsx(jl,{editor:I,initialValue:fe,onChange:()=>{},children:q.jsx(Yl,{theme:B,children:q.jsx(Il,{renderElement:z,renderLeaf:ie,readOnly:!0,style:{minHeight:"inherit",outline:"none",border:"none",background:"transparent",fontSize:`${J}px`}})})},H)});const ce={breaks:!0,gfm:!0,headerIds:!0,mangle:!1,sanitize:!1,pedantic:!1,smartLists:!0,smartypants:!0};let se=ar(j.content||"",ce);se=se.replace(/<table([^>]*)>/g,'<div class="table-container"><table$1>'),se=se.replace(/<\/table>/g,"</table></div>"),se=se.replace(/<pre><code([^>]*)>([\s\S]*?)<\/code><\/pre>/g,(Ce,ke,Se)=>{let Te;const Ie=ke.match(/class=["']([^"']+)["']/);if(Ie){const ot=Ie[1].match(/language-(\w+)/);ot&&(Te=ot[1])}let We=Se;if(Te&&Qo.languages[Te])try{We=Qo.highlight(Se,Qo.languages[Te],Te)}catch(ot){console.warn("Failed to highlight code:",ot),We=Se}const ut=Se.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/"/g,""");return`<div class="code-block-wrapper">${Te?`<div class="code-block-language">${Te}</div>`:""}<pre><code${ke}>${We}</code><button class="code-copy-btn" data-code="${ut}" onclick="copyCodeFromData(this)" title="\u590D\u5236\u4EE3\u7801"><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg></button></pre></div>`});const oe=(B==null?void 0:B.disabledBackground)||(B==null?void 0:B.backgroundColor)||"#ffffff",he=(Ce,ke)=>Ce.startsWith("#")?`${Ce}${Math.round(ke*255).toString(16).padStart(2,"0")}`:Ce,we=`
|
|
1090
|
-
<style>
|
|
1091
|
-
.table-container{ overflow:auto; border:1px solid ${(B==null?void 0:B.borderColor)||"#e5e7eb"}; border-radius: 6px; background:${(B==null?void 0:B.backgroundColor)||"transparent"} !important; }
|
|
1092
|
-
.table-container table{ background:${(B==null?void 0:B.backgroundColor)||"transparent"} !important; color:${(B==null?void 0:B.textColor)||"#24292f"} !important; }
|
|
1093
|
-
.table-container th{ background:${(B==null?void 0:B.disabledBackground)||"#f6f8fa"} !important; color:${(B==null?void 0:B.textColor)||"#24292f"} !important; }
|
|
1094
|
-
.table-container td{ color:${(B==null?void 0:B.textColor)||"#24292f"} !important; background:${(B==null?void 0:B.backgroundColor)||"transparent"} !important; }
|
|
1095
|
-
.table-container tr:nth-child(even) td{ background:${(B==null?void 0:B.disabledBackground)||"#f6f8fa"} !important; }
|
|
1096
|
-
.code-block-wrapper{ position:relative; margin:16px 0; border-radius:6px; overflow:hidden; border:1px solid ${(B==null?void 0:B.borderColor)||"#d0d7de"}; background:${oe}; }
|
|
1097
|
-
.code-block-language{ display:flex; align-items:center; justify-content:space-between; padding:8px 12px; background:${(B==null?void 0:B.disabledBackground)||"#f6f8fa"}; border-bottom:1px solid ${(B==null?void 0:B.borderColor)||"#d0d7de"}; font-size:12px; color:${(B==null?void 0:B.textColor)||"#656d76"}; font-weight:500; }
|
|
1098
|
-
.code-block-wrapper pre{ position:relative; margin:0; padding:16px; overflow-x:auto; background:${oe}; border:none; border-radius:0; color:${(B==null?void 0:B.textColor)||"#24292f"}; font-family:'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace; font-size:13px; line-height:1.6; }
|
|
1099
|
-
.code-block-wrapper pre code{ background:transparent; padding:0; color:inherit; font-size:inherit; font-family:inherit; }
|
|
1100
|
-
.code-block-wrapper pre .code-copy-btn{ position:absolute; top:8px; right:8px; background:transparent; border:1px solid ${(B==null?void 0:B.borderColor)||"#e5e7eb"}; color:${(B==null?void 0:B.textColor)||"#24292f"}; border-radius:4px; padding:4px 8px; cursor:pointer; font-size:12px; transition:all 0.2s ease; }
|
|
1101
|
-
.code-block-wrapper pre .code-copy-btn:hover{ background:${(B==null?void 0:B.hoverBackground)||"rgba(0,0,0,0.06)"}; }
|
|
1102
|
-
.code-block-wrapper pre .code-copy-btn.copied{ background:#2da44e; border-color:#2da44e; color:#ffffff; }
|
|
1103
|
-
</style>
|
|
1104
|
-
`;return q.jsx("div",{style:{padding:(B==null?void 0:B.padding)||"1rem",fontSize:`${J}px`,lineHeight:1.6,color:(B==null?void 0:B.textColor)||"#24292f"},"data-pending-latex":j.hasPendingLatex||void 0,dangerouslySetInnerHTML:{__html:we+se}})}catch(fe){return console.error("Markdown parsing error:",fe),q.jsx("div",{children:e.content})}},[e,B,I,H,z,ie,J,j]),xe=ht(()=>e.type!=="html"?null:q.jsx("div",{style:{padding:(B==null?void 0:B.padding)||"1rem",fontSize:`${J}px`,lineHeight:1.6,color:(B==null?void 0:B.textColor)||"#24292f"},dangerouslySetInnerHTML:{__html:e.content||""}}),[e,B,J]),Ae=ht(()=>e.type!=="text"?null:q.jsx("div",{style:{padding:(B==null?void 0:B.padding)||"1rem",fontSize:`${J}px`,lineHeight:1.6,color:(B==null?void 0:B.textColor)||"#24292f"},children:q.jsx("span",{children:e.content||""})}),[e,B,J]),Fe=()=>{switch(e.type){case"markdown":return ge;case"html":return xe;case"text":return Ae;case"slate":default:return t?q.jsx(Gl,{theme:B,$size:o,children:q.jsx(jl,{editor:I,initialValue:T,onChange:G,children:q.jsx(Yl,{theme:B,children:q.jsx(Il,{renderElement:z,renderLeaf:ie,placeholder:r,readOnly:!1,onFocus:u,onBlur:f,style:{minHeight:"inherit",outline:"none",fontSize:`${J}px`}})})},H)}):q.jsx(Gl,{theme:B,$size:o,children:q.jsx(jl,{editor:I,initialValue:T,onChange:()=>{},children:q.jsx(Yl,{theme:B,children:q.jsx(Il,{renderElement:z,renderLeaf:ie,readOnly:!0,style:{minHeight:"inherit",outline:"none",border:"none",background:"transparent",fontSize:`${J}px`}})})},H)})}};return q.jsx(Uw,{theme:B,$isEditing:t,className:C,style:m,children:Fe()})};var V0={exports:{}},Gw=V0.exports,Yh;function Yw(){return Yh||(Yh=1,(function(e,t){(function(r,n){e.exports=n()})(Gw,(function(){var r=1e3,n=6e4,o=36e5,i="millisecond",c="second",u="minute",f="hour",d="day",p="week",v="month",g="quarter",x="year",w="date",C="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,A=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,S={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(j){var K=["th","st","nd","rd"],U=j%100;return"["+j+(K[(U-20)%10]||K[U]||K[0])+"]"}},D=function(j,K,U){var G=String(j);return!G||G.length>=K?j:""+Array(K+1-G.length).join(U)+j},$={s:D,z:function(j){var K=-j.utcOffset(),U=Math.abs(K),G=Math.floor(U/60),J=U%60;return(K<=0?"+":"-")+D(G,2,"0")+":"+D(J,2,"0")},m:function j(K,U){if(K.date()<U.date())return-j(U,K);var G=12*(U.year()-K.year())+(U.month()-K.month()),J=K.clone().add(G,v),z=U-J<0,ie=K.clone().add(G+(z?-1:1),v);return+(-(G+(U-J)/(z?J-ie:ie-J))||0)},a:function(j){return j<0?Math.ceil(j)||0:Math.floor(j)},p:function(j){return{M:v,y:x,w:p,d,D:w,h:f,m:u,s:c,ms:i,Q:g}[j]||String(j||"").toLowerCase().replace(/s$/,"")},u:function(j){return j===void 0}},F="en",B={};B[F]=S;var R="$isDayjsObject",I=function(j){return j instanceof Z||!(!j||!j[R])},T=function j(K,U,G){var J;if(!K)return F;if(typeof K=="string"){var z=K.toLowerCase();B[z]&&(J=z),U&&(B[z]=U,J=z);var ie=K.split("-");if(!J&&ie.length>1)return j(ie[0])}else{var ge=K.name;B[ge]=K,J=ge}return!G&&J&&(F=J),J||!G&&F},W=function(j,K){if(I(j))return j.clone();var U=typeof K=="object"?K:{};return U.date=j,U.args=arguments,new Z(U)},H=$;H.l=T,H.i=I,H.w=function(j,K){return W(j,{locale:K.$L,utc:K.$u,x:K.$x,$offset:K.$offset})};var Z=(function(){function j(U){this.$L=T(U.locale,null,!0),this.parse(U),this.$x=this.$x||U.x||{},this[R]=!0}var K=j.prototype;return K.parse=function(U){this.$d=(function(G){var J=G.date,z=G.utc;if(J===null)return new Date(NaN);if(H.u(J))return new Date;if(J instanceof Date)return new Date(J);if(typeof J=="string"&&!/Z$/i.test(J)){var ie=J.match(m);if(ie){var ge=ie[2]-1||0,xe=(ie[7]||"0").substring(0,3);return z?new Date(Date.UTC(ie[1],ge,ie[3]||1,ie[4]||0,ie[5]||0,ie[6]||0,xe)):new Date(ie[1],ge,ie[3]||1,ie[4]||0,ie[5]||0,ie[6]||0,xe)}}return new Date(J)})(U),this.init()},K.init=function(){var U=this.$d;this.$y=U.getFullYear(),this.$M=U.getMonth(),this.$D=U.getDate(),this.$W=U.getDay(),this.$H=U.getHours(),this.$m=U.getMinutes(),this.$s=U.getSeconds(),this.$ms=U.getMilliseconds()},K.$utils=function(){return H},K.isValid=function(){return this.$d.toString()!==C},K.isSame=function(U,G){var J=W(U);return this.startOf(G)<=J&&J<=this.endOf(G)},K.isAfter=function(U,G){return W(U)<this.startOf(G)},K.isBefore=function(U,G){return this.endOf(G)<W(U)},K.$g=function(U,G,J){return H.u(U)?this[G]:this.set(J,U)},K.unix=function(){return Math.floor(this.valueOf()/1e3)},K.valueOf=function(){return this.$d.getTime()},K.startOf=function(U,G){var J=this,z=!!H.u(G)||G,ie=H.p(U),ge=function(se,oe){var he=H.w(J.$u?Date.UTC(J.$y,oe,se):new Date(J.$y,oe,se),J);return z?he:he.endOf(d)},xe=function(se,oe){return H.w(J.toDate()[se].apply(J.toDate("s"),(z?[0,0,0,0]:[23,59,59,999]).slice(oe)),J)},Ae=this.$W,Fe=this.$M,be=this.$D,X="set"+(this.$u?"UTC":"");switch(ie){case x:return z?ge(1,0):ge(31,11);case v:return z?ge(1,Fe):ge(0,Fe+1);case p:var fe=this.$locale().weekStart||0,ce=(Ae<fe?Ae+7:Ae)-fe;return ge(z?be-ce:be+(6-ce),Fe);case d:case w:return xe(X+"Hours",0);case f:return xe(X+"Minutes",1);case u:return xe(X+"Seconds",2);case c:return xe(X+"Milliseconds",3);default:return this.clone()}},K.endOf=function(U){return this.startOf(U,!1)},K.$set=function(U,G){var J,z=H.p(U),ie="set"+(this.$u?"UTC":""),ge=(J={},J[d]=ie+"Date",J[w]=ie+"Date",J[v]=ie+"Month",J[x]=ie+"FullYear",J[f]=ie+"Hours",J[u]=ie+"Minutes",J[c]=ie+"Seconds",J[i]=ie+"Milliseconds",J)[z],xe=z===d?this.$D+(G-this.$W):G;if(z===v||z===x){var Ae=this.clone().set(w,1);Ae.$d[ge](xe),Ae.init(),this.$d=Ae.set(w,Math.min(this.$D,Ae.daysInMonth())).$d}else ge&&this.$d[ge](xe);return this.init(),this},K.set=function(U,G){return this.clone().$set(U,G)},K.get=function(U){return this[H.p(U)]()},K.add=function(U,G){var J,z=this;U=Number(U);var ie=H.p(G),ge=function(Fe){var be=W(z);return H.w(be.date(be.date()+Math.round(Fe*U)),z)};if(ie===v)return this.set(v,this.$M+U);if(ie===x)return this.set(x,this.$y+U);if(ie===d)return ge(1);if(ie===p)return ge(7);var xe=(J={},J[u]=n,J[f]=o,J[c]=r,J)[ie]||1,Ae=this.$d.getTime()+U*xe;return H.w(Ae,this)},K.subtract=function(U,G){return this.add(-1*U,G)},K.format=function(U){var G=this,J=this.$locale();if(!this.isValid())return J.invalidDate||C;var z=U||"YYYY-MM-DDTHH:mm:ssZ",ie=H.z(this),ge=this.$H,xe=this.$m,Ae=this.$M,Fe=J.weekdays,be=J.months,X=J.meridiem,fe=function(oe,he,we,Ce){return oe&&(oe[he]||oe(G,z))||we[he].slice(0,Ce)},ce=function(oe){return H.s(ge%12||12,oe,"0")},se=X||function(oe,he,we){var Ce=oe<12?"AM":"PM";return we?Ce.toLowerCase():Ce};return z.replace(A,(function(oe,he){return he||(function(we){switch(we){case"YY":return String(G.$y).slice(-2);case"YYYY":return H.s(G.$y,4,"0");case"M":return Ae+1;case"MM":return H.s(Ae+1,2,"0");case"MMM":return fe(J.monthsShort,Ae,be,3);case"MMMM":return fe(be,Ae);case"D":return G.$D;case"DD":return H.s(G.$D,2,"0");case"d":return String(G.$W);case"dd":return fe(J.weekdaysMin,G.$W,Fe,2);case"ddd":return fe(J.weekdaysShort,G.$W,Fe,3);case"dddd":return Fe[G.$W];case"H":return String(ge);case"HH":return H.s(ge,2,"0");case"h":return ce(1);case"hh":return ce(2);case"a":return se(ge,xe,!0);case"A":return se(ge,xe,!1);case"m":return String(xe);case"mm":return H.s(xe,2,"0");case"s":return String(G.$s);case"ss":return H.s(G.$s,2,"0");case"SSS":return H.s(G.$ms,3,"0");case"Z":return ie}return null})(oe)||ie.replace(":","")}))},K.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},K.diff=function(U,G,J){var z,ie=this,ge=H.p(G),xe=W(U),Ae=(xe.utcOffset()-this.utcOffset())*n,Fe=this-xe,be=function(){return H.m(ie,xe)};switch(ge){case x:z=be()/12;break;case v:z=be();break;case g:z=be()/3;break;case p:z=(Fe-Ae)/6048e5;break;case d:z=(Fe-Ae)/864e5;break;case f:z=Fe/o;break;case u:z=Fe/n;break;case c:z=Fe/r;break;default:z=Fe}return J?z:H.a(z)},K.daysInMonth=function(){return this.endOf(v).$D},K.$locale=function(){return B[this.$L]},K.locale=function(U,G){if(!U)return this.$L;var J=this.clone(),z=T(U,G,!0);return z&&(J.$L=z),J},K.clone=function(){return H.w(this.$d,this)},K.toDate=function(){return new Date(this.valueOf())},K.toJSON=function(){return this.isValid()?this.toISOString():null},K.toISOString=function(){return this.$d.toISOString()},K.toString=function(){return this.$d.toUTCString()},j})(),Y=Z.prototype;return W.prototype=Y,[["$ms",i],["$s",c],["$m",u],["$H",f],["$W",d],["$M",v],["$y",x],["$D",w]].forEach((function(j){Y[j[1]]=function(K){return this.$g(K,j[0],j[1])}})),W.extend=function(j,K){return j.$i||(j(K,Z,W),j.$i=!0),W},W.locale=T,W.isDayjs=I,W.unix=function(j){return W(1e3*j)},W.en=B[F],W.Ls=B,W.p={},W}))})(V0)),V0.exports}var Zw=Yw();const Jw=ri(Zw),Zl=({src:e,index:t,token:r,url:n,eventsEmit:o,...i})=>{const[c,u]=St(""),f=async v=>{try{const g=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json",Authorization:r},body:JSON.stringify({convertedFilePath:v})});if(!g.ok)throw new Error(`Fetch failed: ${g.status}`);return{data:await g.arrayBuffer()}}catch{return null}},d=async v=>{const g=await f(v);if(!g)return;const x=new Blob([g.data]);return window.URL.createObjectURL(x)},p=async v=>{const g=await d(v);u(g||"")};return Jt(()=>{try{if(!r||!n){u(e);return}p(e)}catch{u(e)}},[e]),q.jsx(q.Fragment,{children:c&&q.jsx(E1,{src:c,...i,preview:!1,onClick:()=>o&&o("imageClick",c)},t||1)})},Qw=e=>N.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},N.createElement("g",{clipPath:"url(#clip0_5260_38039)"},N.createElement("path",{d:"M8.00004 14.6668C11.6819 14.6668 14.6667 11.6821 14.6667 8.00016C14.6667 4.31826 11.6819 1.3335 8.00004 1.3335C4.31814 1.3335 1.33337 4.31826 1.33337 8.00016C1.33337 11.6821 4.31814 14.6668 8.00004 14.6668Z",fill:"#4E6EF2",stroke:"#4E6EF2",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"}),N.createElement("path",{d:"M6 7.99984L7.33333 9.33317L10 6.6665",stroke:"white",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"})),N.createElement("defs",null,N.createElement("clipPath",{id:"clip0_5260_38039"},N.createElement("rect",{width:16,height:16,fill:"white"})))),eC=e=>N.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},N.createElement("path",{d:"M14.4867 12L9.15333 2.66665C9.03704 2.46146 8.8684 2.29078 8.66462 2.17203C8.46083 2.05329 8.22919 1.99072 7.99333 1.99072C7.75747 1.99072 7.52584 2.05329 7.32205 2.17203C7.11826 2.29078 6.94962 2.46146 6.83333 2.66665L1.5 12C1.38245 12.2036 1.32082 12.4346 1.32134 12.6697C1.32186 12.9047 1.38452 13.1355 1.50296 13.3385C1.62141 13.5416 1.79143 13.7097 1.9958 13.8259C2.20016 13.942 2.4316 14.0021 2.66667 14H13.3333C13.5673 13.9997 13.797 13.938 13.9995 13.8208C14.202 13.7037 14.3701 13.5354 14.487 13.3327C14.6039 13.1301 14.6654 12.9002 14.6653 12.6663C14.6652 12.4324 14.6036 12.2026 14.4867 12Z",fill:"#4E6EF2",stroke:"#4E6EF2",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"}),N.createElement("path",{d:"M8 6V8.66667",stroke:"white",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"}),N.createElement("path",{d:"M8 11.3335H8.00667",stroke:"white",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"})),Zh=e=>N.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},N.createElement("path",{d:"M14 7.99981C13.9999 9.26686 13.5988 10.5014 12.854 11.5264C12.1092 12.5515 11.059 13.3144 9.85392 13.7059C8.64886 14.0974 7.3508 14.0974 6.14576 13.7058C4.94073 13.3142 3.89059 12.5512 3.14584 11.5261C2.4011 10.5011 1.99999 9.26653 2 7.99947C2.00001 6.73241 2.40114 5.49788 3.14589 4.47281C3.89065 3.44773 4.9408 2.68474 6.14584 2.29319C7.35088 1.90164 8.64895 1.90162 9.854 2.29314",stroke:"#4E6EF2",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"})),tC=e=>N.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},N.createElement("g",{clipPath:"url(#clip0_5260_38091)"},N.createElement("path",{d:"M7.99998 14.6668C11.6819 14.6668 14.6666 11.6821 14.6666 8.00016C14.6666 4.31826 11.6819 1.3335 7.99998 1.3335C4.31808 1.3335 1.33331 4.31826 1.33331 8.00016C1.33331 11.6821 4.31808 14.6668 7.99998 14.6668Z",fill:"#4E6EF2",stroke:"#4E6EF2",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"}),N.createElement("path",{d:"M10 6L6 10",stroke:"white",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"}),N.createElement("path",{d:"M6 6L10 10",stroke:"white",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"})),N.createElement("defs",null,N.createElement("clipPath",{id:"clip0_5260_38091"},N.createElement("rect",{width:16,height:16,fill:"white"})))),rC=Le.div.attrs({className:"thought-chain-section-wrapper"})`
|
|
1105
|
-
padding: 12px 0 8px 0;
|
|
1106
|
-
`,nC=Le.div.attrs({className:"thought-chain-section-title-row"})`
|
|
1107
|
-
display: flex;
|
|
1108
|
-
align-items: center;
|
|
1109
|
-
gap: 8px;
|
|
1110
|
-
margin-bottom: 8px;
|
|
1111
|
-
padding-left: 20px;
|
|
1112
|
-
`,oC=km`
|
|
1113
|
-
from {
|
|
1114
|
-
transform: rotate(0deg);
|
|
1115
|
-
}
|
|
1116
|
-
to {
|
|
1117
|
-
transform: rotate(360deg);
|
|
1118
|
-
}
|
|
1119
|
-
`,aC=Le.div.attrs({className:"thought-chain-section-icon"})`
|
|
1120
|
-
width: 16px;
|
|
1121
|
-
height: 16px;
|
|
1122
|
-
flex-shrink: 0;
|
|
1123
|
-
display: flex;
|
|
1124
|
-
align-items: center;
|
|
1125
|
-
justify-content: center;
|
|
1126
|
-
|
|
1127
|
-
svg {
|
|
1128
|
-
width: 100%;
|
|
1129
|
-
height: 100%;
|
|
1130
|
-
${({$isRotating:e})=>e?Bs`
|
|
1131
|
-
animation: ${oC} 2s linear infinite;
|
|
1132
|
-
`:""}
|
|
1133
|
-
}
|
|
1134
|
-
`,iC=Le.div.attrs({className:"thought-chain-section-title"})`
|
|
1135
|
-
font-size: 14px;
|
|
1136
|
-
font-weight: 600;
|
|
1137
|
-
color: #111827;
|
|
1138
|
-
display: flex;
|
|
1139
|
-
align-items: center;
|
|
1140
|
-
gap: 6px;
|
|
1141
|
-
`;Le.span.attrs({className:"thought-chain-section-time"})`
|
|
1142
|
-
font-size: 12px;
|
|
1143
|
-
font-weight: 400;
|
|
1144
|
-
color: #6b7280;
|
|
1145
|
-
`;const sC=Le.div.attrs({className:"thought-chain-vertical-line"})`
|
|
1146
|
-
position: absolute;
|
|
1147
|
-
left: 10px;
|
|
1148
|
-
top: 0;
|
|
1149
|
-
bottom: 0;
|
|
1150
|
-
width: 2px;
|
|
1151
|
-
background: #e5e7eb;
|
|
1152
|
-
z-index: 0;
|
|
1153
|
-
`,lC=Le.div.attrs({className:"thought-chain-content-container"})`
|
|
1154
|
-
position: relative;
|
|
1155
|
-
padding-left: 0px;
|
|
1156
|
-
margin-left:18px
|
|
1157
|
-
`,uC=Le.div.attrs({className:"thought-chain-node-item"})`
|
|
1158
|
-
display: flex;
|
|
1159
|
-
align-items: flex-start;
|
|
1160
|
-
gap: 12px;
|
|
1161
|
-
padding: 8px 0;
|
|
1162
|
-
position: relative;
|
|
1163
|
-
`,cC=Le.div.attrs({className:"thought-chain-node-content-area"})`
|
|
1164
|
-
flex: 1;
|
|
1165
|
-
margin-left: 20px;
|
|
1166
|
-
display: flex;
|
|
1167
|
-
flex-direction: column;
|
|
1168
|
-
gap: 4px;
|
|
1169
|
-
`,Jh=Le.div.attrs({className:"thought-chain-content-text-wrapper"})`
|
|
1170
|
-
font-size: 13px;
|
|
1171
|
-
line-height: 1.6;
|
|
1172
|
-
color: #374151;
|
|
1173
|
-
opacity: 0.7;
|
|
1174
|
-
`,dC=Le.div.attrs({className:"thought-chain-loading-text"})`
|
|
1175
|
-
font-size: 13px;
|
|
1176
|
-
line-height: 1.6;
|
|
1177
|
-
color: #9ca3af;
|
|
1178
|
-
font-style: italic;
|
|
1179
|
-
padding-left: 15px;
|
|
1180
|
-
`;function fC(e){switch(e){case 1:return{label:"\u8FD0\u884C\u4E2D",color:"#2563eb",icon:Zh,isRotating:!0};case 2:return{label:"\u6267\u884C\u5B8C\u6210",color:"#16a34a",icon:Qw,isRotating:!1};case 3:return{label:"\u6267\u884C\u5931\u8D25",color:"#dc2626",icon:tC,isRotating:!1};case 4:return{label:"\u5F02\u5E38",color:"#f97316",icon:eC,isRotating:!1};default:return{label:"\u672A\u77E5",color:"#9ca3af",icon:Zh,isRotating:!1}}}const Jl=({title:e,content:t,nodes:r,mode:n="history"})=>{var f,d;if(!r||r.length===0)return null;const o=(f=r[0])==null?void 0:f.respTime;o&&o>0&&`${(o/1e3).toFixed(2)}`;const i=((d=r[0])==null?void 0:d.nodeStatus)??3,c=fC(i),u=c.icon;return q.jsxs(rC,{children:[q.jsxs(nC,{children:[q.jsx(aC,{$isRotating:c.isRotating,children:q.jsx(u,{})}),q.jsx(iC,{children:e})]}),q.jsxs(lC,{children:[q.jsx(sC,{}),r.map(p=>{var x,w,C,m;const v=((x=p==null?void 0:p.rawContent)==null?void 0:x.type)==="markdown"||(p==null?void 0:p.format)==="markdown"||((w=p.content)==null?void 0:w.includes("```"))||((C=p.content)==null?void 0:C.includes("**"))||((m=p.content)==null?void 0:m.includes("##")),g=p.nodeStatus===1&&!p.content;return q.jsx(uC,{children:q.jsx(cC,{children:g?q.jsx(dC,{children:"\u601D\u8003\u4E2D..."}):p.content&&(v?q.jsx(Jh,{children:q.jsx(Fs,{dataSource:{type:Ya.MARKDOWN,content:p.content},styles:{text:{fontSize:"14px",lineHeight:"1.6",color:"#374151"}},theme:{baseFontSize:14,minHeight:"auto"}})}):q.jsx(Jh,{className:"px-[15px]",children:p.content}))})},p.id)})]})]})};function ea(e,t){const r={plan:{inProgress:"\u7406\u89E3\u89C4\u5212\u4E2D",completed:"\u7406\u89E3\u89C4\u5212\u5B8C\u6210"},retrieve:{inProgress:"\u53EC\u56DE\u4E2D",completed:"\u53EC\u56DE\u6210\u529F"},think:{inProgress:"\u6A21\u578B\u601D\u8003\u4E2D",completed:"\u6A21\u578B\u601D\u8003\u5B8C\u6210"},reason:{inProgress:"\u63A8\u7406\u4E2D",completed:"\u63A8\u7406\u5B8C\u6210"}}[e]||{inProgress:"",completed:""};switch(t){case 1:return r.inProgress;case 2:return r.completed;case 3:return`${r.completed}\uFF08\u5931\u8D25\uFF09`;case 4:return`${r.completed}\uFF08\u5F02\u5E38\uFF09`;default:return r.completed}}function hC(e){return!Array.isArray(e)||e.length===0?[]:e.map((t,r)=>{var c;const n=t.businessType||"plan",o=t.nodeStatus||1,i=t.content||((c=t==null?void 0:t.reply)==null?void 0:c.content)||"";return{id:`${n}-${r}`,businessType:n,nodeStatus:o,title:ea(n,o),content:i,rawContent:t,respTime:t.respTime??t.chainRespTime??void 0}})}function a9(e,t){var f,d,p;const r=t.businessType;if(!r)return e;const n=[...e],o=n.findIndex(v=>v.businessType===r),i=((f=t.reply)==null?void 0:f.content)??"",c=t.nodeStatus!==void 0&&t.nodeStatus!==null?t.nodeStatus:o!==-1?(d=n[o])==null?void 0:d.nodeStatus:1,u=t.respTime??t.chainRespTime??((p=n[o])==null?void 0:p.respTime);if(o===-1)n.push({id:`${r}-0`,businessType:r,nodeStatus:c,title:ea(r,c),content:i,rawContent:t,respTime:u});else{const v=n[o];n[o]={...v,nodeStatus:c,title:ea(r,c),content:v.content+i,respTime:u??v.respTime,rawContent:{...v.rawContent,lastChunk:t}}}return n}const pC=Le.div.attrs({className:"thought-chain-card-wrapper"})`
|
|
1181
|
-
width: 100%;
|
|
1182
|
-
border-radius: 8px;
|
|
1183
|
-
background-color: #f9fafb;
|
|
1184
|
-
padding: 12px 16px;
|
|
1185
|
-
box-sizing: border-box;
|
|
1186
|
-
`,mC=Le.div.attrs({className:"thought-chain-card-header"})`
|
|
1187
|
-
display: flex;
|
|
1188
|
-
align-items: center;
|
|
1189
|
-
justify-content: space-between;
|
|
1190
|
-
cursor: pointer;
|
|
1191
|
-
padding: 4px 0;
|
|
1192
|
-
`,gC=Le.div.attrs({className:"thought-chain-card-header-left"})`
|
|
1193
|
-
display: flex;
|
|
1194
|
-
align-items: center;
|
|
1195
|
-
gap: 8px;
|
|
1196
|
-
flex: 1;
|
|
1197
|
-
`,vC=km`
|
|
1198
|
-
from {
|
|
1199
|
-
transform: rotate(0deg);
|
|
1200
|
-
}
|
|
1201
|
-
to {
|
|
1202
|
-
transform: rotate(360deg);
|
|
1203
|
-
}
|
|
1204
|
-
`,bC=Le.div.attrs({className:"thought-chain-card-avatar"})`
|
|
1205
|
-
width: 25px;
|
|
1206
|
-
height: 25px;
|
|
1207
|
-
border-radius: 9999px;
|
|
1208
|
-
display: flex;
|
|
1209
|
-
align-items: center;
|
|
1210
|
-
justify-content: center;
|
|
1211
|
-
flex-shrink: 0;
|
|
1212
|
-
overflow: hidden;
|
|
1213
|
-
|
|
1214
|
-
img {
|
|
1215
|
-
width: 80%;
|
|
1216
|
-
height: 80%;
|
|
1217
|
-
object-fit: contain;
|
|
1218
|
-
${({$isRotating:e})=>e?Bs`
|
|
1219
|
-
animation: ${vC} 2s linear infinite;
|
|
1220
|
-
`:""}
|
|
1221
|
-
}
|
|
1222
|
-
`,yC=Le.div.attrs({className:"thought-chain-card-header-title"})`
|
|
1223
|
-
display: flex;
|
|
1224
|
-
align-items: center;
|
|
1225
|
-
gap: 6px;
|
|
1226
|
-
`,xC=Le.span.attrs({className:"thought-chain-card-header-main-text"})`
|
|
1227
|
-
font-size: 14px;
|
|
1228
|
-
font-weight: 600;
|
|
1229
|
-
color: #111827;
|
|
1230
|
-
`,wC=Le.span.attrs({className:"thought-chain-card-header-sub-text"})`
|
|
1231
|
-
font-size: 14px;
|
|
1232
|
-
color: #6b7280;
|
|
1233
|
-
`,CC=Le.div.attrs({className:"thought-chain-card-header-right"})`
|
|
1234
|
-
display: flex;
|
|
1235
|
-
align-items: center;
|
|
1236
|
-
flex-shrink: 0;
|
|
1237
|
-
`,DC=Le.div.attrs({className:"thought-chain-card-body"})`
|
|
1238
|
-
margin-top: 12px;
|
|
1239
|
-
display: flex;
|
|
1240
|
-
flex-direction: column;
|
|
1241
|
-
gap: 0;
|
|
1242
|
-
`,kC=Le.div.attrs({className:"thought-chain-card-empty-text"})`
|
|
1243
|
-
font-size: 12px;
|
|
1244
|
-
color: #9ca3af;
|
|
1245
|
-
`,EC=({nodes:e,mode:t="history",status:r,simpleThinkOnly:n=!1,chainRespTime:o})=>{const[i,c]=St(!1),u=ht(()=>{const x={};return(e||[]).forEach(w=>{x[w.businessType]||(x[w.businessType]=[]),x[w.businessType].push(w)}),x},[e]),f=ht(()=>typeof r=="number"?r===4:t==="live"?e.some(x=>x.nodeStatus===1):!1,[t,r,e]),d=ht(()=>!e||e.length===0?!1:t==="history"?e.every(x=>x.nodeStatus===2):e.every(x=>x.nodeStatus===2),[e,t]),p=ht(()=>f?"\u6B63\u5728\u601D\u8003\u4E2D":d?"\u601D\u8003\u5B8C\u6210":e&&e.length>0&&!d?"\u6B63\u5728\u601D\u8003\u4E2D":"",[f,d,e]);ht(()=>f?"\u6A21\u578B\u6B63\u5728\u8FDB\u884C\u5206\u6B65\u63A8\u7406":d?"\u672C\u6B21\u5BF9\u8BDD\u7684\u63A8\u7406\u8FC7\u7A0B\u56DE\u653E":"\u6A21\u578B\u6B63\u5728\u8FDB\u884C\u5206\u6B65\u63A8\u7406",[f,d]);const v=e&&e.length>0,g=ht(()=>!o||o<=0?"":`\xB7 ${(o/1e3).toFixed(2)} \u79D2`,[o]);return q.jsxs(pC,{"data-mode":t,children:[q.jsxs(mC,{onClick:()=>c(x=>!x),children:[q.jsxs(gC,{children:[q.jsx(bC,{$isRotating:f}),q.jsxs(yC,{children:[q.jsx(xC,{children:p}),g&&d&&q.jsxs(wC,{children:["\u603B\u8BA1\u7528\u65F6",g]})]})]}),q.jsx(CC,{children:i?q.jsx(Ba,{size:18,color:"#6b7280"}):q.jsx(Fa,{size:18,color:"#6b7280"})})]}),!i&&q.jsxs(DC,{children:[!v&&q.jsx(kC,{children:"\u5F53\u524D\u4F1A\u8BDD\u672A\u8FD4\u56DE\u7ED3\u6784\u5316\u601D\u7EF4\u94FE\u6570\u636E\u3002"}),u.plan&&u.plan.length>0&&q.jsx(Jl,{title:ea("plan",u.plan[0].nodeStatus),nodes:u.plan,mode:t}),u.retrieve&&u.retrieve.length>0&&q.jsx(Jl,{title:ea("retrieve",u.retrieve[0].nodeStatus),nodes:u.retrieve,mode:t}),u.think&&u.think.length>0&&q.jsx(Jl,{title:ea("think",u.think[0].nodeStatus),nodes:u.think,mode:t})]})]})},SC=({data:e,styles:t,onCategoryClick:r,onViewAllClick:n,className:o,style:i,showCategoryIcon:c=!0,renderCategoryIcon:u})=>{const f=(t==null?void 0:t.theme)||{},d=w=>{r==null||r(w)},p=()=>{e.viewAllPath&&(typeof e.viewAllPath=="function"?e.viewAllPath():window.open(e.viewAllPath,"_blank")),n==null||n()},v=w=>{const C=(w||"").toLowerCase();return["png","jpg","jpeg","gif","bmp","webp","svg","ico"].includes(C)?"rag/pic":C==="pdf"?"rag/pdf":["doc","docx"].includes(C)?"rag/word":["xls","xlsx","xlsm","xlsb","xltx","xltm","xlt","xlam"].includes(C)?"rag/excel":["ppt","pptx"].includes(C)?"rag/ppt":C==="txt"||C==="md"?"rag/txt":C==="csv"?"rag/csv":["zip","rar","7z"].includes(C)?"rag/zip":["odt","ods","odp","odf"].includes(C)?"rag/odf":C==="json"?"rag/json":"rag/file"},g=w=>{if(u)return u(w);if(c){if(w.itemType==="dir")return q.jsx(ko,{type:"rag/folder",size:16});if(w.itemType==="file"&&w.fileType){const C=v(w.fileType);return q.jsx(ko,{type:C,size:16})}return q.jsx(ko,{type:"rag/folder",size:16})}return null},x=e.categories.filter(w=>w.visible!==!1);return!x||x.length===0?null:q.jsxs(AC,{className:`knowledge-base-document-list ${o||""}`,style:i,$theme:f,children:[q.jsx(BC,{children:e.title}),e.subtitle&&q.jsxs(FC,{children:[e.subtitle," (\u5171",e.totalCount,"\u4E2A):"]}),q.jsx(NC,{children:x.map((w,C)=>q.jsxs(TC,{onClick:()=>d(w),$theme:f,children:[g(w),q.jsx(OC,{children:w.name}),w.itemType==="dir"&&q.jsxs($C,{children:["(",w.documentCount,")"]})]},w.id||C))}),e.showViewAll!==!1&&q.jsx(MC,{onClick:p,$theme:f,children:e.viewAllText||"\u67E5\u770B\u5168\u90E8>>"})]})},AC=Le.div.attrs({className:"knowledge-base-document-list-container"})`
|
|
1246
|
-
margin-bottom: 16px;
|
|
1247
|
-
padding: 16px;
|
|
1248
|
-
margin-left:25px;
|
|
1249
|
-
|
|
1250
|
-
background: ${({$theme:e})=>{var t;return((t=e==null?void 0:e.colors)==null?void 0:t.background)||"#ffffff"}};
|
|
1251
|
-
border-radius: 8px;
|
|
1252
|
-
`,BC=Le.h3.attrs({className:"knowledge-base-document-list-title"})`
|
|
1253
|
-
font-size: 18px;
|
|
1254
|
-
font-weight: 600;
|
|
1255
|
-
color: #1f2937;
|
|
1256
|
-
margin: 0 0 8px 0;
|
|
1257
|
-
`,FC=Le.div.attrs({className:"knowledge-base-document-list-subtitle"})`
|
|
1258
|
-
font-size: 14px;
|
|
1259
|
-
color: #6b7280;
|
|
1260
|
-
margin-bottom: 12px;
|
|
1261
|
-
`,NC=Le.div.attrs({className:"knowledge-base-document-list-category-list"})`
|
|
1262
|
-
display: flex;
|
|
1263
|
-
flex-direction: column;
|
|
1264
|
-
gap: 8px;
|
|
1265
|
-
margin-bottom: 12px;
|
|
1266
|
-
`,TC=Le.div.attrs({className:"knowledge-base-document-list-category-item"})`
|
|
1267
|
-
display: flex;
|
|
1268
|
-
align-items: center;
|
|
1269
|
-
gap: 8px;
|
|
1270
|
-
padding: 8px 0;
|
|
1271
|
-
cursor: pointer;
|
|
1272
|
-
transition: all 0.2s ease;
|
|
1273
|
-
|
|
1274
|
-
&:hover {
|
|
1275
|
-
opacity: 0.8;
|
|
1276
|
-
}
|
|
1277
|
-
`,OC=Le.span.attrs({className:"knowledge-base-document-list-category-name"})`
|
|
1278
|
-
font-size: 14px;
|
|
1279
|
-
color: #1f2937;
|
|
1280
|
-
`,$C=Le.span.attrs({className:"knowledge-base-document-list-category-count"})`
|
|
1281
|
-
font-size: 14px;
|
|
1282
|
-
color: #6b7280;
|
|
1283
|
-
`,MC=Le.a.attrs({className:"knowledge-base-document-list-view-all"})`
|
|
1284
|
-
display: inline-block;
|
|
1285
|
-
font-size: 14px;
|
|
1286
|
-
color: ${({$theme:e})=>{var t;return((t=e==null?void 0:e.colors)==null?void 0:t.primary)||"#3b82f6"}};
|
|
1287
|
-
text-decoration: none;
|
|
1288
|
-
cursor: pointer;
|
|
1289
|
-
transition: color 0.2s ease;
|
|
1290
|
-
|
|
1291
|
-
&:hover {
|
|
1292
|
-
color: ${({$theme:e})=>{var t;return((t=e==null?void 0:e.colors)==null?void 0:t.primary)||"#2563eb"}};
|
|
1293
|
-
text-decoration: underline;
|
|
1294
|
-
}
|
|
1295
|
-
`;function Ql(e,t,r=18){var c;const n=(e||"").toLowerCase(),o=((c=t==null?void 0:t.theme)==null?void 0:c.icons)||{},i=(u,f,d)=>{const p=[u,...d||[]];for(const v of p){const g=o[v];if(g){if(He.isValidElement(g))return g;if(typeof g=="string")return q.jsx("img",{src:g,alt:v,style:{width:r,height:r}})}}return q.jsx(ko,{type:f,size:r})};return["png","jpg","jpeg","gif","bmp","webp","svg","ico"].includes(n)?i("image","rag/pic",["png","jpg","jpeg"]):n==="pdf"?i("pdf","rag/pdf"):["doc","docx"].includes(n)?i("docx","rag/word",["doc"]):["xls","xlsx","xlsm","xlsb","xltx","xltm","xlt","xlam"].includes(n)?i("sheets","rag/excel",["excel","xls","xlsx"]):n==="csv"?i("csv","rag/csv",["sheets","excel"]):["ppt","pptx"].includes(n)?i("pptx","rag/ppt",["ppt"]):n==="txt"||n==="md"?i("txt","rag/txt",["md"]):["zip","rar","7z"].includes(n)?i("archive","rag/zip",["zip","rar"]):["odt","ods","odp","odf"].includes(n)?i("odt","rag/odf"):["html","htm","url"].includes(n)?i("html","rag/url",["htm","url"]):n==="json"?i("json","rag/json"):q.jsx(ko,{type:"rag/file",size:r})}function Ho(e){let t=[];for(const r of e)r.retrive===!0&&t.push(r),Array.isArray(r.children)&&(t=t.concat(Ho(r.children)));return t}function RC(e){const t=[],r=/<retrive-tag[^>]*image_urls=['"]([^'"]+)['"][^>]*>/g;let n;for(;n=r.exec(e);){const i=n[1].split(";").map(c=>c.trim()).filter(Boolean);t.push(...i)}const o=/\[retrive-tag[^\]]*image_urls=['"]([^'"]+)['"][^\]]*\]\[[^\]]+\]\[\/retrive-tag\]/g;for(;n=o.exec(e);){const i=n[1].split(";").map(c=>c.trim()).filter(Boolean);t.push(...i)}return Array.from(new Set(t))}function Ti(e){if(e==null)return null;const t=Number(e);return Number.isNaN(t)?null:t}function PC(e){const t=[];let r=1;const n=o=>{o.forEach(i=>{(i==null?void 0:i.type)==="retrieve-sql-data"&&(i!=null&&i.id)&&t.push({id:String(i.id),index:r++}),Array.isArray(i==null?void 0:i.children)&&i.children.length&&n(i.children)})};return Array.isArray(e)&&e.length&&n(e),t}const zC=Le.div.attrs({className:"chat-message-container"})`
|
|
1296
|
-
display: flex;
|
|
1297
|
-
flex-direction: column;
|
|
1298
|
-
margin-bottom: 0.5rem;
|
|
1299
|
-
animation: fadeIn 0.3s ease-in-out;
|
|
1300
|
-
width: 100%;
|
|
1301
|
-
text-wrap: wrap;
|
|
1302
|
-
|
|
1303
|
-
${e=>e.$align==="right"&&`
|
|
1304
|
-
align-items: flex-end;
|
|
1305
|
-
`}
|
|
1306
|
-
|
|
1307
|
-
${e=>e.$align==="center"&&`
|
|
1308
|
-
align-items: center;
|
|
1309
|
-
`}
|
|
1310
|
-
|
|
1311
|
-
@keyframes fadeIn {
|
|
1312
|
-
from {
|
|
1313
|
-
opacity: 0;
|
|
1314
|
-
transform: translateY(10px);
|
|
1315
|
-
}
|
|
1316
|
-
to {
|
|
1317
|
-
opacity: 1;
|
|
1318
|
-
transform: translateY(0);
|
|
1319
|
-
}
|
|
1320
|
-
}
|
|
1321
|
-
`,_C=Le.div.attrs({className:"chat-message-header"})`
|
|
1322
|
-
display: flex;
|
|
1323
|
-
align-items: center;
|
|
1324
|
-
gap: 0.25rem;
|
|
1325
|
-
margin-bottom: 0.5rem;
|
|
1326
|
-
width: 100%;
|
|
1327
|
-
|
|
1328
|
-
${e=>e.$isUser&&`
|
|
1329
|
-
flex-direction: row-reverse;
|
|
1330
|
-
justify-content: end;
|
|
1331
|
-
`}
|
|
1332
|
-
`,IC=Le.div.attrs({className:"chat-message-avatar"})`
|
|
1333
|
-
background: ${e=>e.$src?`url('${e.$src}') center/cover no-repeat`:"var(--avatar-bg, #e5e7eb)"};
|
|
1334
|
-
border-radius: 50%;
|
|
1335
|
-
width: 2rem;
|
|
1336
|
-
height: 2rem;
|
|
1337
|
-
flex-shrink: 0;
|
|
1338
|
-
display: flex;
|
|
1339
|
-
align-items: center;
|
|
1340
|
-
justify-content: center;
|
|
1341
|
-
font-size: 1rem;
|
|
1342
|
-
`,jC=Le.div.attrs({className:"chat-message-content"})`
|
|
1343
|
-
width: 100%;
|
|
1344
|
-
.message-time {
|
|
1345
|
-
font-size: 0.75rem;
|
|
1346
|
-
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.disabled)||"#6b7280"}};
|
|
1347
|
-
}
|
|
1348
|
-
|
|
1349
|
-
.message-card {
|
|
1350
|
-
background: ${e=>e.$isUser?"linear-gradient(180deg, #E3ECFF 0%, #EEEBFF 100%)":"#ffffff"};
|
|
1351
|
-
border: 1px solid ${e=>(e.$isUser,"transparent")};
|
|
1352
|
-
border-radius: 0.5rem;
|
|
1353
|
-
padding-top: 12px;
|
|
1354
|
-
padding-bottom: 12px;
|
|
1355
|
-
overflow: hidden;
|
|
1356
|
-
max-width: ${e=>e.$isUser?"fit-content":"100%"};
|
|
1357
|
-
margin-left: ${e=>e.$isUser?"auto":"0"};
|
|
1358
|
-
margin-right: ${e=>e.$isUser?"40px":"0"};
|
|
1359
|
-
padding: 0.25rem 1.8rem;
|
|
1360
|
-
.message-text {
|
|
1361
|
-
width: 100%;
|
|
1362
|
-
line-height: 1.6;
|
|
1363
|
-
white-space: pre-wrap !important; /* 保留换行和空格格式,使用 !important 确保优先级 */
|
|
1364
|
-
border-radius: 0.5rem;
|
|
1365
|
-
min-height: ${e=>e.$isUser?"auto":"40px"};
|
|
1366
|
-
font-size: 0.875rem;
|
|
1367
|
-
|
|
1368
|
-
/* 确保子元素也继承 white-space 属性 */
|
|
1369
|
-
& > * {
|
|
1370
|
-
white-space: pre-wrap !important;
|
|
1371
|
-
}
|
|
1372
|
-
}
|
|
1373
|
-
}
|
|
1374
|
-
`,LC=Le.div.attrs({className:"chat-message-actions-container"})`
|
|
1375
|
-
margin-top: 0.5rem;
|
|
1376
|
-
display: flex;
|
|
1377
|
-
padding: 0.5rem;
|
|
1378
|
-
align-items: center;
|
|
1379
|
-
|
|
1380
|
-
gap: 0.75rem;
|
|
1381
|
-
|
|
1382
|
-
button {
|
|
1383
|
-
display: flex;
|
|
1384
|
-
align-items: center;
|
|
1385
|
-
gap: 0.25rem;
|
|
1386
|
-
font-size: 0.875rem;
|
|
1387
|
-
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.disabled)||"#6b7280"}};
|
|
1388
|
-
background: none;
|
|
1389
|
-
border: none;
|
|
1390
|
-
cursor: pointer;
|
|
1391
|
-
transition: color 0.2s;
|
|
1392
|
-
|
|
1393
|
-
&:hover {
|
|
1394
|
-
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.primary)||"#3b82f6"}};
|
|
1395
|
-
}
|
|
1396
|
-
|
|
1397
|
-
&.active {
|
|
1398
|
-
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.primary)||"#3b82f6"}} !important;
|
|
1399
|
-
}
|
|
1400
|
-
}
|
|
1401
|
-
`,HC=Le.div.attrs({className:"chat-message-follow-up-container"})`
|
|
1402
|
-
margin-top: 1rem;
|
|
1403
|
-
padding: 0 2.9rem;
|
|
1404
|
-
|
|
1405
|
-
border-radius: 0.5rem;
|
|
1406
|
-
|
|
1407
|
-
@keyframes followUpIn {
|
|
1408
|
-
from {
|
|
1409
|
-
opacity: 0;
|
|
1410
|
-
transform: translateY(6px);
|
|
1411
|
-
}
|
|
1412
|
-
to {
|
|
1413
|
-
opacity: 1;
|
|
1414
|
-
transform: translateY(0);
|
|
1415
|
-
}
|
|
1416
|
-
}
|
|
1417
|
-
|
|
1418
|
-
.follow-up-title {
|
|
1419
|
-
font-size: 0.875rem;
|
|
1420
|
-
font-weight: 600;
|
|
1421
|
-
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.text)||"#374151"}};
|
|
1422
|
-
margin-bottom: 0.75rem;
|
|
1423
|
-
}
|
|
1424
|
-
|
|
1425
|
-
.follow-up-list {
|
|
1426
|
-
display: flex;
|
|
1427
|
-
flex-direction: column;
|
|
1428
|
-
gap: 0.5rem;
|
|
1429
|
-
}
|
|
1430
|
-
|
|
1431
|
-
.follow-up-item {
|
|
1432
|
-
width: fit-content;
|
|
1433
|
-
background: #ffffff;
|
|
1434
|
-
border: 1px solid #e5e7eb;
|
|
1435
|
-
border-radius: 0.375rem;
|
|
1436
|
-
padding: 0.75rem 1rem;
|
|
1437
|
-
cursor: pointer;
|
|
1438
|
-
transition: all 0.2s ease;
|
|
1439
|
-
text-align: left;
|
|
1440
|
-
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.text)||"#374151"}};
|
|
1441
|
-
font-size: 0.875rem;
|
|
1442
|
-
line-height: 1.4;
|
|
1443
|
-
opacity: 0;
|
|
1444
|
-
transform: translateY(6px);
|
|
1445
|
-
animation: followUpIn 280ms ease forwards;
|
|
1446
|
-
animation-play-state: running;
|
|
1447
|
-
|
|
1448
|
-
&:hover {
|
|
1449
|
-
background: #e5e7eb;
|
|
1450
|
-
border-color: #d1d5db;
|
|
1451
|
-
}
|
|
1452
|
-
|
|
1453
|
-
&:active {
|
|
1454
|
-
transform: translateY(1px);
|
|
1455
|
-
}
|
|
1456
|
-
}
|
|
1457
|
-
`,Oi=Le.div.attrs({className:"chat-message-reference-container"})`
|
|
1458
|
-
padding: 1rem;
|
|
1459
|
-
background: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.background)||"#ffffff"}};
|
|
1460
|
-
|
|
1461
|
-
border-radius: 0.5rem;
|
|
1462
|
-
|
|
1463
|
-
.reference-title {
|
|
1464
|
-
font-size: 0.875rem;
|
|
1465
|
-
font-weight: 600;
|
|
1466
|
-
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.text)||"#374151"}};
|
|
1467
|
-
margin-bottom: 0.75rem;
|
|
1468
|
-
}
|
|
1469
|
-
|
|
1470
|
-
.reference-list {
|
|
1471
|
-
display: flex;
|
|
1472
|
-
flex-direction: column;
|
|
1473
|
-
gap: 0.5rem;
|
|
1474
|
-
}
|
|
1475
|
-
|
|
1476
|
-
.reference-item {
|
|
1477
|
-
background: #ffffff;
|
|
1478
|
-
|
|
1479
|
-
border-radius: 0.375rem;
|
|
1480
|
-
padding: 0.75rem 0;
|
|
1481
|
-
display: flex;
|
|
1482
|
-
align-items: center;
|
|
1483
|
-
gap: 0.5rem;
|
|
1484
|
-
|
|
1485
|
-
.file-icon {
|
|
1486
|
-
width: 2rem;
|
|
1487
|
-
height: 2rem;
|
|
1488
|
-
background: #e2e8f0;
|
|
1489
|
-
border-radius: 0.25rem;
|
|
1490
|
-
display: flex;
|
|
1491
|
-
align-items: center;
|
|
1492
|
-
justify-content: center;
|
|
1493
|
-
font-size: 0.75rem;
|
|
1494
|
-
color: #64748b;
|
|
1495
|
-
}
|
|
1496
|
-
|
|
1497
|
-
.file-info {
|
|
1498
|
-
flex: 1;
|
|
1499
|
-
|
|
1500
|
-
.file-name {
|
|
1501
|
-
font-size: 0.875rem;
|
|
1502
|
-
font-weight: 500;
|
|
1503
|
-
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.text)||"#374151"}};
|
|
1504
|
-
margin-bottom: 0.25rem;
|
|
1505
|
-
}
|
|
1506
|
-
|
|
1507
|
-
.file-meta {
|
|
1508
|
-
font-size: 0.75rem;
|
|
1509
|
-
color: #64748b;
|
|
1510
|
-
}
|
|
1511
|
-
}
|
|
1512
|
-
|
|
1513
|
-
.file-score {
|
|
1514
|
-
font-size: 0.75rem;
|
|
1515
|
-
color: #059669;
|
|
1516
|
-
font-weight: 500;
|
|
1517
|
-
}
|
|
1518
|
-
}
|
|
1519
|
-
`,qC=Le.div.attrs({className:"chat-message-image-preview-modal"})`
|
|
1520
|
-
position: fixed;
|
|
1521
|
-
top: 0;
|
|
1522
|
-
left: 0;
|
|
1523
|
-
right: 0;
|
|
1524
|
-
bottom: 0;
|
|
1525
|
-
background: rgba(0, 0, 0, 0.8);
|
|
1526
|
-
display: ${e=>e.$show?"flex":"none"};
|
|
1527
|
-
align-items: center;
|
|
1528
|
-
justify-content: center;
|
|
1529
|
-
z-index: 1000;
|
|
1530
|
-
cursor: pointer;
|
|
1531
|
-
|
|
1532
|
-
.modal-content {
|
|
1533
|
-
max-width: 90vw;
|
|
1534
|
-
max-height: 90vh;
|
|
1535
|
-
position: relative;
|
|
1536
|
-
cursor: default;
|
|
1537
|
-
display: flex;
|
|
1538
|
-
flex-direction: column;
|
|
1539
|
-
align-items: center;
|
|
1540
|
-
}
|
|
1541
|
-
|
|
1542
|
-
.modal-image {
|
|
1543
|
-
max-width: 100%;
|
|
1544
|
-
max-height: calc(90vh - 60px);
|
|
1545
|
-
object-fit: contain;
|
|
1546
|
-
border-radius: 8px;
|
|
1547
|
-
}
|
|
1548
|
-
|
|
1549
|
-
.modal-close {
|
|
1550
|
-
margin-top: 16px;
|
|
1551
|
-
background: rgba(255, 255, 255, 0.3);
|
|
1552
|
-
border: none;
|
|
1553
|
-
border-radius: 20px;
|
|
1554
|
-
padding: 8px 20px;
|
|
1555
|
-
display: flex;
|
|
1556
|
-
align-items: center;
|
|
1557
|
-
justify-content: center;
|
|
1558
|
-
cursor: pointer;
|
|
1559
|
-
font-size: 14px;
|
|
1560
|
-
color: #333;
|
|
1561
|
-
font-weight: 500;
|
|
1562
|
-
transition: all 0.2s ease;
|
|
1563
|
-
|
|
1564
|
-
&:hover {
|
|
1565
|
-
background: rgba(255, 255, 255, 1);
|
|
1566
|
-
transform: translateY(-1px);
|
|
1567
|
-
}
|
|
1568
|
-
}
|
|
1569
|
-
`,e0=Le.div.attrs({className:"chat-message-image-gallery-container"})`
|
|
1570
|
-
padding: 0rem 0.5rem;
|
|
1571
|
-
background: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.background)||"#ffffff"}};
|
|
1572
|
-
|
|
1573
|
-
.gallery-grid {
|
|
1574
|
-
display: grid;
|
|
1575
|
-
grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
|
|
1576
|
-
gap: 0.75rem;
|
|
1577
|
-
}
|
|
1578
|
-
|
|
1579
|
-
.gallery-item {
|
|
1580
|
-
position: relative;
|
|
1581
|
-
aspect-ratio: 1;
|
|
1582
|
-
border-radius: 0.375rem;
|
|
1583
|
-
overflow: hidden;
|
|
1584
|
-
cursor: pointer;
|
|
1585
|
-
transition:
|
|
1586
|
-
transform 0.2s ease,
|
|
1587
|
-
box-shadow 0.2s ease;
|
|
1588
|
-
border: 2px solid transparent;
|
|
1589
|
-
|
|
1590
|
-
&:hover {
|
|
1591
|
-
transform: translateY(-2px);
|
|
1592
|
-
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
1593
|
-
border-color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.primary)||"#3b82f6"}};
|
|
1594
|
-
}
|
|
1595
|
-
|
|
1596
|
-
.gallery-image {
|
|
1597
|
-
width: 100%;
|
|
1598
|
-
height: 100%;
|
|
1599
|
-
object-fit: cover;
|
|
1600
|
-
background: #f3f4f6;
|
|
1601
|
-
}
|
|
1602
|
-
|
|
1603
|
-
.gallery-overlay {
|
|
1604
|
-
position: absolute;
|
|
1605
|
-
bottom: 0;
|
|
1606
|
-
left: 0;
|
|
1607
|
-
right: 0;
|
|
1608
|
-
background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
|
|
1609
|
-
color: white;
|
|
1610
|
-
padding: 0.5rem;
|
|
1611
|
-
font-size: 0.75rem;
|
|
1612
|
-
text-align: center;
|
|
1613
|
-
opacity: 0;
|
|
1614
|
-
transition: opacity 0.2s ease;
|
|
1615
|
-
}
|
|
1616
|
-
|
|
1617
|
-
&:hover .gallery-overlay {
|
|
1618
|
-
opacity: 1;
|
|
1619
|
-
}
|
|
1620
|
-
}
|
|
1621
|
-
`,i9=({token:e,streamUrl:t,is_download:r,content:n,contentType:o="plainText",align:i="left",displayStatus:c="ready",avatar:u,isUser:f=!1,userAvatar:d,aiAvatar:p,date:v,time:g,timestamp:x,showTime:w=!0,errorMessage:C,styles:m,reference:A,webReference:S,databaseReference:D,graphReference:$,filePaths:F,currentFiles:B,fileManagerData:R,audioUrl:I,feedbackResult:T,queryId:W,defaultAnswer:H,isWelcome:Z=!1,isLast:Y=!1,respTime:j,tokens:K,resultType:U,followUpQuestions:G=[],tools:J={},eventsEmit:z,referenceMode:ie="list",enableThoughtChain:ge=!1,thoughtChainVersionMode:xe="auto",chain:Ae,thoughtChainNodes:Fe,knowledgeBases:be,enableCot:X,chainRespTime:fe,thoughtChainStatus:ce,enablePrism:se=!1})=>{Jt(()=>{console.log("isUser",f),console.log("isLast",Y)},[Y,f]);const oe=fs(),he=ht(()=>{var ae,Be,Pe,Ue,De,Ze,Xe,st,le,ye,ve;return{colors:{primary:((ae=oe==null?void 0:oe.colors)==null?void 0:ae.primary)||"#3b82f6",background:((Be=oe==null?void 0:oe.colors)==null?void 0:Be.background)||"#ffffff",userBackground:((Pe=oe==null?void 0:oe.colors)==null?void 0:Pe.primary)||"#3b82f6",border:((Ue=oe==null?void 0:oe.colors)==null?void 0:Ue.border)||"#e5e7eb",text:((De=oe==null?void 0:oe.colors)==null?void 0:De.text)||"#374151",disabled:((Ze=oe==null?void 0:oe.colors)==null?void 0:Ze.disabled)||"#6b7280",info:((Xe=oe==null?void 0:oe.colors)==null?void 0:Xe.info)||"#3b82f6",warning:((st=oe==null?void 0:oe.colors)==null?void 0:st.warning)||"#f59e0b",error:((le=oe==null?void 0:oe.colors)==null?void 0:le.error)||"#ef4444",...(ye=m==null?void 0:m.theme)==null?void 0:ye.colors},icons:{aiAvatar:p||"/vite.svg",userAvatar:d||"/default-user-avatar.png",...(ve=m==null?void 0:m.theme)==null?void 0:ve.icons}}},[oe,m,p,d]),we=ht(()=>{const ae=g||v||x;return!ae||!w?null:Jw(ae).format("YY-MM-DD HH:mm:ss")},[g,v,x,w]),[Ce,ke]=St([]),[Se,Te]=St(null),[Ie,We]=St(!1),[ut,ot]=St(!1),[Oe,je]=St(!1),[Ve,ft]=St(!1),[tt,nt]=St(!1),Tt=(ae,Be)=>{switch(console.log("handleImageClick",ae,Be),ae){case"imageClick":Te(Be);break}},bt=ht(()=>{if(!ge)return[];if(xe==="v1")return[];if(Array.isArray(Fe)&&Fe.length)return Fe;const ae=Ae||(n==null?void 0:n.chain),Be=hC(ae);return X===0?Be.filter(Pe=>Pe.businessType==="think"):Be},[ge,xe,Fe,Ae,n,X]),At=()=>{if(ge&&xe!=="v1")return null;const ae={processing:{text:"AI \u6B63\u5728\u601D\u8003...",icon:"\u{1F4AD}"},thinking:{text:"\u6DF1\u5EA6\u601D\u8003\u4E2D",icon:"\u{1F4AD}"},uploading:{text:"\u6587\u4EF6\u4E0A\u4F20\u4E2D...",icon:"\u{1F4E4}"},analyzing:{text:"\u77E5\u8BC6\u89E3\u6790\u4E2D...",icon:"\u{1F50D}"},error:{text:C||"\u62B1\u6B49\uFF0C\u672C\u6B21\u8BF7\u6C42\u51FA\u9519\u4E86\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5",icon:"\u274C"},initializing:{text:"\u6B63\u5728\u521D\u59CB\u5316...",icon:"\u2699\uFE0F"},ready:{text:"\u601D\u8003\u5B8C\u6210",icon:q.jsx(ko,{type:"rag/think",size:16})}}[c]||{text:"\u5904\u7406\u4E2D...",icon:"\u{1F4AD}"},Be=j?`(\u7528\u65F6 ${Math.round(j/1e3)} \u79D2)`:"";return q.jsx("div",{className:"think-header",children:q.jsx("div",{className:"think-header-left ml-[16px]",children:q.jsxs("div",{className:"flex items-center gap-x-1 bg-[#F5F7FA] p-2 rounded w-full",children:[q.jsx("div",{className:"think-icon",children:ae.icon}),q.jsx("div",{className:"think-title",children:ae.text}),Be&&q.jsx("div",{className:"think-time",children:Be}),cr&&q.jsx("button",{className:"think-collapse-btn ml-2 cursor-pointer",title:"\u6536\u8D77/\u5C55\u5F00",onClick:()=>{nt(!tt)},children:q.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",style:{transform:tt?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"},children:q.jsx("path",{d:"m18 15-6-6-6 6"})})})]})})})},yt=()=>{if(!ge||xe==="v1"||f||!bt.length)return null;const ae=ce!==void 0?ce===4?4:2:c==="ready"?2:1,Be=X===0;return q.jsx("div",{className:"thought-chain-wrapper ml-[16px] mr-[16px] mt-2",children:q.jsx(EC,{mode:o==="stream"?"live":"history",nodes:bt,status:ae,simpleThinkOnly:Be,chainRespTime:fe})})},[Me,ue]=St([]),[mt,zt]=St(null),Wt=ht(()=>{try{if(!A)return[];let ae;if(typeof A=="string")ae=JSON.parse(A);else if(Array.isArray(A))ae=A;else if(typeof A=="object")ae=[A];else return[];return Array.isArray(ae)?ae:[]}catch(ae){return console.warn("\u89E3\u6790 rawReferenceList \u5931\u8D25:",ae,A),[]}},[A]),Ot=(ae,Be)=>{var Xe,st,le;const Pe=((Xe=ae==null?void 0:ae.metadata)==null?void 0:Xe.source)||(ae==null?void 0:ae.file_path)||(ae==null?void 0:ae.path)||(ae==null?void 0:ae.convertedFilePath)||(ae==null?void 0:ae.parsedFilePath)||"",Ue=((st=ae==null?void 0:ae.metadata)==null?void 0:st.title)||(ae==null?void 0:ae.file_name)||"",De=((le=ae==null?void 0:ae.metadata)==null?void 0:le.id)||(ae==null?void 0:ae.id)||(ae==null?void 0:ae.file_id)||"",Ze=Wt.find(ye=>{var Ut,Rt,lt;const ve=((Ut=ye==null?void 0:ye.metadata)==null?void 0:Ut.source)||(ye==null?void 0:ye.file_path)||(ye==null?void 0:ye.path)||(ye==null?void 0:ye.convertedFilePath)||(ye==null?void 0:ye.parsedFilePath)||"",Je=((Rt=ye==null?void 0:ye.metadata)==null?void 0:Rt.title)||(ye==null?void 0:ye.file_name)||"",it=((lt=ye==null?void 0:ye.metadata)==null?void 0:lt.id)||(ye==null?void 0:ye.id)||"";return De&&it&&String(De)===String(it)||Pe&&ve&&ve===Pe||Ue&&Je&&Je===Ue});if(Ze){const ye=(Ze!=null&&Ze.references&&Array.isArray(Ze.references)?Ze.references:[Ze]).find(ve=>String(ve.order_num)===String(Be)||String(ve.id)===String(Be));if(ye)return ye}for(const ye of Wt){if(ye!=null&&ye.references&&Array.isArray(ye.references)){const ve=ye.references.find(Je=>String(Je.order_num)===String(Be)||String(Je.id)===String(Be));if(ve)return ve}if(String(ye.order_num)===String(Be)||String(ye.id)===String(Be))return ye}return null},ir=(ae,Be)=>{function Pe(st,le){for(const ye of st){if(ye.references&&Array.isArray(ye.references)){const ve=ye.references.find(Je=>String(Je.order_num)===String(le)||String(Je.id)===String(le));if(ve)return ve}if(String(ye.order_num)===String(le)||String(ye.id)===String(le))return ye}return null}let Ue=[];try{A&&(Ue=JSON.parse(A))}catch(st){console.error("Failed to parse reference:",st)}const De=Pe(Ue,ae.id),Ze=st=>{if(typeof n!="string")return;const le=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${st}['"][^\\]]*\\]\\[([^\\]]+)\\]\\\\/retrive-tag\\]`,"g").exec(n);if(le&&le[1]){const ye=Number(le[1]);return Number.isNaN(ye)?void 0:ye}},Xe={tagInfo:{id:ae==null?void 0:ae.id,index:Ze(String(ae==null?void 0:ae.id)),image_urls:(ae==null?void 0:ae.imageUrls)||(ae==null?void 0:ae.image_urls)||[]},fromtype:String((ae==null?void 0:ae.fromtype)??""),leaf:ae,attributes:Be,referenceDoc:De||void 0};if(String(ae==null?void 0:ae.fromtype)==="2"&&$)try{const st=JSON.parse($||"[]"),le=(Array.isArray(st)?st:[]).find(ye=>{if(Array.isArray(ye==null?void 0:ye.traceNodes))return ye.traceNodes.some(Je=>String(Je==null?void 0:Je.id)===String(ae.id));const ve=String(ae.id||"").split("_")[0];return String(ye==null?void 0:ye.id)===ve});le&&(Xe.graph={id:le.id,graphName:le.graphName,fetchUrl:le.fetchUrl,cyphers:le.cyphers},Xe.traceNode=Array.isArray(le.traceNodes)?le.traceNodes.find(ye=>String(ye==null?void 0:ye.id)===String(ae.id)):void 0)}catch{}z==null||z("action_retrive_tag",Xe),z==null||z("retrive_tag:click",Xe)},Ct=ae=>{if(console.log("ChatMessageAdapter received retrieve-sql-data:request-data:",ae),console.log("databaseReference available:",!!D),ae.id&&D){console.log("Sending retrieve-sql-data:data-response with databaseReference"),console.log("databaseReference data:",D);const Be=new CustomEvent("retrieve-sql-data:data-response",{detail:{id:ae.id,databaseReference:D}});console.log("Dispatching event:",Be),window.dispatchEvent(Be)}else console.log("Cannot send response - missing id or databaseReference")};He.useEffect(()=>{const ae=Be=>{Ct(Be.detail)};return window.addEventListener("retrieve-sql-data:request-data",ae),()=>{window.removeEventListener("retrieve-sql-data:request-data",ae)}},[D]),He.useEffect(()=>{const ae=Be=>{_t(Be.detail)};return window.addEventListener("rtext_pagination_click",ae),()=>{window.removeEventListener("rtext_pagination_click",ae)}},[mt]);const _t=ae=>{if(console.log("ChatMessageAdapter received rtext_pagination_click:",ae),ae.replacePredataFunction&&mt){const Be={...mt,rows:mt.rows};ae.replacePredataFunction(Be)}z==null||z("rtext_pagination_click",ae)},Gt=Ht(new Map),pr=Ht(1),Dt=Ht(""),Fr=Ht({0:1,1:1,2:1,3:1}),br=Ht(!1),or=ht(()=>{if(typeof n=="string"){let ae=n;const Be=[];W&&W!==Dt.current&&(Gt.current.clear(),pr.current=1,Fr.current={0:1,1:1,2:1,3:1},Dt.current=W,br.current=!1);const Pe=A===""||A==="[]"||Array.isArray(A)&&A.length===0||A==null;return o==="stream"&&Pe?br.current||(Gt.current.clear(),pr.current=1,Fr.current={0:1,1:1,2:1,3:1},br.current=!0):Pe||(br.current=!1),o==="stream"&&(ae=ae.replace(/\[retrive-tag([^\]]*)\]\[([^\]]+)\]\[\/retrive-tag\]/g,(Ue,De)=>{const Ze=De.match(/id=['"]([^'"]+)['"]/),Xe=De.match(/fromType=['"]([^'"]+)['"]/);if(Ze){const st=Ze[1],le=Xe?Xe[1]:"0";if(!Gt.current.has(st)){const ve=Fr.current,Je=le==="1"?"1":le==="2"?"2":le==="3"?"3":"0",it=ve[Je]??1;Gt.current.set(st,it),ve[Je]=it+1,Fr.current=ve}const ye=Gt.current.get(st);return`[retrive-tag${De}][${ye}][/retrive-tag]`}return Ue})),ae=ae.replace(/\[retrive-tag[^\]]*fromType=['"]0['"][^\]]*\]\[([^\]]+)\]\[\/retrive-tag\]/g,Ue=>{const De=Ue.match(/image_urls=['"]([^'"]+)['"]/);if(De){const Ze=De[1].split(";").map(Xe=>Xe.trim()).filter(Boolean);Be.push(...Ze)}return Ue}),Be.length>0&&ke(Be),ae}return n},[n,o,W,A]),tr=ht(()=>{if(typeof or=="string")try{return Tm(or)}catch(ae){return console.error("Failed to deserialize markdown:",ae),[]}return[]},[or]),mr=Bt(ae=>{if(!(!ae||typeof or!="string"))try{const Be=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${ae}['"][^\\]]*\\]\\[([^\\]]+)\\]\\[\\/retrive-tag\\]`,"g").exec(or);if(Be&&Be[1]){const Pe=Number(Be[1]);return Number.isNaN(Pe)?Be[1]:Pe}}catch{}},[or]),Ir=ht(()=>PC(tr||[]),[tr]),Mr=ht(()=>{const ae={};return Ir.forEach(Be=>{Be!=null&&Be.id&&!ae[Be.id]&&(ae[Be.id]=Be.index)}),ae},[Ir]);Jt(()=>{try{o==="stream"&&D&&(ae=>{try{const Be=typeof ae=="string"?JSON.parse(ae):ae;return Be?Array.isArray(Be)?Be:[Be]:[]}catch{return[]}})(D).forEach(ae=>{const Be=ae==null?void 0:ae.id;if(!Be)return;const Pe=new CustomEvent("retrieve-sql-data:data-response",{detail:{id:Be,databaseReference:ae}});window.dispatchEvent(Pe)})}catch{}},[o,D]);const cr=ht(()=>{if(!Array.isArray(tr))return!1;const ae=Pe=>{for(const Ue of Pe)if(Ue.type==="think"||Array.isArray(Ue.children)&&ae(Ue.children))return!0;return!1},Be=ae(tr);return console.log("Think detection:",{slateContent:tr,hasThinkElement:Be,displayStatus:c,isUser:f}),Be},[tr,c,f]),Vt=ht(()=>({databaseReference:D,...cr&&{isThinkCollapsed:tt}}),[D,cr,tt]),y=ht(()=>u||(f?he.icons.userAvatar:he.icons.aiAvatar),[u,f,he.icons]),k=ht(()=>typeof n=="string"?n:Array.isArray(n)?n.map(ae=>typeof ae=="string"?ae:ae.text||"").join(""):H||"",[n,H]),ze=()=>{if(Z)return null;const ae=[{key:"copy",show:J.copy!==!1,icon:Fm,label:"\u590D\u5236",onClick:()=>z==null?void 0:z("chatbox:copy",{content:k})},{key:"like",show:J.like!==!1,icon:Tw,label:"\u8D5E",onClick:()=>z==null?void 0:z("chatbox:like",{result:T,queryId:W}),active:T===1},{key:"dislike",show:J.dislike!==!1,icon:Nw,label:"\u8E29",onClick:()=>z==null?void 0:z("chatbox:dislike",{result:T,queryId:W}),active:T===0},{key:"repeat",show:!f&&Y,icon:Bw,label:"\u91CD\u590D",onClick:()=>z==null?void 0:z("chatbox:repeat",{content:n,queryId:W,filePaths:F,audioUrl:I})},{key:"forward",show:J.forward,icon:Fw,label:"\u8F6C\u53D1",onClick:()=>z==null?void 0:z("chatbox:forward",{content:k,queryId:W})},{key:"delete",show:J.delete,icon:Ow,label:"\u5220\u9664",onClick:()=>z==null?void 0:z("chatbox:delete",{queryId:W})},{key:"edit",show:J.edit,icon:Sw,label:"\u7F16\u8F91",onClick:()=>z==null?void 0:z("chatbox:edit",{content:k,queryId:W})}];return q.jsxs("div",{style:{padding:"0 2.9rem"},className:"flex justify-between items-center",children:[q.jsx(LC,{$theme:he,children:ae.filter(Be=>Be.show).map(Be=>{const Pe=Be.icon;return q.jsx(n0,{title:Be.label,placement:"top",children:q.jsx("button",{className:Be.active?"active":"",onClick:Be.onClick,children:q.jsx(Pe,{size:18})})},Be.key)})}),!f&&c=="ready"&&!Z&&q.jsxs("div",{className:"text-[10px] text-[#888888]",children:["\u672C\u6B21\u56DE\u7B54\u603B\u8BA1\u6D88\u8017 ",q.jsx("span",{style:{color:he.colors.primary},children:K||0})," ","tokens, \u7B49\u5F85\u603B\u8BA1\u8017\u65F6"," ",q.jsx("span",{style:{color:he.colors.primary},children:Math.round((j||0)/1e3)}),"\u79D2"]})]})},M=ht(()=>{if(!A)return[];let ae=[];try{let De;if(typeof A=="string")De=JSON.parse(A);else if(Array.isArray(A))De=A;else if(typeof A=="object")De=[A];else return[];ae=Array.isArray(De)?De:[]}catch(De){return console.warn("\u89E3\u6790 reference \u6570\u636E\u5931\u8D25:",De,A),[]}let Be=ae.map(De=>{var Ze;try{const Xe=De.metadata||{};let st="";Xe.type==="video"&&Xe.source_name&&typeof Xe.source_name=="string"?st=Xe.source_name:De.name&&typeof De.name=="string"?st=De.name:De.file_name&&typeof De.file_name=="string"?st=De.file_name:Xe.title&&typeof Xe.title=="string"?st=Xe.title:Xe.source&&typeof Xe.source=="string"?st=Xe.source.split("/").pop()||"":De.order_num?st=String(De.order_num):st="\u672A\u77E5\u6587\u6863";let le="pdf";if(Xe.type&&typeof Xe.type=="string")le=Xe.type.toLowerCase();else if(De.name&&typeof De.name=="string"){const Rt=De.name.split(".").pop();Rt&&(le=Rt.toLowerCase())}else if(Xe.source&&typeof Xe.source=="string"){const Rt=Xe.source.split(".").pop();Rt&&(le=Rt.toLowerCase())}else if(De.file_path&&typeof De.file_path=="string"){const Rt=De.file_path.split(".").pop();Rt&&(le=Rt.toLowerCase())}const ye=De.parsedFilePath||Xe.file_path||De.file_path||De.convertedFilePath||Xe.link||Xe.source_link||"",{metadata:ve,...Je}=De,it=Xe.source||"",Ut=Ti(De.score??Xe.score);return{file_id:Xe.id||De.uid||"",file_name:st,file_type:le,path:ye,score:Ut,tags:[],parsedFilePath:De.parsedFilePath,source:it,...Je}}catch(Xe){console.warn("\u89E3\u6790\u5F15\u7528\u6587\u6863\u65F6\u51FA\u9519:",Xe,De);const{metadata:st,...le}=De,ye=((Ze=De.metadata)==null?void 0:Ze.source)||De.file_path||De.convertedFilePath||"",ve=Ti(De.score);return{file_id:De.uid||"",file_name:De.name||"\u672A\u77E5\u6587\u6863",file_type:"unknown",path:De.convertedFilePath||De.file_path||"",score:ve,tags:[],parsedFilePath:De.parsedFilePath,source:ye,...le}}});const Pe=Ho(tr||[]);if(Pe&&Pe.length){const De=Pe.filter(Xe=>Xe.fromtype==="0"),Ze=Pe.filter(Xe=>Xe.fromtype==="3");Be=Be.map(Xe=>{const st=De.map(ye=>{var Ut;const ve=ae.find(Rt=>String(Rt.order_num)===String(ye.id));if(!ve||!((Ut=ve==null?void 0:ve.metadata)!=null&&Ut.source))return null;const Je=Xe.source||"",it=ve.metadata.source||"";return Je&&it&&Je!==it?null:{id:ye.id||"",index:mr(String(ye.id))||ye.indexId||"",image_urls:ye.imageUrls?Array.isArray(ye.imageUrls)?ye.imageUrls:[ye.imageUrls]:ye.image_urls?ye.image_urls.split(";").map(Rt=>Rt.trim()).filter(Boolean):[],metadata:ve.metadata||{},order_num:ve.order_num,parsedFilePath:ve.parsedFilePath}}).filter(ye=>ye!==null),le=Ze.map(ye=>{var Ut;const ve=ae.find(Rt=>String(Rt.order_num)===String(ye.id));if(!ve||!((Ut=ve==null?void 0:ve.metadata)!=null&&Ut.source))return null;const Je=Xe.source||"",it=ve.metadata.source||"";return Je&&it&&Je!==it?null:{id:ye.id||"",index:mr(String(ye.id))||ye.indexId||"",image_urls:ye.imageUrls?Array.isArray(ye.imageUrls)?ye.imageUrls:[ye.imageUrls]:ye.image_urls?ye.image_urls.split(";").map(Rt=>Rt.trim()).filter(Boolean):[],metadata:ve.metadata||{},order_num:ve.order_num,parsedFilePath:ve.parsedFilePath}}).filter(ye=>ye!==null);return{...Xe,tags:[...st,...le]}})}const Ue=new Map;return Be.filter(De=>{const Ze=(De==null?void 0:De.source)||De.file_name;return Ze?Ue.has(Ze)?!1:(Ue.set(Ze,!0),!0):!0}).sort((De,Ze)=>Number((Ze==null?void 0:Ze.score)??0)-Number((De==null?void 0:De.score)??0))},[A,tr,or,mr]),Q=ht(()=>{if(!S)return[];let ae=[];try{let Ue;if(typeof S=="string")Ue=JSON.parse(S);else if(Array.isArray(S))Ue=S;else if(typeof S=="object")Ue=[S];else return[];ae=Array.isArray(Ue)?Ue:[]}catch(Ue){return console.warn("\u89E3\u6790 webReference \u6570\u636E\u5931\u8D25:",Ue,S),[]}if(!(ae!=null&&ae.length))return[];let Be=ae.map(Ue=>{var Ze,Xe,st;const De=(Ue==null?void 0:Ue.score)??((Ze=Ue==null?void 0:Ue.metadata)==null?void 0:Ze.score);return{link:(Xe=Ue==null?void 0:Ue.metadata)==null?void 0:Xe.link,file_name:(st=Ue==null?void 0:Ue.metadata)==null?void 0:st.title,score:Ti(De),tags:[]}});const Pe=Ho(tr||[]);if(Pe&&Pe.length){const Ue=Pe.filter(De=>De.fromtype==="1");Be=Be.map(De=>{const Ze=Ue.map(Xe=>{var le;const st=ae.find(ye=>String(ye.order_num)===String(Xe.id));return!st||!((le=st==null?void 0:st.metadata)!=null&&le.title)||st.metadata.title!==De.file_name?null:{id:Xe.id||"",index:mr(String(Xe.id))||Xe.indexId||"",image_urls:Xe.imageUrls?Array.isArray(Xe.imageUrls)?Xe.imageUrls:[Xe.imageUrls]:Xe.image_urls?Xe.image_urls.split(";").map(ye=>ye.trim()).filter(Boolean):[],metadata:st.metadata||{},order_num:st.order_num}}).filter(Xe=>Xe!==null);return{...De,tags:Ze}})}return Be.sort((Ue,De)=>Number((De==null?void 0:De.score)??0)-Number((Ue==null?void 0:Ue.score)??0))},[S,tr,or,mr]),Yt=ht(()=>{if(console.log("[ChatMessageAdapter] parseGraphReferenceData - graphReference:",$,"type:",typeof $),!$)return console.log("[ChatMessageAdapter] graphReference \u4E3A\u7A7A\uFF0C\u8FD4\u56DE\u7A7A\u6570\u7EC4"),[];let ae=[];try{if(typeof $=="string"){if($==="[]"||$==="null"||$.trim()==="")return console.log("[ChatMessageAdapter] graphReference \u662F\u7A7A\u5B57\u7B26\u4E32\uFF0C\u8FD4\u56DE\u7A7A\u6570\u7EC4"),[];const Ue=JSON.parse($);ae=Array.isArray(Ue)?Ue:[],console.log("[ChatMessageAdapter] \u89E3\u6790\u5B57\u7B26\u4E32\u683C\u5F0F\u6210\u529F\uFF0Crefs.length:",ae.length)}else if(Array.isArray($))ae=$,console.log("[ChatMessageAdapter] graphReference \u662F\u6570\u7EC4\u683C\u5F0F\uFF0Crefs.length:",ae.length);else if(typeof $=="object"&&$!==null)ae=[$],console.log("[ChatMessageAdapter] graphReference \u662F\u5BF9\u8C61\u683C\u5F0F\uFF0C\u8F6C\u6362\u4E3A\u6570\u7EC4\uFF0Crefs.length:",ae.length);else return console.warn("[ChatMessageAdapter] graphReference \u683C\u5F0F\u4E0D\u652F\u6301:",typeof $,$),[]}catch(Ue){return console.error("[ChatMessageAdapter] Failed to parse graphReference:",Ue,$),[]}let Be=ae.map((Ue,De)=>{const{metadata:Ze,...Xe}=Ue;return{id:Ue.id||`graph-${De}`,graphName:Ue.graphName||`\u56FE\u8C31${De+1}`,tags:[],...Xe}});const Pe=Ho(tr||[]);if(Pe&&Pe.length){const Ue=Pe.filter(De=>De.fromtype==="2");Be=Be.map(De=>{let Ze=[];Array.isArray(De.traceNodes)&&De.traceNodes.length>0?Ze=De.traceNodes.map((le,ye)=>({id:le.id,index:mr(String(le.id))??ye+1,image_urls:[],metadata:le.metadata||{},...le})):Ze=Ue.filter(le=>String(le.id)===String(De.id)).map(le=>({id:le.id||"",index:mr(String(le.id))||le.indexId||"",image_urls:le.imageUrls?Array.isArray(le.imageUrls)?le.imageUrls:[le.imageUrls]:le.image_urls?le.image_urls.split(";").map(ye=>ye.trim()).filter(Boolean):[],metadata:{}}));const Xe=new Set,st=Ze.filter(le=>Xe.has(String(le.id))?!1:(Xe.add(String(le.id)),!0)).sort((le,ye)=>Number(le.index)-Number(ye.index));return{...De,tags:st}})}return Be},[$,tr,or,mr]),at=ht(()=>{const ae=[...Ho(tr||[]).filter(Be=>Be.imageUrls&&Array.isArray(Be.imageUrls)).flatMap(Be=>Be.imageUrls),...Ce];return Array.from(new Set(ae))},[tr,Ce]),gt=ht(()=>typeof n!="string"?[]:RC(n),[n]),xt=ht(()=>Array.from(new Set([...at||[],...gt||[]])),[at,gt]),Re=ht(()=>{var ae,Be,Pe,Ue,De,Ze,Xe,st;if(!D)return null;try{const le=typeof D=="string"?JSON.parse(D):D;if(Array.isArray(le)&&le.length>0){const ye=le[0];if(ye.retrieveSqlData)return{dataFetchUrl:ye.retrieveSqlData.fetchUrl||"/index/knowledgeBase/file/stream",databaseName:ye.retrieveSqlData.databaseName||"\u6570\u636E\u5E93",tableName:ye.retrieveSqlData.tableName||"\u6570\u636E\u8868",total:ye.retrieveSqlData.total||0,type:ye.retrieveSqlData.type||"COLLECTION",preData:{columns:((Be=(ae=ye.retrieveSqlData.preData)==null?void 0:ae[0])==null?void 0:Be.columns)||[],rows:((Ue=(Pe=ye.retrieveSqlData.preData)==null?void 0:Pe[0])==null?void 0:Ue.data)||[]}}}return le.retrieveSqlData?{dataFetchUrl:le.retrieveSqlData.fetchUrl||"/index/knowledgeBase/file/stream",databaseName:le.retrieveSqlData.databaseName||"\u6570\u636E\u5E93",tableName:le.retrieveSqlData.tableName||"\u6570\u636E\u8868",total:le.retrieveSqlData.total||0,type:le.retrieveSqlData.type||"COLLECTION",preData:{columns:((Ze=(De=le.retrieveSqlData.preData)==null?void 0:De[0])==null?void 0:Ze.columns)||[],rows:((st=(Xe=le.retrieveSqlData.preData)==null?void 0:Xe[0])==null?void 0:st.data)||[]}}:{dataFetchUrl:le.dataFetchUrl||"/index/knowledgeBase/file/stream",databaseName:le.databaseName||"\u6570\u636E\u5E93",tableName:le.tableName||"\u6570\u636E\u8868",total:le.total||0,type:le.type||"COLLECTION",preData:le.preData||{columns:[],rows:[]}}}catch(le){return console.error("Failed to parse databaseReference:",le),null}},[D]),$t=ae=>{const{dataSourceType:Be,databaseName:Pe,businessTableName:Ue,tableName:De}=ae;return Be==="DataTable"?`${Pe||"\u6570\u636E\u5E93"} - ${Ue||"\u6570\u636E\u8868"}`:Be==="DirectDB"?`${Pe||"\u6570\u636E\u5E93"} - ${De||"\u6570\u636E\u8868"}`:Pe||Ue||De||"\u6570\u636E\u5E93"};He.useEffect(()=>{zt(null),ke([])},[W]),He.useEffect(()=>{var Pe;const ae=Ue=>{try{const De=typeof Ue=="string"?JSON.parse(Ue):Ue;return De?Array.isArray(De)?De:[De]:[]}catch(De){return console.error("[\u6570\u636E\u5E93\u5F15\u7528\u89E3\u6790] normalizeDbReferenceList \u5931\u8D25:",De),[]}},Be=(Ue,De)=>{if(!Array.isArray(Ue))return[];const Ze=De!=null&&De.id?String(De.id):void 0,Xe=Ze?mr(Ze):void 0,st=Ze?Mr[Ze]:void 0,le=Xe??st??(De==null?void 0:De.referenceIndex)??void 0,ye=Ze&&le!==void 0?[{id:Ze,index:le}]:[];return Ue.map(ve=>{var Je,it,Ut,Rt;return{...ve,id:ve.id||Ze||ve.tableName,referenceId:Ze,referenceIndex:le,tags:ye,fetchUrl:ve.fetchUrl||((Je=De==null?void 0:De.retrieveSqlData)==null?void 0:Je.fetchUrl)||(Re==null?void 0:Re.dataFetchUrl)||"",databaseName:ve.databaseName||((it=De==null?void 0:De.retrieveSqlData)==null?void 0:it.databaseName)||(Re==null?void 0:Re.databaseName)||"",tableName:ve.tableName||((Ut=De==null?void 0:De.retrieveSqlData)==null?void 0:Ut.tableName)||(Re==null?void 0:Re.tableName)||"",dataSourceType:ve.dataSourceType||((Rt=De==null?void 0:De.retrieveSqlData)==null?void 0:Rt.type)||(Re==null?void 0:Re.type)||"DataTable"}})};if(D){const Ue=ae(D),De=[];if(Ue.forEach(Ze=>{var Xe,st,le;if(Array.isArray(Ze==null?void 0:Ze.retrieveTableDataList)&&Ze.retrieveTableDataList.length)De.push(...Be(Ze.retrieveTableDataList,Ze));else if(Array.isArray((le=(st=(Xe=Ze==null?void 0:Ze.retrieveSqlData)==null?void 0:Xe.preData)==null?void 0:st[0])==null?void 0:le.data)&&Ze.retrieveSqlData.preData[0].data.length){const ye={businessTableName:Ze.retrieveSqlData.tableName||"\u6570\u636E\u8868",databaseName:Ze.retrieveSqlData.databaseName||(Re==null?void 0:Re.databaseName)||"\u6570\u636E\u5E93",tableName:Ze.retrieveSqlData.tableName||(Re==null?void 0:Re.tableName)||"\u6570\u636E\u8868",fetchUrl:Ze.retrieveSqlData.fetchUrl||(Re==null?void 0:Re.dataFetchUrl)||"",dataSourceType:Ze.retrieveSqlData.type||"DirectDB",total:Ze.retrieveSqlData.total};De.push(...Be([ye],Ze))}}),De.length>0){ue(De);return}if((Pe=Re==null?void 0:Re.preData)!=null&&Pe.rows){const Ze=Be(Re.preData.rows,{});ue(Ze);return}console.warn("[\u6570\u636E\u5E93\u5F15\u7528\u89E3\u6790] \u672A\u627E\u5230\u53EF\u7528\u7684\u6570\u636E\u5E93\u6570\u636E")}else console.log("[\u6570\u636E\u5E93\u5F15\u7528\u89E3\u6790] databaseReference \u4E0D\u5B58\u5728\uFF0C\u6E05\u7A7A databaseData");ue([])},[D,Re,W,Mr,mr]);const sr=Bt(()=>{try{const ae=Array.isArray(M)?M:[],Be=Array.isArray(Q)?Q:[],Pe=Array.isArray(Yt)?Yt:[],Ue=xt,De=Ho(tr||[]),Ze=Je=>typeof or!="string"?!1:new RegExp(`\\[retrive-tag[^\\]]*id=['"]${Je}['"][^\\]]*\\]\\[([^\\]]+)\\]\\[\\/retrive-tag\\]`,"g").test(or),Xe=Je=>{const it=new Map;return Je.forEach(Ut=>{if(Ut.id){const Rt=String(Ut.id);if(!it.has(Rt))it.set(Rt,Ut);else{const lt=it.get(Rt),wt=Number(Ut.index)||0,Kr=Number(lt.index)||0;(wt<Kr||wt===Kr&&!lt.index)&&it.set(Rt,Ut)}}}),Array.from(it.values())},st=ae.map(Je=>({...Je,tags:Xe((Je.tags||[]).filter(it=>it.id&&Ze(String(it.id))))})),le=Be.map(Je=>({...Je,tags:Xe((Je.tags||[]).filter(it=>it.id&&Ze(String(it.id))))})),ye=Pe.map(Je=>({...Je,tags:Xe((Je.tags||[]).filter(it=>it.id&&Ze(String(it.id))))})),ve=Me&&Me.length>0?Me.map(Je=>({id:Je.id||Je.tableName||Je.referenceId||"",databaseName:Je.databaseName||(Re==null?void 0:Re.databaseName)||"",tableName:Je.tableName||(Re==null?void 0:Re.tableName)||"",fetchUrl:Je.fetchUrl||(Re==null?void 0:Re.dataFetchUrl)||"",score:Ti(Je.score),tags:Je.tags||[],referenceIndex:Je.referenceIndex,metadata:Je.metadata?{...Je.metadata,data:void 0,dataList:void 0,rows:void 0,preData:void 0}:{}})):[];return{queryId:W,knowledgeRefs:st,webRefs:le,graphRefs:ye,databaseRefs:ve,images:Ue,raw:{reference:A,webReference:S,graphReference:$,databaseReference:D,retriveNodes:De}}}catch{return{queryId:W,knowledgeRefs:[],webRefs:[],graphRefs:[],databaseRefs:[],images:[],raw:{reference:A,webReference:S,graphReference:$,databaseReference:D,retriveNodes:[]}}}},[M,Q,Yt,Re,Me,xt,tr,W,A,S,$,D,or]),Nr=ht(()=>{if(!f)return[];if(Array.isArray(B))return B;if(typeof B=="string"&&B)try{return JSON.parse(B)}catch{return[]}return[]},[f,B]),ee=()=>{if(!f||Nr.length===0)return null;const ae=le=>{if(!le)return"";if(typeof le=="string"&&(le.includes("KB")||le.includes("MB")||le.includes("GB")||le.includes("B")))return le;const ye=typeof le=="string"?parseFloat(le)||0:le;return ye<1024?`${ye}B`:ye<1024*1024?`${(ye/1024).toFixed(1)}KB`:`${(ye/1024/1024).toFixed(1)}MB`},Be=le=>le!=null&&le.status&&(String(le.status).toLowerCase()==="uploading"||String(le.status).toLowerCase()==="parsing")?!1:!!(le!=null&&le.url||le!=null&&le.filePath||le!=null&&le.convertedFilePath),Pe=Nr.filter(le=>{const ye=(le.name||"").split(".").pop()||"";return["image","jpg","jpeg","png","gif","bmp","webp"].includes(ye.toLowerCase())}),Ue=Nr.filter(le=>{const ye=(le.name||"").split(".").pop()||"";return!["image","jpg","jpeg","png","gif","bmp","webp"].includes(ye.toLowerCase())}),De=Pe.filter(Be),Ze=Pe.filter(le=>!Be(le)),Xe=Ue.filter(Be),st=Ue.filter(le=>!Be(le));return Xe.length+st.length,q.jsxs("div",{className:"mt-4 mb-4",style:{width:"100%",paddingLeft:f?"0":"1.8rem",paddingRight:f?"1.8rem":"0",display:"flex",flexDirection:"column",alignItems:f?"flex-end":"flex-start"},children:[(De.length>0||Ze.length>0)&&q.jsx(e0,{$theme:he,children:q.jsxs("div",{className:"gallery-grid",style:{direction:"rtl"},children:[Ze.map((le,ye)=>{var ve;return q.jsx("div",{className:"gallery-item",style:{background:"#f5f6fa",display:"flex",alignItems:"center",justifyContent:"center"},children:q.jsx("div",{className:"animate-spin",style:{width:24,height:24,border:"2px solid #d1d5db",borderTopColor:((ve=he.colors)==null?void 0:ve.primary)||"#3b82f6",borderRadius:"9999px"}})},`pending-img-${ye}`)}),De.map(le=>q.jsxs("div",{className:"gallery-item",onClick:()=>{z==null||z("reference_file:click",{...le,file:le.name,file_type:le.file_type||"image",url:le.url||le.filePath,parse_url:le.parseUrl||le.convertedFilePath,retrieve_tags:le.retrieveTags||[],file_id:le.uid||le.file_id,parsed_file_type:le.parsed_file_type||"image",references:le,type:le.type||"image",isUploadFile:!0,pdfPages:le.pdfPages||0})},children:[q.jsx(Zl,{src:le.url||le.filePath,alt:le.name,className:"gallery-image",token:e,url:t,eventsEmit:Tt}),q.jsx("div",{className:"gallery-overlay",children:le.name})]},le.uid||le.name))]})}),(Xe.length>0||st.length>0)&&q.jsx("div",{style:{display:"flex",flexDirection:"column",marginTop:"6px",alignItems:f?"flex-end":"flex-start",width:"100%"},children:q.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:"8px",alignItems:"flex-end",direction:"ltr",paddingLeft:f?"0":"0.5rem",paddingRight:f?"0.5rem":"0",justifyContent:"flex-end",width:"100%",maxWidth:"100%"},children:[st.map((le,ye)=>{const ve=(le.name||"").split(".").pop()||"",Je=Ql(ve,m,18);return q.jsxs("div",{className:"group gap-x-3 items-center file-display-card relative flex w-[240px] bg-white border border-gray-200 rounded-lg shadow-sm px-3 py-2.5 transition-all",children:[q.jsx("div",{className:"pt-0.5 flex-shrink-0",style:{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center"},children:q.jsx("div",{style:{transform:"scale(1.2)",transformOrigin:"center"},children:Je})}),q.jsx("div",{className:"flex-1 min-w-0 flex flex-col justify-center",children:q.jsxs("div",{className:"flex items-center justify-between gap-1.5",children:[q.jsx("div",{style:{height:"13px",borderRadius:"4px",backgroundColor:"#d1d5db",width:"140px"}}),q.jsx("div",{style:{height:"12px",borderRadius:"4px",backgroundColor:"#d1d5db",width:"40px"}})]})})]},`pending-doc-${le.uid||ye}`)}),Xe.map(le=>{var Ut;const ye=(le.name||"").split(".").pop()||"",ve=le.size??((Ut=le.file)==null?void 0:Ut.size)??le.fileSize,Je=ae(ve),it=Ql(ye,m,18);return q.jsxs("div",{className:"group gap-x-3 items-center file-display-card relative flex w-[240px] min-h-[56px] bg-white border border-gray-200 rounded-lg shadow-sm px-3 py-2.5 transition-all hover:shadow-md hover:border-blue-300",style:{cursor:"pointer"},title:le.name,onClick:()=>{z==null||z("reference_file:click",{...le,file:le.name,file_type:le.file_type||ye,url:le.url||le.filePath,parse_url:le.parseUrl||le.convertedFilePath,retrieve_tags:le.retrieveTags||[],file_id:le.uid||le.file_id,parsed_file_type:le.parsed_file_type||ye,references:le,type:le.type||"file",isUploadFile:!0,pdfPages:le.pdfPages||0})},children:[q.jsx("div",{style:{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center"},children:q.jsx("div",{style:{transform:"scale(1.65)",marginBottom:"4px",transformOrigin:"center"},children:it})}),q.jsxs("div",{className:"flex-1 min-w-0 flex flex-col justify-center",children:[q.jsx("div",{className:"flex",children:q.jsx("div",{className:"flex items-center justify-between gap-1.5",children:q.jsx("span",{className:"text-[13px] font-medium truncate max-w-[140px]",title:le.name,children:le.name})})}),q.jsx("div",{className:" text-[12px] text-gray-400 whitespace-nowrap",children:Je})]})]},le.uid||le.name)})]})})]})},yr=()=>{if(console.log("[ChatMessageAdapter] convertKnowledgeBasesToDocumentList - knowledgeBases:",be),!be||!Array.isArray(be)||be.length===0)return console.log("[ChatMessageAdapter] convertKnowledgeBasesToDocumentList - knowledgeBases \u4E3A\u7A7A\u6216\u4E0D\u662F\u6570\u7EC4"),null;const ae=[];let Be=0;if(be.forEach((ve,Je)=>{ve&&ve.treeData&&Array.isArray(ve.treeData)&&(ve.treeData.forEach(it=>{ae.push({...it,_kbIndex:Je,_kbName:ve.knowledgeBaseName||""})}),Be+=ve.totalFileCount||0)}),ae.length===0)return console.log("[ChatMessageAdapter] convertKnowledgeBasesToDocumentList - \u6CA1\u6709\u6709\u6548\u7684 treeData"),null;console.log("[ChatMessageAdapter] convertKnowledgeBasesToDocumentList - \u5408\u5E76\u540E\u7684 allTreeData \u957F\u5EA6:",ae.length);const Pe=ae.filter(ve=>ve.type==="dir"),Ue=ae.filter(ve=>ve.type==="file");console.log("[ChatMessageAdapter] convertKnowledgeBasesToDocumentList - dirItems:",Pe.length,"fileItems:",Ue.length);let De=[],Ze="\u6309\u76EE\u5F55\u5206\u7C7B";if(Pe.length>0){const ve=Pe.map((Je,it)=>({id:`${Je._kbIndex}-${Je.name||it}`||it,name:Je.name||"",documentCount:Je.fileCount||0,visible:!0,itemType:"dir"}));De.push(...ve)}if(Ue.length>0){const ve=Ue.map((Je,it)=>({id:`${Je._kbIndex}-${Je.name||it}`||it,name:Je.name||"\u672A\u77E5\u6587\u4EF6",documentCount:0,visible:!0,itemType:"file",fileType:Je.fileType||""}));De.push(...ve)}if(Pe.length===0&&Ue.length>0&&(Ze="\u77E5\u8BC6\u5E93\u6587\u6863"),console.log("[ChatMessageAdapter] convertKnowledgeBasesToDocumentList - categories:",De),De.length===0)return console.log("[ChatMessageAdapter] convertKnowledgeBasesToDocumentList - \u6CA1\u6709\u53EF\u7528\u7684\u5206\u7C7B"),null;const Xe=Be>0?Be:Ue.length,st=De.slice(0,5),le=De.length>5,ye={title:"\u77E5\u8BC6\u5E93\u6587\u6863\u5217\u8868",subtitle:Ze,totalCount:Xe,categories:st,showViewAll:le,viewAllText:"\u67E5\u770B\u5168\u90E8>>"};return console.log("[ChatMessageAdapter] convertKnowledgeBasesToDocumentList - result:",ye),ye},ne=()=>{if(f)return null;const ae=yr();return ae?q.jsx(SC,{data:ae,styles:m,onCategoryClick:Be=>{z==null||z("knowledge_base_category:click",{category:Be,knowledgeBase:be==null?void 0:be[0]})},onViewAllClick:()=>{z==null||z("knowledge_base_view_all:click",{knowledgeBases:be})}}):null},Jn=()=>{var ye;if(f)return null;console.log("[ChatMessageAdapter] renderReferences \u5F00\u59CB - referenceMode:",ie),console.log("[ChatMessageAdapter] renderReferences - graphReference \u539F\u59CB\u503C:",$),console.log("[ChatMessageAdapter] renderReferences - parseGraphReferenceData:",Yt);const ae=Array.isArray(M)?M:[],Be=Array.isArray(Q)?Q:[],Pe=Array.isArray(Yt)?Yt:[];console.log("[ChatMessageAdapter] renderReferences - knowledgeList:",ae.length,"webList:",Be.length,"graphList:",Pe.length),console.log("[ChatMessageAdapter] renderReferences - graphList \u8BE6\u60C5:",Pe);const Ue=ae.length>0&&U!==5,De=Be.length>0,Ze=Pe.length>0;console.log("[ChatMessageAdapter] renderReferences - hasKnowledgeRefs:",Ue,"hasWebRefs:",De,"hasGraphRefs:",Ze);const Xe=xt.length>0,st=Me&&Me.length>0,le=Ue||De||Ze||Xe||st;if(console.log("[ChatMessageAdapter] renderReferences - hasAny:",le),console.log("[\u5F15\u7528\u6E32\u67D3] databaseReference:",D),console.log("[\u5F15\u7528\u6E32\u67D3] databaseData:",Me),console.log("[\u5F15\u7528\u6E32\u67D3] databaseData.length:",Me==null?void 0:Me.length),console.log("[\u5F15\u7528\u6E32\u67D3] hasDatabaseRefs:",st),ie==="button"){if(console.log("[ChatMessageAdapter] referenceMode === button, hasAny:",le),!le)return console.log("[ChatMessageAdapter] hasAny \u4E3A false\uFF0C\u4E0D\u6E32\u67D3\u5F15\u7528"),null;const ve=Ue&&(ae==null?void 0:ae.length)||0,Je=De&&(Be==null?void 0:Be.length)||0,it=Ze&&(Pe==null?void 0:Pe.length)||0,Ut=st&&(Me==null?void 0:Me.length)||0;let Rt=ve+Je+it+Ut;return Rt===0&&Xe&&(Rt=1),q.jsxs(q.Fragment,{children:[Xe&&q.jsx(e0,{$theme:he,children:q.jsx("div",{className:"gallery-grid",children:xt.map((lt,wt)=>q.jsxs("div",{className:"gallery-item",onClick:()=>{z==null||z("reference_file:click",{file:`\u56FE${wt+1}`,file_type:"image",url:lt,parse_url:lt,retrieve_tags:[],references:{url:lt},type:"image",isUploadFile:!1})},children:[q.jsx(Zl,{src:lt,alt:`\u56FE${wt+1}`,className:"gallery-image",token:e,url:t,eventsEmit:Tt}),q.jsxs("div",{className:"gallery-overlay",children:["\u56FE",wt+1]})]},lt+wt))})}),q.jsx("div",{style:{padding:"6px 2.9rem"},children:q.jsxs("button",{style:{cursor:"pointer",color:((ye=he.colors)==null?void 0:ye.textDisabled)||"#86909C"},className:"text-sm flex items-center gap-x-1 px-3 py-1 rounded border border-gray-200 hover:border-blue-300 transition-colors",onClick:()=>{const lt=sr();z==null||z("references:click",lt)},onMouseEnter:lt=>{var wt;lt.currentTarget.style.color=((wt=he.colors)==null?void 0:wt.primary)||"#3b82f6"},onMouseLeave:lt=>{var wt;lt.currentTarget.style.color=((wt=he.colors)==null?void 0:wt.textDisabled)||"#86909C"},children:[q.jsx(kw,{size:16}),q.jsxs("span",{children:["\u77E5\u8BC6\u6EAF\u6E90",Rt?` ${Rt}`:""]}),q.jsx(ww,{size:16})]})})]})}return le?q.jsxs(q.Fragment,{children:[Xe&&q.jsx(e0,{$theme:he,children:q.jsx("div",{className:"gallery-grid",children:xt.map((ve,Je)=>q.jsxs("div",{className:"gallery-item",onClick:()=>{z==null||z("reference_file:click",{file:`\u56FE${Je+1}`,file_type:"image",url:ve,parse_url:ve,retrieve_tags:[],references:{url:ve},type:"image",isUploadFile:!1})},children:[q.jsx(Zl,{src:ve,alt:`\u56FE${Je+1}`,className:"gallery-image",token:e,url:t,eventsEmit:Tt}),q.jsxs("div",{className:"gallery-overlay",children:["\u56FE",Je+1]})]},ve+Je))})}),Ue&&q.jsxs(Oi,{$theme:he,children:[q.jsx("div",{className:"reference-title justify-between items-center flex",children:q.jsxs("div",{className:"flex items-center gap-2",children:[q.jsx("span",{className:"text-[#374151]",children:"\u77E5\u8BC6\u5E93\u6587\u6863\u5F15\u7528"}),q.jsx("span",{className:"text-[#b4b4b4] text-xs",children:` (${ae.length})`}),ae.length>2&&q.jsx("div",{onClick:()=>We(!Ie),className:"cursor-pointer hover:text-[#86909C] transition-colors",children:Ie?q.jsx(Fa,{size:16,className:"text-[#b4b4b4]"}):q.jsx(Ba,{size:16,className:"text-[#b4b4b4]"})})]})}),q.jsx("div",{className:"reference-list",children:(Ie?ae:ae.slice(0,2)).map((ve,Je)=>ve&&q.jsx("div",{className:"reference-item",children:q.jsxs("div",{className:"file-info flex items-end gap-2",children:[q.jsx("div",{className:"flex-shrink-0",children:(()=>{const it=ve.file_type||(ve.file_name||"").split(".").pop()||"pdf",Ut=(ve.file_name||"").split(".").pop()||"file";return it==="video"||["mp4","avi","mov","wmv","flv","webm","mkv"].includes(it)?q.jsx("div",{className:"w-6 h-6 rounded flex items-center justify-center bg-red-100",children:q.jsx(Aw,{size:16,className:"text-red-600"})}):q.jsx("div",{className:"w-6 h-6 rounded flex items-center justify-center",children:Ql(Ut,m,16)})})()}),q.jsx("div",{className:"flex-1 min-w-0",children:q.jsx("div",{className:"text-sm w-[250px] font-medium text-gray-900 truncate hover:text-blue-600 cursor-pointer",onClick:it=>{it.stopPropagation(),z==null||z("knowledge_referenceFile_title:click",{data:{...ve,file_type:ve.file_type,file_name:ve.file_name,metadata:ve.metadata,parsedFilePath:ve.parsedFilePath}})},children:ve.file_name})}),q.jsx("div",{className:"flex items-center gap-1",children:(()=>{const it=new Set,Ut=(ve.tags||[]).filter(lt=>it.has(lt.id)?!1:(it.add(lt.id),!0)).sort((lt,wt)=>Number(lt.index)-Number(wt.index)),Rt=lt=>{if(typeof or!="string")return lt;const wt=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${lt}['"][^\\]]*\\]\\[([^\\]]+)\\]\\[\\/retrive-tag\\]`,"g").exec(or);return wt?wt[1]:lt};return Ut.slice(0,10).map(lt=>q.jsx("span",{className:"w-6 h-6 bg-[#e6f7ff] text-[#1890ff] rounded text-xs font-medium flex items-center justify-center cursor-pointer hover:bg-orange-200 transition-colors",onClick:wt=>{wt.stopPropagation();const Kr=Ot(ve,lt.id),An=ve.file_type==="video"?"3":"0";z==null||z("retrive_tag:click",{tagInfo:Kr||ve,fromtype:An,leaf:{id:lt.id,fromtype:An},attributes:{}})},children:Rt(lt.id)},lt.id))})()}),typeof ve.score=="number"&&q.jsxs("div",{className:"text-sm text-gray-600",children:["\u5206\u6570: ",Number(ve.score).toFixed(2)]}),ve.file_type!=="video"&&q.jsxs("div",{className:"flex items-center gap-2",children:[q.jsx(Dw,{size:16,className:"text-gray-400 hover:text-blue-600 transition-colors",style:{cursor:r?"pointer":"not-allowed"},onClick:it=>{r&&(it.stopPropagation(),z==null||z("referenceFile_download",{data:{...ve,file_type:ve.file_type,file_name:ve.file_name,metadata:ve.metadata,parsedFilePath:ve.parsedFilePath}}))}}),q.jsx("div",{className:"w-px h-4 bg-gray-300"}),q.jsx(Ew,{size:16,className:"text-gray-400 hover:text-blue-600 transition-colors",onClick:it=>{it.stopPropagation(),z==null||z("referenceFile_filechat",{data:{...ve,file_type:ve.file_type,file_name:ve.file_name,metadata:ve.metadata,parsedFilePath:ve.parsedFilePath}})}})]})]})},ve.file_id||Je))})]}),st&&q.jsxs(Oi,{$theme:he,children:[q.jsx("div",{className:"reference-title justify-between items-center flex",children:q.jsxs("div",{className:"flex items-center gap-2",children:[q.jsx("span",{className:"text-[#374151]",children:"\u6570\u636E\u5E93\u5F15\u7528"}),q.jsx("span",{className:"text-[#b4b4b4] text-xs",children:` (${Me.length||0})`}),Me.length>2&&q.jsx("div",{onClick:()=>je(!Oe),className:"cursor-pointer hover:text-[#86909C] transition-colors",children:Oe?q.jsx(Fa,{size:16,className:"text-[#b4b4b4]"}):q.jsx(Ba,{size:16,className:"text-[#b4b4b4]"})})]})}),q.jsx("div",{className:"reference-list",children:(Oe?Me:Me.slice(0,2)).map((ve,Je)=>q.jsx("div",{className:"reference-item",children:q.jsxs("div",{className:"file-info flex items-end gap-2",children:[q.jsx("div",{className:"flex-shrink-0",children:q.jsx("div",{className:"w-6 h-6 rounded flex items-center justify-center",children:q.jsx(Cw,{size:20,className:"text-blue-600"})})}),q.jsx("div",{className:"flex-1 min-w-0",children:q.jsx("div",{className:"text-sm w-[250px] font-medium text-gray-900 truncate hover:text-blue-600 cursor-pointer",onClick:it=>{it.stopPropagation(),z==null||z("database_referenceFile_title:click",{data:{...ve,file_type:"database",file_name:$t(ve),metadata:ve,parsedFilePath:ve.fetchUrl||(Re==null?void 0:Re.dataFetchUrl)||"",file:ve.databaseName||"database",url:ve.fetchUrl||(Re==null?void 0:Re.dataFetchUrl)||"",parse_url:ve.fetchUrl||(Re==null?void 0:Re.dataFetchUrl)||"",retrieve_tags:ve.tags||[],references:ve,type:"database",isUploadFile:!1}})},children:$t(ve)})}),q.jsx("div",{className:"flex items-center gap-1",children:(Array.isArray(ve.tags)&&ve.tags.length?ve.tags:[{id:ve.referenceId||`database-${Je}`,index:ve.referenceIndex??Je+1}]).map(it=>q.jsx("span",{className:"w-6 h-6 bg-orange-100 text-orange-600 rounded text-xs font-medium flex items-center justify-center cursor-pointer hover:bg-orange-200 transition-colors",children:it.index??Je+1},`${it.id||"database"}-${it.index}`))}),typeof ve.score=="number"&&q.jsxs("div",{className:"text-sm text-gray-600",children:["\u5206\u6570: ",Number(ve.score).toFixed(2)]})]})},ve.tableName||Je))})]}),De&&q.jsxs(Oi,{$theme:he,children:[q.jsx("div",{className:"reference-title justify-between items-center flex",children:q.jsxs("div",{className:"flex items-center gap-2",children:[q.jsx("span",{className:"text-[#374151]",children:"\u4E92\u8054\u7F51\u641C\u7D22\u5F15\u7528"}),q.jsx("span",{className:"text-[#b4b4b4] text-xs",children:` (${Be.length})`}),Be.length>2&&q.jsx("div",{onClick:()=>ot(!ut),className:"cursor-pointer hover:text-[#86909C] transition-colors",children:ut?q.jsx(Fa,{size:16,className:"text-[#b4b4b4]"}):q.jsx(Ba,{size:16,className:"text-[#b4b4b4]"})})]})}),q.jsx("div",{className:"reference-list",children:(ut?Be:Be.slice(0,2)).map((ve,Je)=>q.jsx("div",{className:"reference-item",children:q.jsxs("div",{className:"file-info flex items-end gap-2",children:[q.jsx("div",{className:"flex-shrink-0",children:q.jsx("div",{className:"w-6 h-6 rounded-full flex items-center justify-center",children:q.jsx(ko,{type:"rag/netretrive",size:32,className:"text-green-600"})})}),q.jsx("div",{className:"flex-1 min-w-0",children:q.jsx("div",{className:"text-sm w-[250px] font-medium text-gray-900 truncate hover:text-blue-600 cursor-pointer",onClick:it=>{it.stopPropagation(),z==null||z("web_referenceFile_title:click",{data:{...ve,file_type:ve.file_type,file_name:ve.file_name,metadata:ve.metadata,parsedFilePath:ve.parsedFilePath,file:ve.file_name,url:ve.link,parse_url:ve.link,retrieve_tags:ve.tags||[],references:ve,type:"file",isUploadFile:!1}})},children:ve.file_name})}),q.jsx("div",{className:"flex items-center gap-1",children:(()=>{const it=new Set,Ut=(ve.tags||[]).filter(lt=>it.has(lt.id)?!1:(it.add(lt.id),!0)).sort((lt,wt)=>Number(lt.index)-Number(wt.index)),Rt=lt=>{if(typeof or!="string")return lt;const wt=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${lt}['"][^\\]]*\\]\\[([^\\]]+)\\]\\[\\/retrive-tag\\]`,"g").exec(or);return wt?wt[1]:lt};return Ut.slice(0,1).map(lt=>q.jsx("span",{className:"w-6 h-6 bg-[#f6ffed] text-[#52c41a] rounded text-xs font-medium flex items-center justify-center cursor-pointer hover:bg-orange-200 transition-colors",onClick:wt=>{wt.stopPropagation();const Kr=Ot(ve,lt.id);z==null||z("retrive_tag:click",{tagInfo:Kr||ve,fromtype:"1",leaf:{id:lt.id,fromtype:"1"},attributes:{}})},children:Rt(lt.id)},lt.id))})()}),typeof ve.score=="number"&&q.jsxs("div",{className:"text-sm text-gray-600",children:["\u5206\u6570: ",Number(ve.score).toFixed(2)]})]})},(ve.link||"")+Je))})]}),Ze&&q.jsxs(Oi,{$theme:he,children:[q.jsx("div",{className:"reference-title justify-between items-center flex",children:q.jsxs("div",{className:"flex items-center gap-2",children:[q.jsx("span",{className:"text-[#374151]",children:"\u56FE\u8C31\u5F15\u7528"}),q.jsx("span",{className:"text-[#b4b4b4] text-xs",children:` (${Pe.length})`}),Pe.length>2&&q.jsx("div",{onClick:()=>ft(!Ve),className:"cursor-pointer hover:text-[#86909C] transition-colors",children:Ve?q.jsx(Fa,{size:16,className:"text-[#b4b4b4]"}):q.jsx(Ba,{size:16,className:"text-[#b4b4b4]"})})]})}),q.jsx("div",{className:"reference-list",children:(Ve?Pe:Pe.slice(0,2)).map((ve,Je)=>q.jsx("div",{className:"reference-item",children:q.jsxs("div",{className:"file-info flex items-end gap-2",children:[q.jsx("div",{className:"flex-shrink-0",children:q.jsx("div",{className:"w-6 h-6 rounded flex items-center justify-center",children:q.jsx("div",{className:"w-6 h-6 bg-purple-100 text-purple-600 rounded text-xs font-medium flex items-center justify-center",children:"\u56FE"})})}),q.jsx("div",{className:"flex-1 min-w-0",children:q.jsx("div",{className:"text-sm w-[250px] font-medium text-gray-900 truncate",children:ve.graphName||`\u56FE\u8C31${Je+1}`})}),q.jsx("div",{className:"flex items-center gap-1",children:(()=>{const it=new Set,Ut=(ve.tags||[]).filter(lt=>it.has(lt.id)?!1:(it.add(lt.id),!0)).sort((lt,wt)=>Number(lt.index)-Number(wt.index)),Rt=lt=>{if(typeof or!="string")return null;const wt=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${lt}['"][^\\]]*\\]\\[([^\\]]+)\\]\\[\\/retrive-tag\\]`,"g").exec(or);return wt?wt[1]??null:null};return Ut.map(lt=>({tag:lt,num:Rt(lt.id)})).filter(lt=>lt.num!==null&<.num!==void 0&<.num!=="").slice(0,10).map(({tag:lt,num:wt})=>q.jsx("span",{className:"w-6 h-6 bg-purple-100 text-purple-600 rounded text-xs font-medium flex items-center justify-center cursor-pointer hover:bg-purple-200 transition-colors",onClick:Kr=>{Kr.stopPropagation();const An=Array.isArray(ve.traceNodes)?ve.traceNodes.find(In=>String(In==null?void 0:In.id)===String(lt.id)):void 0;z==null||z("retrive_tag:click",{tagInfo:{id:lt.id,index:lt.index,image_urls:lt.image_urls||[]},fromtype:"2",graph:{id:ve.id,graphName:ve.graphName,fetchUrl:ve.fetchUrl,cyphers:ve.cyphers},traceNode:An})},children:wt},lt.id))})()})]})},ve.id||Je))})]})]}):null},_n=()=>f||!Y||!G||G.length===0?null:q.jsx(HC,{$theme:he,children:q.jsx("div",{className:"follow-up-list",children:G.map((ae,Be)=>q.jsx("div",{className:"follow-up-item",style:{animationDelay:`${Be*260}ms`},onClick:()=>{z==null||z("chatbox:follow_up_question_click",{question:ae,queryId:W})},children:ae},`${String(ae)}-${Be}`))})});return q.jsxs(zC,{$align:i,$isUser:f,children:[q.jsxs(_C,{$isUser:f,children:[q.jsx(IC,{$src:y,$isUser:f}),we&&q.jsx("div",{className:"message-time px-2 text-sm text-[#888888]",children:we})]}),ee(),q.jsx(jC,{$isUser:f,$theme:he,children:q.jsx("div",{className:"message-card",children:q.jsx("div",{className:"message-text",children:o==="stream"?q.jsxs(q.Fragment,{children:[!f&&At(),yt(),q.jsx(Fs,{dataSource:{type:Ya.MARKDOWN,content:or},styles:{letterSpacing:m==null?void 0:m.letterSpacing,lineHeight:m==null?void 0:m.lineHeight,templateField:m==null?void 0:m.templateField,text:m==null?void 0:m.text},theme:{...m==null?void 0:m.theme,baseFontSize:16,minHeight:"60px"},onRetriveTagClick:ir,eventsEmit:z,extraProps:Vt,enablePrism:se},`md-${(or||"").length}-think-${tt}`)]}):q.jsx("div",{style:{whiteSpace:"pre-wrap"},children:k})})})}),ne(),Jn(),!f&&ze(),_n(),typeof document<"u"&&$g(q.jsx(qC,{$show:Se!==null,onClick:()=>Te(null),children:Se&&q.jsxs("div",{className:"modal-content",onClick:ae=>ae.stopPropagation(),children:[q.jsx("img",{src:Se,alt:"\u9884\u89C8\u56FE\u7247",className:"modal-image"}),q.jsx("button",{className:"modal-close",onClick:()=>Te(null),children:"\u5173\u95ED"})]})}),document.body)]})};Le.div.attrs({className:"retrive-chat-message-container"})`
|
|
1622
|
-
display: flex;
|
|
1623
|
-
flex-direction: column;
|
|
1624
|
-
width: 100%;
|
|
1625
|
-
margin-bottom: 16px;
|
|
1626
|
-
`;Le.div.attrs({className:"retrive-chat-message-header"})`
|
|
1627
|
-
display: flex;
|
|
1628
|
-
align-items: flex-start;
|
|
1629
|
-
gap: 12px;
|
|
1630
|
-
margin-bottom: 12px;
|
|
1631
|
-
`;Le.div.attrs({className:"retrive-chat-avatar-wrapper"})`
|
|
1632
|
-
width: 40px;
|
|
1633
|
-
height: 40px;
|
|
1634
|
-
border-radius: 50%;
|
|
1635
|
-
overflow: hidden;
|
|
1636
|
-
flex-shrink: 0;
|
|
1637
|
-
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#f3f4f6"}};
|
|
1638
|
-
|
|
1639
|
-
img {
|
|
1640
|
-
width: 100%;
|
|
1641
|
-
height: 100%;
|
|
1642
|
-
object-fit: cover;
|
|
1643
|
-
}
|
|
1644
|
-
`;Le.div.attrs({className:"retrive-chat-content-wrapper"})`
|
|
1645
|
-
flex: 1;
|
|
1646
|
-
display: flex;
|
|
1647
|
-
flex-direction: column;
|
|
1648
|
-
align-items: ${({isUser:e})=>e?"flex-end":"flex-start"};
|
|
1649
|
-
`;Le.div.attrs({className:"retrive-chat-timestamp"})`
|
|
1650
|
-
font-size: 12px;
|
|
1651
|
-
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.disabled)||"#9ca3af"}};
|
|
1652
|
-
margin-bottom: 8px;
|
|
1653
|
-
`;Le.div.attrs({className:"retrive-chat-user-bubble"})`
|
|
1654
|
-
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.userBackground)||"#3b82f6"}};
|
|
1655
|
-
color: white;
|
|
1656
|
-
padding: 12px 16px;
|
|
1657
|
-
border-radius: 12px;
|
|
1658
|
-
max-width: 80%;
|
|
1659
|
-
word-wrap: break-word;
|
|
1660
|
-
`;Le.div.attrs({className:"retrive-chat-ai-message-card"})`
|
|
1661
|
-
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#ffffff"}};
|
|
1662
|
-
border-radius: 12px;
|
|
1663
|
-
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
|
|
1664
|
-
padding: 0;
|
|
1665
|
-
width: 100%;
|
|
1666
|
-
max-width: 100%;
|
|
1667
|
-
overflow: hidden;
|
|
1668
|
-
`;Le.div.attrs({className:"retrive-chat-tabs-container"})`
|
|
1669
|
-
display: flex;
|
|
1670
|
-
border-bottom: 1px solid ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.border)||"#e5e7eb"}};
|
|
1671
|
-
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#ffffff"}};
|
|
1672
|
-
`;Le.button.attrs({className:"retrive-chat-tab-button"})`
|
|
1673
|
-
display: flex;
|
|
1674
|
-
position: relative;
|
|
1675
|
-
align-items: center;
|
|
1676
|
-
gap: 6px;
|
|
1677
|
-
padding: 12px 20px;
|
|
1678
|
-
background: transparent;
|
|
1679
|
-
border: none;
|
|
1680
|
-
border-bottom: 2px solid ${({active:e,theme:t})=>{var r;return e?((r=t.colors)==null?void 0:r.primary)||"#3b82f6":"transparent"}};
|
|
1681
|
-
color: ${({active:e,theme:t})=>{var r,n;return e?((r=t.colors)==null?void 0:r.text)||"#374151":((n=t.colors)==null?void 0:n.disabled)||"#9ca3af"}};
|
|
1682
|
-
font-size: 14px;
|
|
1683
|
-
font-weight: ${({active:e})=>e?500:400};
|
|
1684
|
-
cursor: pointer;
|
|
1685
|
-
transition: all 0.2s ease;
|
|
1686
|
-
|
|
1687
|
-
&:hover {
|
|
1688
|
-
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.text)||"#374151"}};
|
|
1689
|
-
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#f9fafb"}};
|
|
1690
|
-
}
|
|
1691
|
-
|
|
1692
|
-
svg {
|
|
1693
|
-
width: 16px;
|
|
1694
|
-
height: 16px;
|
|
1695
|
-
}
|
|
1696
|
-
`;Le.span.attrs({className:"retrive-chat-tab-badge"})`
|
|
1697
|
-
position: absolute;
|
|
1698
|
-
top: 4px;
|
|
1699
|
-
right: 10px;
|
|
1700
|
-
display: inline-flex;
|
|
1701
|
-
align-items: center;
|
|
1702
|
-
justify-content: center;
|
|
1703
|
-
min-width: 16px;
|
|
1704
|
-
height: 16px;
|
|
1705
|
-
padding: 0 4px;
|
|
1706
|
-
border-radius: 999px;
|
|
1707
|
-
font-size: 11px;
|
|
1708
|
-
font-weight: 500;
|
|
1709
|
-
background: #ef4444;
|
|
1710
|
-
color: #ffffff;
|
|
1711
|
-
line-height: 1;
|
|
1712
|
-
`;Le.div.attrs({className:"retrive-chat-tab-content"})`
|
|
1713
|
-
padding: 20px;
|
|
1714
|
-
`;Le.div.attrs({className:"retrive-chat-llm-config-container"})`
|
|
1715
|
-
margin-bottom: 20px;
|
|
1716
|
-
`;Le.div.attrs({className:"retrive-chat-llm-config-title"})`
|
|
1717
|
-
display: flex;
|
|
1718
|
-
align-items: center;
|
|
1719
|
-
gap: 8px;
|
|
1720
|
-
font-size: 14px;
|
|
1721
|
-
font-weight: 500;
|
|
1722
|
-
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.text)||"#374151"}};
|
|
1723
|
-
margin-bottom: 12px;
|
|
1724
|
-
|
|
1725
|
-
.dot {
|
|
1726
|
-
width: 8px;
|
|
1727
|
-
height: 8px;
|
|
1728
|
-
border-radius: 50%;
|
|
1729
|
-
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.primary)||"#3b82f6"}};
|
|
1730
|
-
}
|
|
1731
|
-
`;Le.div.attrs({className:"retrive-chat-llm-config-grid"})`
|
|
1732
|
-
display: grid;
|
|
1733
|
-
grid-template-columns: repeat(2, 1fr);
|
|
1734
|
-
gap: 12px;
|
|
1735
|
-
`;Le.div.attrs({className:"retrive-chat-llm-config-item"})`
|
|
1736
|
-
display: flex;
|
|
1737
|
-
align-items: center;
|
|
1738
|
-
gap: 8px;
|
|
1739
|
-
font-size: 13px;
|
|
1740
|
-
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.text)||"#374151"}};
|
|
1741
|
-
|
|
1742
|
-
.dot {
|
|
1743
|
-
width: 6px;
|
|
1744
|
-
height: 6px;
|
|
1745
|
-
border-radius: 50%;
|
|
1746
|
-
flex-shrink: 0;
|
|
1747
|
-
}
|
|
1748
|
-
|
|
1749
|
-
.dot-green {
|
|
1750
|
-
background: #10b981;
|
|
1751
|
-
}
|
|
1752
|
-
|
|
1753
|
-
.dot-blue {
|
|
1754
|
-
background: #3b82f6;
|
|
1755
|
-
}
|
|
1756
|
-
|
|
1757
|
-
.dot-purple {
|
|
1758
|
-
background: #8b5cf6;
|
|
1759
|
-
}
|
|
1760
|
-
|
|
1761
|
-
.dot-yellow {
|
|
1762
|
-
background: #f59e0b;
|
|
1763
|
-
}
|
|
1764
|
-
`;Le.div.attrs({className:"retrive-chat-semantic-content"})`
|
|
1765
|
-
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.text)||"#374151"}};
|
|
1766
|
-
line-height: 1.6;
|
|
1767
|
-
font-size: 14px;
|
|
1768
|
-
`;Le.div.attrs({className:"retrive-chat-stats-container"})`
|
|
1769
|
-
display: flex;
|
|
1770
|
-
gap: 16px;
|
|
1771
|
-
padding: 12px 20px;
|
|
1772
|
-
border-top: 1px solid ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.border)||"#e5e7eb"}};
|
|
1773
|
-
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#f9fafb"}};
|
|
1774
|
-
font-size: 12px;
|
|
1775
|
-
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.disabled)||"#9ca3af"}};
|
|
1776
|
-
`;Le.div.attrs({className:"retrive-chat-empty-state"})`
|
|
1777
|
-
padding: 24px 16px;
|
|
1778
|
-
text-align: center;
|
|
1779
|
-
font-size: 13px;
|
|
1780
|
-
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.disabled)||"#9ca3af"}};
|
|
1781
|
-
`;Le.div.attrs({className:"retrive-chat-tools-container"})`
|
|
1782
|
-
display: flex;
|
|
1783
|
-
gap: 8px;
|
|
1784
|
-
padding: 12px 20px;
|
|
1785
|
-
border-top: 1px solid ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.border)||"#e5e7eb"}};
|
|
1786
|
-
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#ffffff"}};
|
|
1787
|
-
`;Le.button.attrs({className:"retrive-chat-tool-button"})`
|
|
1788
|
-
display: flex;
|
|
1789
|
-
align-items: center;
|
|
1790
|
-
justify-content: center;
|
|
1791
|
-
width: 32px;
|
|
1792
|
-
height: 32px;
|
|
1793
|
-
border: 1px solid ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.border)||"#e5e7eb"}};
|
|
1794
|
-
border-radius: 6px;
|
|
1795
|
-
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#ffffff"}};
|
|
1796
|
-
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.text)||"#374151"}};
|
|
1797
|
-
cursor: pointer;
|
|
1798
|
-
transition: all 0.2s ease;
|
|
1799
|
-
|
|
1800
|
-
&:hover {
|
|
1801
|
-
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#f3f4f6"}};
|
|
1802
|
-
border-color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.primary)||"#3b82f6"}};
|
|
1803
|
-
}
|
|
1804
|
-
|
|
1805
|
-
svg {
|
|
1806
|
-
width: 16px;
|
|
1807
|
-
height: 16px;
|
|
1808
|
-
}
|
|
1809
|
-
`;Le.div.attrs({className:"retrive-chat-prompt-content"})`
|
|
1810
|
-
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
|
|
1811
|
-
font-size: 13px;
|
|
1812
|
-
line-height: 1.6;
|
|
1813
|
-
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.text)||"#374151"}};
|
|
1814
|
-
white-space: pre-wrap;
|
|
1815
|
-
word-break: break-word;
|
|
1816
|
-
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#f9fafb"}};
|
|
1817
|
-
padding: 16px;
|
|
1818
|
-
border-radius: 8px;
|
|
1819
|
-
border: 1px solid ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.border)||"#e5e7eb"}};
|
|
1820
|
-
`;Le.div.attrs({className:"retrive-chat-config-container"})`
|
|
1821
|
-
display: grid;
|
|
1822
|
-
grid-template-columns: 1fr 1fr;
|
|
1823
|
-
gap: 24px;
|
|
1824
|
-
`;Le.div.attrs({className:"retrive-chat-config-section"})`
|
|
1825
|
-
display: flex;
|
|
1826
|
-
flex-direction: column;
|
|
1827
|
-
`;Le.div.attrs({className:"retrive-chat-config-section-title"})`
|
|
1828
|
-
display: flex;
|
|
1829
|
-
align-items: center;
|
|
1830
|
-
gap: 8px;
|
|
1831
|
-
font-size: 14px;
|
|
1832
|
-
font-weight: 500;
|
|
1833
|
-
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.text)||"#374151"}};
|
|
1834
|
-
margin-bottom: 16px;
|
|
1835
|
-
|
|
1836
|
-
.dot {
|
|
1837
|
-
width: 8px;
|
|
1838
|
-
height: 8px;
|
|
1839
|
-
border-radius: 50%;
|
|
1840
|
-
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.primary)||"#3b82f6"}};
|
|
1841
|
-
}
|
|
1842
|
-
`;Le.div.attrs({className:"retrive-chat-config-item-list"})`
|
|
1843
|
-
display: flex;
|
|
1844
|
-
flex-direction: column;
|
|
1845
|
-
gap: 12px;
|
|
1846
|
-
`;Le.div.attrs({className:"retrive-chat-config-item"})`
|
|
1847
|
-
display: flex;
|
|
1848
|
-
justify-content: space-between;
|
|
1849
|
-
align-items: center;
|
|
1850
|
-
padding: 8px 0;
|
|
1851
|
-
border-bottom: 1px solid ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.border)||"#e5e7eb"}};
|
|
1852
|
-
|
|
1853
|
-
&:last-child {
|
|
1854
|
-
border-bottom: none;
|
|
1855
|
-
}
|
|
1856
|
-
`;Le.span.attrs({className:"retrive-chat-config-item-label"})`
|
|
1857
|
-
font-size: 13px;
|
|
1858
|
-
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.text)||"#374151"}};
|
|
1859
|
-
`;Le.span.attrs({className:"retrive-chat-config-item-value"})`
|
|
1860
|
-
font-size: 13px;
|
|
1861
|
-
font-weight: 500;
|
|
1862
|
-
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.primary)||"#3b82f6"}};
|
|
1863
|
-
`;Le.span.attrs({className:"retrive-chat-switch-status"})`
|
|
1864
|
-
font-size: 13px;
|
|
1865
|
-
font-weight: 500;
|
|
1866
|
-
color: ${({enabled:e,theme:t})=>{var r,n;return e?((r=t.colors)==null?void 0:r.success)||"#10b981":((n=t.colors)==null?void 0:n.disabled)||"#9ca3af"}};
|
|
1867
|
-
`;Le.div.attrs({className:"retrive-chat-retrieve-container"})`
|
|
1868
|
-
display: flex;
|
|
1869
|
-
flex-direction: column;
|
|
1870
|
-
gap: 4px;
|
|
1871
|
-
`;Le.div.attrs({className:"retrive-chat-retrieve-chunk"})`
|
|
1872
|
-
display: flex;
|
|
1873
|
-
flex-direction: column;
|
|
1874
|
-
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#ffffff"}};
|
|
1875
|
-
border-radius: 12px;
|
|
1876
|
-
border: 1px solid ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.border)||"#e5e7eb"}};
|
|
1877
|
-
overflow: hidden;
|
|
1878
|
-
transition: all 0.3s ease;
|
|
1879
|
-
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
|
|
1880
|
-
|
|
1881
|
-
&:hover {
|
|
1882
|
-
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
|
|
1883
|
-
border-color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.primary)||"#3b82f6"}};
|
|
1884
|
-
}
|
|
1885
|
-
`;Le.div.attrs({className:"retrive-chat-retrieve-chunk-header"})`
|
|
1886
|
-
display: flex;
|
|
1887
|
-
align-items: center;
|
|
1888
|
-
justify-content: space-between;
|
|
1889
|
-
padding: 5px 10px;
|
|
1890
|
-
cursor: pointer;
|
|
1891
|
-
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#fafafa"}};
|
|
1892
|
-
border-bottom: 1px solid ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.border)||"#e5e7eb"}};
|
|
1893
|
-
transition: background-color 0.2s ease;
|
|
1894
|
-
|
|
1895
|
-
&:hover {
|
|
1896
|
-
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#f5f5f5"}};
|
|
1897
|
-
}
|
|
1898
|
-
`;Le.div.attrs({className:"retrive-chat-retrieve-chunk-title"})`
|
|
1899
|
-
display: flex;
|
|
1900
|
-
align-items: center;
|
|
1901
|
-
gap: 10px;
|
|
1902
|
-
font-size: 15px;
|
|
1903
|
-
font-weight: 600;
|
|
1904
|
-
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.text)||"#111827"}};
|
|
1905
|
-
|
|
1906
|
-
.dot {
|
|
1907
|
-
width: 10px;
|
|
1908
|
-
height: 10px;
|
|
1909
|
-
border-radius: 50%;
|
|
1910
|
-
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.primary)||"#3b82f6"}};
|
|
1911
|
-
flex-shrink: 0;
|
|
1912
|
-
}
|
|
1913
|
-
`;Le.div.attrs({className:"retrive-chat-retrieve-chunk-expand-icon"})`
|
|
1914
|
-
display: flex;
|
|
1915
|
-
align-items: center;
|
|
1916
|
-
gap: 4px;
|
|
1917
|
-
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.disabled)||"#6b7280"}};
|
|
1918
|
-
font-size: 13px;
|
|
1919
|
-
cursor: pointer;
|
|
1920
|
-
transition: all 0.3s ease;
|
|
1921
|
-
|
|
1922
|
-
svg {
|
|
1923
|
-
transition: transform 0.3s ease;
|
|
1924
|
-
transform: ${({$isExpanded:e})=>e?"rotate(180deg)":"rotate(0deg)"};
|
|
1925
|
-
}
|
|
1926
|
-
|
|
1927
|
-
&:hover {
|
|
1928
|
-
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.primary)||"#3b82f6"}};
|
|
1929
|
-
}
|
|
1930
|
-
`;Le.div.attrs({className:"retrive-chat-retrieve-chunk-content"})`
|
|
1931
|
-
display: ${({$isExpanded:e})=>e?"flex":"none"};
|
|
1932
|
-
flex-direction: column;
|
|
1933
|
-
gap: 20px;
|
|
1934
|
-
padding: 6px;
|
|
1935
|
-
animation: ${({$isExpanded:e})=>e?"fadeIn":"none"} 0.3s ease;
|
|
1936
|
-
`;Le.div.attrs({className:"retrive-chat-chunk-info-container"})`
|
|
1937
|
-
padding: 12px 20px;
|
|
1938
|
-
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#ffffff"}};
|
|
1939
|
-
display: flex;
|
|
1940
|
-
align-items: center;
|
|
1941
|
-
flex-wrap: nowrap;
|
|
1942
|
-
gap: 4px;
|
|
1943
|
-
font-size: 13px;
|
|
1944
|
-
overflow-x: auto;
|
|
1945
|
-
`;Le.div.attrs({className:"retrive-chat-chunk-info-item"})`
|
|
1946
|
-
display: flex;
|
|
1947
|
-
align-items: center;
|
|
1948
|
-
gap: 6px;
|
|
1949
|
-
white-space: nowrap;
|
|
1950
|
-
flex-shrink: 0;
|
|
1951
|
-
`;Le.span.attrs({className:"retrive-chat-chunk-info-label"})`
|
|
1952
|
-
font-size: 13px;
|
|
1953
|
-
font-weight: 400;
|
|
1954
|
-
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.disabled)||"#6b7280"}};
|
|
1955
|
-
`;Le.span.attrs({className:"retrive-chat-chunk-info-value"})`
|
|
1956
|
-
font-size: 13px;
|
|
1957
|
-
font-weight: 600;
|
|
1958
|
-
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.text)||"#111827"}};
|
|
1959
|
-
padding: 2px 8px;
|
|
1960
|
-
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#f3f4f6"}};
|
|
1961
|
-
border-radius: 4px;
|
|
1962
|
-
`;Le.div.attrs({className:"retrive-chat-chunk-content-section"})`
|
|
1963
|
-
display: flex;
|
|
1964
|
-
flex-direction: column;
|
|
1965
|
-
gap: 4px;
|
|
1966
|
-
`;Le.div.attrs({className:"retrive-chat-chunk-section-title"})`
|
|
1967
|
-
font-size: 14px;
|
|
1968
|
-
font-weight: 600;
|
|
1969
|
-
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.text)||"#111827"}};
|
|
1970
|
-
margin-bottom: 4px;
|
|
1971
|
-
`;Le.div.attrs({className:"retrive-chat-chunk-content-wrapper"})`
|
|
1972
|
-
padding: 12px;
|
|
1973
|
-
background: #f5f5f5;
|
|
1974
|
-
border-radius: 8px;
|
|
1975
|
-
|
|
1976
|
-
`;Le.div.attrs({className:"retrive-chat-chunk-file-source-section"})`
|
|
1977
|
-
display: flex;
|
|
1978
|
-
flex-direction: column;
|
|
1979
|
-
gap: 5px;
|
|
1980
|
-
padding: 15px;
|
|
1981
|
-
`;Le.div.attrs({className:"retrive-chat-file-source"})`
|
|
1982
|
-
display: flex;
|
|
1983
|
-
align-items: flex-end;
|
|
1984
|
-
gap: 8px;
|
|
1985
|
-
`;const KC=Le.div`
|
|
1986
|
-
position: relative;
|
|
1987
|
-
width: 100%;
|
|
1988
|
-
height: 100%;
|
|
1989
|
-
overflow: ${e=>e.$isVirtualized?"hidden":"auto"};
|
|
1990
|
-
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"#ffffff"}};
|
|
1991
|
-
border-radius: ${e=>{var t;return((t=e.theme)==null?void 0:t.borderRadius)||"8px"}};
|
|
1992
|
-
|
|
1993
|
-
/* 自定义滚动条 */
|
|
1994
|
-
&::-webkit-scrollbar {
|
|
1995
|
-
width: 8px;
|
|
1996
|
-
}
|
|
1997
|
-
|
|
1998
|
-
&::-webkit-scrollbar-track {
|
|
1999
|
-
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarTrack)||"#f1f1f1"}};
|
|
2000
|
-
border-radius: 4px;
|
|
2001
|
-
}
|
|
2002
|
-
|
|
2003
|
-
&::-webkit-scrollbar-thumb {
|
|
2004
|
-
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarThumb)||"#c1c1c1"}};
|
|
2005
|
-
border-radius: 4px;
|
|
2006
|
-
|
|
2007
|
-
&:hover {
|
|
2008
|
-
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarThumbHover)||"#a8a8a8"}};
|
|
2009
|
-
}
|
|
2010
|
-
}
|
|
2011
|
-
`,WC=Le.div`
|
|
2012
|
-
position: relative;
|
|
2013
|
-
width: 100%;
|
|
2014
|
-
height: 100%;
|
|
2015
|
-
overflow: auto;
|
|
2016
|
-
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"#ffffff"}};
|
|
2017
|
-
|
|
2018
|
-
/* 自定义滚动条 */
|
|
2019
|
-
&::-webkit-scrollbar {
|
|
2020
|
-
width: 8px;
|
|
2021
|
-
}
|
|
2022
|
-
|
|
2023
|
-
&::-webkit-scrollbar-track {
|
|
2024
|
-
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarTrack)||"#f1f1f1"}};
|
|
2025
|
-
border-radius: 4px;
|
|
2026
|
-
}
|
|
2027
|
-
|
|
2028
|
-
&::-webkit-scrollbar-thumb {
|
|
2029
|
-
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarThumb)||"#c1c1c1"}};
|
|
2030
|
-
border-radius: 4px;
|
|
2031
|
-
|
|
2032
|
-
&:hover {
|
|
2033
|
-
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarThumbHover)||"#a8a8a8"}};
|
|
2034
|
-
}
|
|
2035
|
-
}
|
|
2036
|
-
`,Qh=Le.div`
|
|
2037
|
-
padding: ${e=>{var t;return((t=e.theme)==null?void 0:t.padding)||"1rem"}};
|
|
2038
|
-
min-height: ${e=>e.height||"auto"};
|
|
2039
|
-
|
|
2040
|
-
/* 富文本内容样式增强 */
|
|
2041
|
-
& h1, & h2, & h3, & h4, & h5, & h6 {
|
|
2042
|
-
scroll-margin-top: 2rem;
|
|
2043
|
-
}
|
|
2044
|
-
|
|
2045
|
-
& img {
|
|
2046
|
-
max-width: 100%;
|
|
2047
|
-
height: auto;
|
|
2048
|
-
border-radius: 0.5rem;
|
|
2049
|
-
margin: 1rem 0;
|
|
2050
|
-
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
2051
|
-
transition: transform 0.2s ease-in-out;
|
|
2052
|
-
|
|
2053
|
-
&:hover {
|
|
2054
|
-
transform: scale(1.02);
|
|
2055
|
-
}
|
|
2056
|
-
}
|
|
2057
|
-
|
|
2058
|
-
/* 表格样式 - 主题感知 */
|
|
2059
|
-
& .table-container {
|
|
2060
|
-
overflow: auto;
|
|
2061
|
-
border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#e5e7eb"}};
|
|
2062
|
-
border-radius: 6px;
|
|
2063
|
-
margin: 1rem 0;
|
|
2064
|
-
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"transparent"}};
|
|
2065
|
-
}
|
|
2066
|
-
|
|
2067
|
-
& .table-container table {
|
|
2068
|
-
width: 100%;
|
|
2069
|
-
border-collapse: collapse;
|
|
2070
|
-
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"transparent"}};
|
|
2071
|
-
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
2072
|
-
}
|
|
2073
|
-
|
|
2074
|
-
& .table-container th,
|
|
2075
|
-
& .table-container td {
|
|
2076
|
-
border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#e5e7eb"}};
|
|
2077
|
-
padding: 8px 12px;
|
|
2078
|
-
text-align: left;
|
|
2079
|
-
}
|
|
2080
|
-
|
|
2081
|
-
& .table-container th {
|
|
2082
|
-
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
2083
|
-
font-weight: 600;
|
|
2084
|
-
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
2085
|
-
}
|
|
2086
|
-
|
|
2087
|
-
& .table-container td {
|
|
2088
|
-
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
2089
|
-
}
|
|
2090
|
-
|
|
2091
|
-
& .table-container tr:nth-child(even) {
|
|
2092
|
-
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
2093
|
-
}
|
|
2094
|
-
|
|
2095
|
-
& pre {
|
|
2096
|
-
position: relative;
|
|
2097
|
-
|
|
2098
|
-
&::before {
|
|
2099
|
-
content: '';
|
|
2100
|
-
position: absolute;
|
|
2101
|
-
top: 0;
|
|
2102
|
-
left: 0;
|
|
2103
|
-
right: 0;
|
|
2104
|
-
height: 2px;
|
|
2105
|
-
background: linear-gradient(90deg, #007bff, #28a745, #ffc107, #dc3545);
|
|
2106
|
-
border-radius: 2px 2px 0 0;
|
|
2107
|
-
}
|
|
2108
|
-
}
|
|
2109
|
-
|
|
2110
|
-
& blockquote {
|
|
2111
|
-
position: relative;
|
|
2112
|
-
|
|
2113
|
-
&::before {
|
|
2114
|
-
content: '"';
|
|
2115
|
-
position: absolute;
|
|
2116
|
-
top: -0.5rem;
|
|
2117
|
-
left: -1rem;
|
|
2118
|
-
font-size: 3rem;
|
|
2119
|
-
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.primaryColor)||"#007bff"}};
|
|
2120
|
-
opacity: 0.3;
|
|
2121
|
-
}
|
|
2122
|
-
}
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
`,VC=Le.div`
|
|
2126
|
-
display: flex;
|
|
2127
|
-
align-items: center;
|
|
2128
|
-
justify-content: center;
|
|
2129
|
-
padding: 2rem;
|
|
2130
|
-
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#6c757d"}};
|
|
2131
|
-
font-size: 0.875rem;
|
|
2132
|
-
|
|
2133
|
-
&::before {
|
|
2134
|
-
content: '';
|
|
2135
|
-
width: 20px;
|
|
2136
|
-
height: 20px;
|
|
2137
|
-
border: 2px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#dee2e6"}};
|
|
2138
|
-
border-top: 2px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.primaryColor)||"#007bff"}};
|
|
2139
|
-
border-radius: 50%;
|
|
2140
|
-
animation: spin 1s linear infinite;
|
|
2141
|
-
margin-right: 0.5rem;
|
|
2142
|
-
}
|
|
2143
|
-
|
|
2144
|
-
@keyframes spin {
|
|
2145
|
-
0% { transform: rotate(0deg); }
|
|
2146
|
-
100% { transform: rotate(360deg); }
|
|
2147
|
-
}
|
|
2148
|
-
`,UC=Le.div`
|
|
2149
|
-
display: flex;
|
|
2150
|
-
flex-direction: column;
|
|
2151
|
-
align-items: center;
|
|
2152
|
-
justify-content: center;
|
|
2153
|
-
padding: 3rem;
|
|
2154
|
-
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#6c757d"}};
|
|
2155
|
-
text-align: center;
|
|
2156
|
-
|
|
2157
|
-
&::before {
|
|
2158
|
-
content: '📄';
|
|
2159
|
-
font-size: 3rem;
|
|
2160
|
-
margin-bottom: 1rem;
|
|
2161
|
-
}
|
|
2162
|
-
`,XC=({dataSource:e,enableVirtualScroll:t=!1,itemHeight:r=200,preloadCount:n=5,enableSegmentedLoading:o=!1,onLoadMore:i,isLoadingMore:c=!1,size:u="sm",basePath:f,theme:d={},onChange:p,onScroll:v,onScrollToTop:g,onScrollToBottom:x,onSegmentClick:w,className:C,style:m,height:A="100%"})=>{const S=fs(),D=ht(()=>{var oe,he,we,Ce,ke,Se,Te,Ie,We;return{primaryColor:(d==null?void 0:d.primaryColor)||((oe=S==null?void 0:S.colors)==null?void 0:oe.primary)||"#007bff",secondaryColor:(d==null?void 0:d.secondaryColor)||((he=S==null?void 0:S.colors)==null?void 0:he.secondary)||"#6c757d",backgroundColor:(d==null?void 0:d.backgroundColor)||((we=S==null?void 0:S.colors)==null?void 0:we.background)||"#ffffff",textColor:(d==null?void 0:d.textColor)||((Ce=S==null?void 0:S.colors)==null?void 0:Ce.text)||"#24292f",borderColor:(d==null?void 0:d.borderColor)||((ke=S==null?void 0:S.colors)==null?void 0:ke.border)||"#dee2e6",disabledBackground:(d==null?void 0:d.disabledBackground)||((Se=S==null?void 0:S.colors)==null?void 0:Se.disabledBackground)||"#f8f9fa",hoverBackground:(d==null?void 0:d.hoverBackground)||((Te=S==null?void 0:S.colors)==null?void 0:Te.hoverBackground)||"#e9ecef",borderRadius:(d==null?void 0:d.borderRadius)||((Ie=S==null?void 0:S.space)==null?void 0:Ie.radius)||"8px",padding:(d==null?void 0:d.padding)||((We=S==null?void 0:S.space)==null?void 0:We.padding)||"1rem",scrollbarTrack:(d==null?void 0:d.scrollbarTrack)||"#f1f1f1",scrollbarThumb:(d==null?void 0:d.scrollbarThumb)||"#c1c1c1",scrollbarThumbHover:(d==null?void 0:d.scrollbarThumbHover)||"#a8a8a8",...d}},[S,d]),$=Ht(0);$.current+=1,console.log("[Markdownit] render count:",$.current);const[F,B]=St([]),[R,I]=St({start:0,end:10}),[T,W]=St(0),[H,Z]=St(0),[Y,j]=St(!1),[K,U]=St(!1),[G,J]=St(!1),z=Ht(null),ie=Ht(null),ge=Ht(null),xe=ht(()=>Array.isArray(e)?e:[{id:"single",content:e.content,type:e.type,timestamp:Date.now()}],[e]);Jt(()=>{console.log("[Markdownit] setSegments by processedData, len:",Array.isArray(xe)?xe.length:"n/a"),B(xe)},[xe]);const Ae=ht(()=>t?`${F.length*r}px`:"auto",[F.length,r,t]),Fe=ht(()=>{if(!t)return F;const oe=Math.max(0,R.start-n),he=Math.min(F.length,R.end+n);return F.slice(oe,he).map((we,Ce)=>({...we,virtualIndex:oe+Ce}))},[F,R,t,n]),be=Bt(oe=>{const{scrollTop:he,scrollHeight:we,clientHeight:Ce}=oe.currentTarget;console.log("[Markdownit] onScroll fired",{newScrollTop:he,scrollHeight:we,clientHeight:Ce});const ke=!t&&!v&&!g&&!x&&!o;if(console.log("[Markdownit] passiveOnly:",ke),ke||W(Se=>Se!==he?(console.log("[Markdownit] setScrollTop:",he),he):Se),t&&!ke){const Se=Math.floor(he/r),Te=Math.min(F.length,Se+Math.ceil(H/r)+1);I(Ie=>Ie.start!==Se||Ie.end!==Te?(console.log("[Markdownit] setVisibleRange:",{start:Se,end:Te}),{start:Se,end:Te}):Ie)}if(!ke){const Se=he<=10;Se!==K&&(console.log("[Markdownit] isAtTop ->",Se),U(Se),Se&&g&&(console.log("[Markdownit] onScrollToTop callback"),g()))}if(!ke){const Se=he+Ce>=we-10;Se!==G&&(console.log("[Markdownit] isAtBottom ->",Se),J(Se),Se&&x&&(console.log("[Markdownit] onScrollToBottom callback"),x()))}v&&(console.log("[Markdownit] onScroll callback ->",{newScrollTop:he,scrollHeight:we}),v(he,we)),o&&i&&!Y&&!c&&we-he-H<100&&X()},[t,r,F.length,H,o,i,Y,c,K,G,g,x,v]),X=Bt(async()=>{if(!(!i||Y||c)){j(!0);try{const oe=F[F.length-1],he=await i(oe.id);B(we=>[...we,...he])}catch(oe){console.error("Failed to load more segments:",oe)}finally{j(!1)}}},[i,F,Y,c]);Jt(()=>{const oe=()=>{z.current&&Z(z.current.clientHeight)};return oe(),window.addEventListener("resize",oe),()=>window.removeEventListener("resize",oe)},[]);const fe=Bt((oe,he)=>{const we={type:oe.type,content:oe.content},Ce=t?{position:"absolute",top:`${(oe.virtualIndex||he)*r}px`,left:0,right:0,height:`${r}px`}:{};return q.jsx("div",{style:Ce,onClick:()=>w==null?void 0:w(oe.id,oe),className:w?"cursor-pointer hover:bg-gray-50":"",children:q.jsx(Fs,{dataSource:we,isEditing:!1,size:u,basePath:f,theme:D,onChange:p,enablePrism,style:{border:"none",background:"transparent",minHeight:t?`${r}px`:"auto",padding:"0.5rem"}})},oe.id)},[t,r,D,p,w,enablePrism]),ce=()=>(console.log("[Markdownit] renderContent segments.len:",F.length,"enableVirtualScroll:",t),F.length===0?q.jsxs(UC,{theme:D,children:[q.jsx("h3",{children:"\u6682\u65E0\u5185\u5BB9"}),q.jsx("p",{children:"\u8BF7\u6DFB\u52A0\u4E00\u4E9B\u5185\u5BB9\u6765\u5F00\u59CB"})]}):t?q.jsx("div",{ref:ge,style:{height:Ae,position:"relative"},children:Fe.map(fe)}):q.jsx("div",{ref:ge,children:F.map(fe)})),se=()=>!Y&&!c?null:q.jsx(VC,{theme:D,children:c?"\u52A0\u8F7D\u66F4\u591A\u5185\u5BB9...":"\u52A0\u8F7D\u4E2D..."});return q.jsx(KC,{ref:z,theme:D,$isVirtualized:t,className:C,style:{height:A,...m},children:t?q.jsx(WC,{ref:ie,theme:D,onScroll:be,children:q.jsx(Qh,{theme:D,height:Ae,children:ce()})}):q.jsxs(Qh,{theme:D,onScroll:be,children:[ce(),se()]})})},s9=e=>{const{onRendered:t}=e;return Jt(()=>{if(!t)return;const r=requestAnimationFrame(()=>{const n=document.querySelector('[data-markdownit-root="1"]');n&&(console.log("[Markdownit _onRendered] fired"),t(n))});return()=>cancelAnimationFrame(r)},[e.dataSource,e.enableVirtualScroll,t]),q.jsx("div",{"data-markdownit-root":"1",children:q.jsx(XC,{...e})})};Le.div`
|
|
2163
|
-
background: #f6f8fa;
|
|
2164
|
-
border: 1px solid #d0d7de;
|
|
2165
|
-
border-radius: 6px;
|
|
2166
|
-
padding: 16px;
|
|
2167
|
-
margin-bottom: 20px;
|
|
2168
|
-
`;Le.p`
|
|
2169
|
-
margin: 0 0 16px 0;
|
|
2170
|
-
color: #656d76;
|
|
2171
|
-
font-size: 14px;
|
|
2172
|
-
line-height: 1.5;
|
|
2173
|
-
`;const e1=e=>{if(!e||e.trim()==="")return[{type:"paragraph",children:[{text:""}]}];const t=/<template\b([^>]*)>([\s\S]*?)<\/template>/g,r=[];let n=0,o,i=0;for(console.log("\u5F00\u59CB\u89E3\u6790\u6A21\u677F\u5B57\u7B26\u4E32:",e);(o=t.exec(e))!==null;){const c=o[0],u=o[1]||"",f=(o[2]||"").trim(),d=o.index,p=d+c.length;if(d>n){const A=e.slice(n,d);A.trim()!==""&&(r.push({text:A}),console.log("\u6DFB\u52A0\u6587\u672C\u5143\u7D20:",{text:A}))}const v=A=>{const S=new RegExp(`${A}\\s*=\\s*(["'])((?:\\\\.|[^\\
|
|
2174
|
-
])*?)\\1`,"i"),D=u.match(S);return D?D[2]:void 0},g=/\S/.test(u),x=v("key"),w=v("placeholder"),C=x||`template-${Date.now()}-${i++}`,m={type:"template",key:C,placeholder:g?w||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9":f||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9",value:g?f:"",style:"blue",fieldId:C,children:[{text:""}],inline:!0};r.push(m),console.log("\u6DFB\u52A0template\u5143\u7D20:",m),n=p}if(n<e.length){const c=e.slice(n);c.trim()!==""&&(r.push({text:c}),console.log("\u6DFB\u52A0\u6700\u540E\u6587\u672C\u5143\u7D20:",{text:c}))}return r.length===0&&(e.trim()===""?r.push({text:""}):r.push({text:e}),console.log("\u6CA1\u6709\u627E\u5230template\u6807\u7B7E\uFF0C\u8FD4\u56DE\u539F\u59CB\u6587\u672C")),r.length>0&&r[0].type!=="paragraph"?[{type:"paragraph",children:r}]:(console.log("\u89E3\u6790\u5B8C\u6210\uFF0C\u7ED3\u679C:",r),r)},t0=e=>{if(!e||e.length===0)return"";const t=e[0];if(!t.children)return t.text||"";let r="",n="";return console.log("\u8F6C\u6362Slate\u6570\u636E:",JSON.stringify(e,null,2)),t.children.forEach(o=>{if(console.log("\u5904\u7406\u5B50\u5143\u7D20:",o),o.type==="template"){const i=o.key||o.fieldId||"",c=o.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9",u=o.value||"",f=` key="${String(i)}" placeholder="${String(c)}"`;r+=`<template${f}>${u}</template>`,n=u||c}else if(o.text!==void 0){const i=o.text||"";i.trim()!==""?i!==n?(console.log(`\u627E\u5230\u6587\u672C\u5143\u7D20: ${i}`),r+=i,n=i):console.log("\u8DF3\u8FC7\u91CD\u590D\u6587\u672C\u5143\u7D20"):console.log("\u8DF3\u8FC7\u7A7A\u6587\u672C\u5143\u7D20")}else{console.log("\u672A\u77E5\u5143\u7D20\u7C7B\u578B:",o);const i=o.text||"";i.trim()!==""&&i!==n&&(r+=i,n=i)}}),console.log("\u8F6C\u6362\u7ED3\u679C:",r),r},GC=e=>{if(!e||e.length===0)return"";const t=e[0];if(!t.children)return t.text||"";let r="";return t.children.forEach(n=>{n.text!==void 0?r+=n.text:n.type==="template"&&(r+=n.value||n.placeholder||"")}),r},YC=e=>{if(!e||e.length===0)return"";const t=e[0];if(!t.children)return t.text||"";let r="";return t.children.forEach(n=>{n.text!==void 0?r+=n.text:n.type==="template"&&(r+=`\`\`\`template\`\`\`
|
|
2175
|
-
${n.value||n.placeholder}\`\`\`
|
|
2176
|
-
\`\`\`
|
|
2177
|
-
`)}),r},ZC=e=>{if(!e||e.length===0)return"";const t=e[0];if(!t.children)return t.text||"";let r="";return t.children.forEach(n=>{if(n.text!==void 0)r+=n.text;else if(n.type==="template"){const o=n.key||n.fieldId||"",i=n.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9",c=n.value||"",u=` key="${String(o)}" placeholder="${String(i)}"`;r+=`<template${u}>${c}</template>`}}),r},l9=({data:e,onChange:t,size:r="sm",styles:n={},onGetData:o,enablePrism:i=!1})=>{var w,C,m,A,S,D,$,F,B,R,I,T,W,H,Z,Y,j,K,U,G,J,z,ie,ge,xe,Ae,Fe,be,X,fe,ce,se,oe,he,we,Ce,ke,Se,Te,Ie,We,ut,ot,Oe,je,Ve,ft,tt,nt,Tt,bt,At;const c=fs(),u={theme:{colors:{primary:((w=c==null?void 0:c.colors)==null?void 0:w.primary)||"#055AFF",secondary:((C=c==null?void 0:c.colors)==null?void 0:C.secondary)||"#84ADFF",background:((m=c==null?void 0:c.colors)==null?void 0:m.background)||"#E5EEFF",text:((A=c==null?void 0:c.colors)==null?void 0:A.text)||"#055AFF",border:((S=c==null?void 0:c.colors)==null?void 0:S.border)||"#84ADFF",success:((D=c==null?void 0:c.colors)==null?void 0:D.success)||"#008000",warning:(($=c==null?void 0:c.colors)==null?void 0:$.warning)||"#FFA500",error:((F=c==null?void 0:c.colors)==null?void 0:F.error)||"#FF0000",info:((B=c==null?void 0:c.colors)==null?void 0:B.info)||"#0000FF",disabled:((R=c==null?void 0:c.colors)==null?void 0:R.disabled)||"#808080",disabledBackground:((I=c==null?void 0:c.colors)==null?void 0:I.disabledBackground)||"#F5F5F5",disabledText:((T=c==null?void 0:c.colors)==null?void 0:T.disabledText)||"#808080",shadow:((W=c==null?void 0:c.colors)==null?void 0:W.shadow)||"0 1px 3px rgba(0, 0, 0, 0.12)",appBackground:((H=c==null?void 0:c.colors)==null?void 0:H.appBackground)||"transparent",listBackground:((Z=c==null?void 0:c.colors)==null?void 0:Z.listBackground)||"#f9f9f9",dashboardBackground:((Y=c==null?void 0:c.colors)==null?void 0:Y.dashboardBackground)||"#ffffff",textSecondary:((j=c==null?void 0:c.colors)==null?void 0:j.textSecondary)||"#6b7280"},space:{sidebar:((K=c==null?void 0:c.space)==null?void 0:K.sidebar)||"260px",size:((U=c==null?void 0:c.space)==null?void 0:U.size)||"12px",radius:((G=c==null?void 0:c.space)==null?void 0:G.radius)||"6px",padding:((J=c==null?void 0:c.space)==null?void 0:J.padding)||"16px",margin:((z=c==null?void 0:c.space)==null?void 0:z.margin)||"20px",shadow:((ie=c==null?void 0:c.space)==null?void 0:ie.shadow)||"0 2px 8px rgba(0,0,0,0.1)",lineHeight:((ge=c==null?void 0:c.space)==null?void 0:ge.lineHeight)||"1.6"},icons:(c==null?void 0:c.icons)||{},fonts:{body:{size:((Ae=(xe=c==null?void 0:c.fonts)==null?void 0:xe.body)==null?void 0:Ae.size)||"14px",weight:((be=(Fe=c==null?void 0:c.fonts)==null?void 0:Fe.body)==null?void 0:be.weight)||"normal",family:((fe=(X=c==null?void 0:c.fonts)==null?void 0:X.body)==null?void 0:fe.family)||"PingFang SC, Microsoft YaHei, Arial, sans-serif"},heading:{size:((se=(ce=c==null?void 0:c.fonts)==null?void 0:ce.heading)==null?void 0:se.size)||"16px",weight:((he=(oe=c==null?void 0:c.fonts)==null?void 0:oe.heading)==null?void 0:he.weight)||"600",family:((Ce=(we=c==null?void 0:c.fonts)==null?void 0:we.heading)==null?void 0:Ce.family)||"PingFang SC, Microsoft YaHei, Arial, sans-serif"}},others:{baseFontWeight:((ke=c==null?void 0:c.others)==null?void 0:ke.baseFontWeight)||"normal"}},mode:(c==null?void 0:c.mode)||"light"},f={backgroundColor:((Se=c==null?void 0:c.colors)==null?void 0:Se.background)||"#E5EEFF",borderColor:((Te=c==null?void 0:c.colors)==null?void 0:Te.border)||"#84ADFF",borderRadius:((Ie=c==null?void 0:c.space)==null?void 0:Ie.radius)||"6px",padding:((We=c==null?void 0:c.space)==null?void 0:We.padding)||"8px 12px",margin:"2px",fontSize:((ot=(ut=c==null?void 0:c.fonts)==null?void 0:ut.body)==null?void 0:ot.size)||"14px",fontWeight:((je=(Oe=c==null?void 0:c.fonts)==null?void 0:Oe.body)==null?void 0:je.weight)||"500",minWidth:"30px",textColor:((Ve=c==null?void 0:c.colors)==null?void 0:Ve.text)||"#84ADFF"},d={...u,...n,theme:{...u.theme,...n==null?void 0:n.theme,colors:{...(ft=u.theme)==null?void 0:ft.colors,...(tt=n==null?void 0:n.theme)==null?void 0:tt.colors},space:{...(nt=u.theme)==null?void 0:nt.space,...(Tt=n==null?void 0:n.theme)==null?void 0:Tt.space},fonts:{...(bt=u.theme)==null?void 0:bt.fonts,...(At=n==null?void 0:n.theme)==null?void 0:At.fonts}},templateField:{...f,...n==null?void 0:n.templateField}},[p,v]=St(()=>e1(e));Jt(()=>{console.log("\u6570\u636E\u53D8\u5316\uFF0C\u540C\u6B65\u5230\u5185\u90E8\u72B6\u6001:",e);const yt=e1(e);console.log("\u65B0\u7684Slate\u6570\u636E:",yt),v(yt)},[e]),Jt(()=>{console.log("slateData \u72B6\u6001\u53D8\u5316:",p)},[p]);const g=Bt((yt,Me)=>{if(Me===Ya.SLATE&&yt){console.log("\u7F16\u8F91\u5668\u5185\u5BB9\u53D8\u5316:",yt),v(yt);const ue=t0(yt);console.log("\u8F6C\u6362\u540E\u7684\u6A21\u677F\u5B57\u7B26\u4E32:",ue),t==null||t(ue)}},[t]),x=Bt(yt=>{if(!p||p.length===0)return"";switch(yt){case"pure_string":return GC(p);case"string":return t0(p);case"markdown":return YC(p);case"html":return ZC(p);default:return t0(p)}},[p]);return Jt(()=>{o==null||o(x)},[x,o]),q.jsx(Fs,{dataSource:{type:Ya.SLATE,content:p},isEditing:!0,placeholder:"\u5F00\u59CB\u7F16\u8F91\u6A21\u7248...",onChange:g,size:"md",styles:d,enableTemplateInput:!0,enablePrism:i})};export{Zn as F,s9 as G,du as T,i9 as U,l9 as Y,a9 as o,Ya as r,ri as u};
|