@lotte-innovate/ui-component-test 0.1.76 → 0.1.77
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +9 -11
- package/dist/globals.css +2 -2
- package/dist/lib/_virtual/index.mjs +1 -1
- package/dist/lib/_virtual/index2.mjs +1 -1
- package/dist/lib/_virtual/index3.mjs +1 -1
- package/dist/lib/_virtual/react-is.development.mjs +2 -0
- package/dist/lib/_virtual/react-is.development.mjs.map +1 -0
- package/dist/lib/_virtual/react-is.production.min.mjs +2 -0
- package/dist/lib/_virtual/react-is.production.min.mjs.map +1 -0
- package/dist/lib/components/Editor/index.d.ts +10 -5
- package/dist/lib/components/Editor/index.js +50 -6
- package/dist/lib/components/Footer/index.js +8 -1
- package/dist/lib/components/Gnb/GnbInfo.js +1 -0
- package/dist/lib/components/Gnb/GnbLogo.js +3 -4
- package/dist/lib/components/Gnb/GnbMenu.js +1 -0
- package/dist/lib/components/Gnb/GnbRoot.js +4 -2
- package/dist/lib/components/Grid/Pagination.d.ts +2 -0
- package/dist/lib/components/Grid/Pagination.js +17 -0
- package/dist/lib/components/Grid/index.d.ts +1 -2
- package/dist/lib/components/Grid/index.js +40 -47
- package/dist/lib/components/Grid/useGrid.d.ts +1 -1
- package/dist/lib/components/Grid/useGrid.js +19 -11
- package/dist/lib/components/Slider/index.d.ts +2 -1
- package/dist/lib/components/index.d.ts +2 -1
- package/dist/lib/components/index.js +3 -1
- package/dist/lib/dist/lib/components/BarChart/index.mjs.map +1 -1
- package/dist/lib/dist/lib/components/Breadcrumb/BreadcrumbEllipsis.mjs.map +1 -1
- package/dist/lib/dist/lib/components/Breadcrumb/BreadcrumbItem.mjs.map +1 -1
- package/dist/lib/dist/lib/components/Breadcrumb/BreadcrumbLink.mjs.map +1 -1
- package/dist/lib/dist/lib/components/Breadcrumb/BreadcrumbList.mjs.map +1 -1
- package/dist/lib/dist/lib/components/Breadcrumb/BreadcrumbPage.mjs.map +1 -1
- package/dist/lib/dist/lib/components/Breadcrumb/BreadcrumbSeparator.mjs.map +1 -1
- package/dist/lib/dist/lib/components/BubbleChart/index.mjs.map +1 -1
- package/dist/lib/dist/lib/components/ContextMenu/ContextMenuGroup.mjs.map +1 -1
- package/dist/lib/dist/lib/components/ContextMenu/ContextMenuSeparator.mjs.map +1 -1
- package/dist/lib/dist/lib/components/ContextMenu/ContextMenuTrigger.mjs.map +1 -1
- package/dist/lib/dist/lib/components/Dialog/DialogTrigger.mjs.map +1 -1
- package/dist/lib/dist/lib/components/DoughnutChart/index.mjs.map +1 -1
- package/dist/lib/dist/lib/components/DropdownMenu/DropdonMenuRadioGroup.mjs.map +1 -1
- package/dist/lib/dist/lib/components/DropdownMenu/DropdownMenuSeparator.mjs.map +1 -1
- package/dist/lib/dist/lib/components/DropdownMenu/DropdownMenuSub.mjs.map +1 -1
- package/dist/lib/dist/lib/components/Editor/index.mjs +1 -1
- package/dist/lib/dist/lib/components/Footer/index.mjs +1 -1
- package/dist/lib/dist/lib/components/Gnb/GnbInfo.mjs +1 -0
- package/dist/lib/dist/lib/components/Gnb/GnbInfo.mjs.map +1 -1
- package/dist/lib/dist/lib/components/Gnb/GnbLogo.mjs +1 -1
- package/dist/lib/dist/lib/components/Gnb/GnbLogo.mjs.map +1 -1
- package/dist/lib/dist/lib/components/Gnb/GnbMenu.mjs +2 -1
- package/dist/lib/dist/lib/components/Gnb/GnbMenu.mjs.map +1 -1
- package/dist/lib/dist/lib/components/Gnb/GnbRoot.mjs +1 -1
- package/dist/lib/dist/lib/components/Grid/Pagination.mjs +2 -0
- package/dist/lib/dist/lib/components/Grid/Pagination.mjs.map +1 -0
- package/dist/lib/dist/lib/components/Grid/index.mjs +3 -0
- package/dist/lib/dist/lib/components/Grid/index.mjs.map +1 -0
- package/dist/lib/dist/lib/components/Grid/useGrid.mjs +3 -0
- package/dist/lib/dist/lib/components/Grid/useGrid.mjs.map +1 -0
- package/dist/lib/dist/lib/components/HoverCard/HoverCardTrigger.mjs.map +1 -1
- package/dist/lib/dist/lib/components/LineChart/index.mjs.map +1 -1
- package/dist/lib/dist/lib/components/Menubar/MenubarMenu.mjs.map +1 -1
- package/dist/lib/dist/lib/components/Menubar/MenubarSeparator.mjs.map +1 -1
- package/dist/lib/dist/lib/components/Menubar/MenubarSub.mjs.map +1 -1
- package/dist/lib/dist/lib/components/NavigationMenu/NavigationMenuIndicator.mjs.map +1 -1
- package/dist/lib/dist/lib/components/NavigationMenu/NavigationMenuItem.mjs.map +1 -1
- package/dist/lib/dist/lib/components/PieChart/index.mjs.map +1 -1
- package/dist/lib/dist/lib/components/Popover/PopoverTrigger.mjs.map +1 -1
- package/dist/lib/dist/lib/components/RadarChart/index.mjs.map +1 -1
- package/dist/lib/dist/lib/components/SegmentedControl/SegmentedControlItem.mjs.map +1 -1
- package/dist/lib/dist/lib/constants.mjs +1 -1
- package/dist/lib/dist/lib/constants.mjs.map +1 -1
- package/dist/lib/dist/lib/index.mjs +1 -1
- package/dist/lib/node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/ScriptLoader2.mjs +2 -0
- package/dist/lib/node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/ScriptLoader2.mjs.map +1 -0
- package/dist/lib/node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/TinyMCE.mjs +2 -0
- package/dist/lib/node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/TinyMCE.mjs.map +1 -0
- package/dist/lib/node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/Utils.mjs +2 -0
- package/dist/lib/node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/Utils.mjs.map +1 -0
- package/dist/lib/node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/components/Editor.mjs +2 -0
- package/dist/lib/node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/components/Editor.mjs.map +1 -0
- package/dist/lib/node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/components/EditorPropTypes.mjs +2 -0
- package/dist/lib/node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/components/EditorPropTypes.mjs.map +1 -0
- package/dist/lib/node_modules/marked/lib/marked.esm.mjs +2 -0
- package/dist/lib/node_modules/marked/lib/marked.esm.mjs.map +1 -0
- package/dist/lib/node_modules/object-assign/index.mjs +7 -0
- package/dist/lib/node_modules/object-assign/index.mjs.map +1 -0
- package/dist/lib/node_modules/prop-types/checkPropTypes.mjs +2 -0
- package/dist/lib/node_modules/prop-types/checkPropTypes.mjs.map +1 -0
- package/dist/lib/node_modules/prop-types/factoryWithThrowingShims.mjs +2 -0
- package/dist/lib/node_modules/prop-types/factoryWithThrowingShims.mjs.map +1 -0
- package/dist/lib/node_modules/prop-types/factoryWithTypeCheckers.mjs +2 -0
- package/dist/lib/node_modules/prop-types/factoryWithTypeCheckers.mjs.map +1 -0
- package/dist/lib/node_modules/prop-types/index.mjs +2 -0
- package/dist/lib/node_modules/prop-types/index.mjs.map +1 -0
- package/dist/lib/node_modules/prop-types/lib/ReactPropTypesSecret.mjs +2 -0
- package/dist/lib/node_modules/prop-types/lib/ReactPropTypesSecret.mjs.map +1 -0
- package/dist/lib/node_modules/prop-types/lib/has.mjs +2 -0
- package/dist/lib/node_modules/prop-types/lib/has.mjs.map +1 -0
- package/dist/lib/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.mjs +10 -0
- package/dist/lib/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.mjs.map +1 -0
- package/dist/lib/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.mjs +10 -0
- package/dist/lib/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.mjs.map +1 -0
- package/dist/lib/node_modules/prop-types/node_modules/react-is/index.mjs +2 -0
- package/dist/lib/node_modules/prop-types/node_modules/react-is/index.mjs.map +1 -0
- package/dist/lib/tsconfig.tsbuildinfo +1 -1
- package/dist/lib/types.d.ts +2 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -6
- package/dist/lib/_virtual/_commonjsHelpers.mjs +0 -2
- package/dist/lib/_virtual/_commonjsHelpers.mjs.map +0 -1
- package/dist/lib/_virtual/_interop_require_default.mjs +0 -2
- package/dist/lib/_virtual/_interop_require_default.mjs.map +0 -1
- package/dist/lib/_virtual/_interop_require_wildcard.mjs +0 -2
- package/dist/lib/_virtual/_interop_require_wildcard.mjs.map +0 -1
- package/dist/lib/_virtual/action-async-storage.external.mjs +0 -2
- package/dist/lib/_virtual/action-async-storage.external.mjs.map +0 -1
- package/dist/lib/_virtual/add-base-path.mjs +0 -2
- package/dist/lib/_virtual/add-base-path.mjs.map +0 -1
- package/dist/lib/_virtual/add-locale.mjs +0 -2
- package/dist/lib/_virtual/add-locale.mjs.map +0 -1
- package/dist/lib/_virtual/add-locale2.mjs +0 -2
- package/dist/lib/_virtual/add-locale2.mjs.map +0 -1
- package/dist/lib/_virtual/add-path-prefix.mjs +0 -2
- package/dist/lib/_virtual/add-path-prefix.mjs.map +0 -1
- package/dist/lib/_virtual/amp-context.shared-runtime.mjs +0 -2
- package/dist/lib/_virtual/amp-context.shared-runtime.mjs.map +0 -1
- package/dist/lib/_virtual/amp-mode.mjs +0 -2
- package/dist/lib/_virtual/amp-mode.mjs.map +0 -1
- package/dist/lib/_virtual/app-paths.mjs +0 -2
- package/dist/lib/_virtual/app-paths.mjs.map +0 -1
- package/dist/lib/_virtual/app-router-context.shared-runtime.mjs +0 -2
- package/dist/lib/_virtual/app-router-context.shared-runtime.mjs.map +0 -1
- package/dist/lib/_virtual/async-local-storage.mjs +0 -2
- package/dist/lib/_virtual/async-local-storage.mjs.map +0 -1
- package/dist/lib/_virtual/bailout-to-client-rendering.mjs +0 -2
- package/dist/lib/_virtual/bailout-to-client-rendering.mjs.map +0 -1
- package/dist/lib/_virtual/bailout-to-csr.mjs +0 -2
- package/dist/lib/_virtual/bailout-to-csr.mjs.map +0 -1
- package/dist/lib/_virtual/client-hook-in-server-component-error.mjs +0 -2
- package/dist/lib/_virtual/client-hook-in-server-component-error.mjs.map +0 -1
- package/dist/lib/_virtual/detect-domain-locale.mjs +0 -2
- package/dist/lib/_virtual/detect-domain-locale.mjs.map +0 -1
- package/dist/lib/_virtual/detect-domain-locale2.mjs +0 -2
- package/dist/lib/_virtual/detect-domain-locale2.mjs.map +0 -1
- package/dist/lib/_virtual/ensure-leading-slash.mjs +0 -2
- package/dist/lib/_virtual/ensure-leading-slash.mjs.map +0 -1
- package/dist/lib/_virtual/escape-regexp.mjs +0 -2
- package/dist/lib/_virtual/escape-regexp.mjs.map +0 -1
- package/dist/lib/_virtual/format-url.mjs +0 -2
- package/dist/lib/_virtual/format-url.mjs.map +0 -1
- package/dist/lib/_virtual/get-domain-locale.mjs +0 -2
- package/dist/lib/_virtual/get-domain-locale.mjs.map +0 -1
- package/dist/lib/_virtual/get-img-props.mjs +0 -2
- package/dist/lib/_virtual/get-img-props.mjs.map +0 -1
- package/dist/lib/_virtual/get-segment-value.mjs +0 -2
- package/dist/lib/_virtual/get-segment-value.mjs.map +0 -1
- package/dist/lib/_virtual/has-base-path.mjs +0 -2
- package/dist/lib/_virtual/has-base-path.mjs.map +0 -1
- package/dist/lib/_virtual/head-manager-context.shared-runtime.mjs +0 -2
- package/dist/lib/_virtual/head-manager-context.shared-runtime.mjs.map +0 -1
- package/dist/lib/_virtual/head.mjs +0 -2
- package/dist/lib/_virtual/head.mjs.map +0 -1
- package/dist/lib/_virtual/hooks-client-context.shared-runtime.mjs +0 -2
- package/dist/lib/_virtual/hooks-client-context.shared-runtime.mjs.map +0 -1
- package/dist/lib/_virtual/image-blur-svg.mjs +0 -2
- package/dist/lib/_virtual/image-blur-svg.mjs.map +0 -1
- package/dist/lib/_virtual/image-component.mjs +0 -2
- package/dist/lib/_virtual/image-component.mjs.map +0 -1
- package/dist/lib/_virtual/image-config-context.shared-runtime.mjs +0 -2
- package/dist/lib/_virtual/image-config-context.shared-runtime.mjs.map +0 -1
- package/dist/lib/_virtual/image-config.mjs +0 -2
- package/dist/lib/_virtual/image-config.mjs.map +0 -1
- package/dist/lib/_virtual/image-external.mjs +0 -2
- package/dist/lib/_virtual/image-external.mjs.map +0 -1
- package/dist/lib/_virtual/image-loader.mjs +0 -2
- package/dist/lib/_virtual/image-loader.mjs.map +0 -1
- package/dist/lib/_virtual/image.mjs +0 -2
- package/dist/lib/_virtual/image.mjs.map +0 -1
- package/dist/lib/_virtual/index4.mjs +0 -2
- package/dist/lib/_virtual/index4.mjs.map +0 -1
- package/dist/lib/_virtual/index5.mjs +0 -2
- package/dist/lib/_virtual/index5.mjs.map +0 -1
- package/dist/lib/_virtual/index6.mjs +0 -2
- package/dist/lib/_virtual/index6.mjs.map +0 -1
- package/dist/lib/_virtual/index7.mjs +0 -2
- package/dist/lib/_virtual/index7.mjs.map +0 -1
- package/dist/lib/_virtual/index8.mjs +0 -2
- package/dist/lib/_virtual/index8.mjs.map +0 -1
- package/dist/lib/_virtual/index9.mjs +0 -2
- package/dist/lib/_virtual/index9.mjs.map +0 -1
- package/dist/lib/_virtual/interception-routes.mjs +0 -2
- package/dist/lib/_virtual/interception-routes.mjs.map +0 -1
- package/dist/lib/_virtual/interpolate-as.mjs +0 -2
- package/dist/lib/_virtual/interpolate-as.mjs.map +0 -1
- package/dist/lib/_virtual/is-dynamic.mjs +0 -2
- package/dist/lib/_virtual/is-dynamic.mjs.map +0 -1
- package/dist/lib/_virtual/is-local-url.mjs +0 -2
- package/dist/lib/_virtual/is-local-url.mjs.map +0 -1
- package/dist/lib/_virtual/link.mjs +0 -2
- package/dist/lib/_virtual/link.mjs.map +0 -1
- package/dist/lib/_virtual/link2.mjs +0 -2
- package/dist/lib/_virtual/link2.mjs.map +0 -1
- package/dist/lib/_virtual/match-remote-pattern.mjs +0 -2
- package/dist/lib/_virtual/match-remote-pattern.mjs.map +0 -1
- package/dist/lib/_virtual/navigation.mjs +0 -2
- package/dist/lib/_virtual/navigation.mjs.map +0 -1
- package/dist/lib/_virtual/navigation2.mjs +0 -2
- package/dist/lib/_virtual/navigation2.mjs.map +0 -1
- package/dist/lib/_virtual/normalize-locale-path.mjs +0 -2
- package/dist/lib/_virtual/normalize-locale-path.mjs.map +0 -1
- package/dist/lib/_virtual/normalize-locale-path2.mjs +0 -2
- package/dist/lib/_virtual/normalize-locale-path2.mjs.map +0 -1
- package/dist/lib/_virtual/normalize-trailing-slash.mjs +0 -2
- package/dist/lib/_virtual/normalize-trailing-slash.mjs.map +0 -1
- package/dist/lib/_virtual/not-found.mjs +0 -2
- package/dist/lib/_virtual/not-found.mjs.map +0 -1
- package/dist/lib/_virtual/omit.mjs +0 -2
- package/dist/lib/_virtual/omit.mjs.map +0 -1
- package/dist/lib/_virtual/parse-path.mjs +0 -2
- package/dist/lib/_virtual/parse-path.mjs.map +0 -1
- package/dist/lib/_virtual/path-has-prefix.mjs +0 -2
- package/dist/lib/_virtual/path-has-prefix.mjs.map +0 -1
- package/dist/lib/_virtual/querystring.mjs +0 -2
- package/dist/lib/_virtual/querystring.mjs.map +0 -1
- package/dist/lib/_virtual/redirect-status-code.mjs +0 -2
- package/dist/lib/_virtual/redirect-status-code.mjs.map +0 -1
- package/dist/lib/_virtual/redirect.mjs +0 -2
- package/dist/lib/_virtual/redirect.mjs.map +0 -1
- package/dist/lib/_virtual/remove-trailing-slash.mjs +0 -2
- package/dist/lib/_virtual/remove-trailing-slash.mjs.map +0 -1
- package/dist/lib/_virtual/request-async-storage.external.mjs +0 -2
- package/dist/lib/_virtual/request-async-storage.external.mjs.map +0 -1
- package/dist/lib/_virtual/request-idle-callback.mjs +0 -2
- package/dist/lib/_virtual/request-idle-callback.mjs.map +0 -1
- package/dist/lib/_virtual/resolve-href.mjs +0 -2
- package/dist/lib/_virtual/resolve-href.mjs.map +0 -1
- package/dist/lib/_virtual/route-matcher.mjs +0 -2
- package/dist/lib/_virtual/route-matcher.mjs.map +0 -1
- package/dist/lib/_virtual/route-regex.mjs +0 -2
- package/dist/lib/_virtual/route-regex.mjs.map +0 -1
- package/dist/lib/_virtual/router-context.shared-runtime.mjs +0 -2
- package/dist/lib/_virtual/router-context.shared-runtime.mjs.map +0 -1
- package/dist/lib/_virtual/router-reducer-types.mjs +0 -2
- package/dist/lib/_virtual/router-reducer-types.mjs.map +0 -1
- package/dist/lib/_virtual/segment.mjs +0 -2
- package/dist/lib/_virtual/segment.mjs.map +0 -1
- package/dist/lib/_virtual/server-inserted-html.shared-runtime.mjs +0 -2
- package/dist/lib/_virtual/server-inserted-html.shared-runtime.mjs.map +0 -1
- package/dist/lib/_virtual/side-effect.mjs +0 -2
- package/dist/lib/_virtual/side-effect.mjs.map +0 -1
- package/dist/lib/_virtual/sorted-routes.mjs +0 -2
- package/dist/lib/_virtual/sorted-routes.mjs.map +0 -1
- package/dist/lib/_virtual/static-generation-async-storage.external.mjs +0 -2
- package/dist/lib/_virtual/static-generation-async-storage.external.mjs.map +0 -1
- package/dist/lib/_virtual/toastui-editor-plugin-color-syntax.mjs +0 -2
- package/dist/lib/_virtual/toastui-editor-plugin-color-syntax.mjs.map +0 -1
- package/dist/lib/_virtual/toastui-editor-plugin-color-syntax2.mjs +0 -2
- package/dist/lib/_virtual/toastui-editor-plugin-color-syntax2.mjs.map +0 -1
- package/dist/lib/_virtual/toastui-editor-viewer.mjs +0 -2
- package/dist/lib/_virtual/toastui-editor-viewer.mjs.map +0 -1
- package/dist/lib/_virtual/toastui-editor-viewer2.mjs +0 -2
- package/dist/lib/_virtual/toastui-editor-viewer2.mjs.map +0 -1
- package/dist/lib/_virtual/tui-color-picker.mjs +0 -2
- package/dist/lib/_virtual/tui-color-picker.mjs.map +0 -1
- package/dist/lib/_virtual/use-intersection.mjs +0 -2
- package/dist/lib/_virtual/use-intersection.mjs.map +0 -1
- package/dist/lib/_virtual/utils.mjs +0 -2
- package/dist/lib/_virtual/utils.mjs.map +0 -1
- package/dist/lib/_virtual/warn-once.mjs +0 -2
- package/dist/lib/_virtual/warn-once.mjs.map +0 -1
- package/dist/lib/dist/lib/components/Timeline/TimelineConnector.mjs +0 -2
- package/dist/lib/dist/lib/components/Timeline/TimelineConnector.mjs.map +0 -1
- package/dist/lib/dist/lib/components/Timeline/TimelineContent.mjs +0 -2
- package/dist/lib/dist/lib/components/Timeline/TimelineContent.mjs.map +0 -1
- package/dist/lib/dist/lib/components/Timeline/TimelineDescription.mjs +0 -2
- package/dist/lib/dist/lib/components/Timeline/TimelineDescription.mjs.map +0 -1
- package/dist/lib/dist/lib/components/Timeline/TimelineHeader.mjs +0 -2
- package/dist/lib/dist/lib/components/Timeline/TimelineHeader.mjs.map +0 -1
- package/dist/lib/dist/lib/components/Timeline/TimelineIcon.mjs +0 -2
- package/dist/lib/dist/lib/components/Timeline/TimelineIcon.mjs.map +0 -1
- package/dist/lib/dist/lib/components/Timeline/TimelineItem.mjs +0 -2
- package/dist/lib/dist/lib/components/Timeline/TimelineItem.mjs.map +0 -1
- package/dist/lib/dist/lib/components/Timeline/TimelineRoot.mjs +0 -3
- package/dist/lib/dist/lib/components/Timeline/TimelineRoot.mjs.map +0 -1
- package/dist/lib/dist/lib/components/Timeline/TimelineTime.mjs +0 -2
- package/dist/lib/dist/lib/components/Timeline/TimelineTime.mjs.map +0 -1
- package/dist/lib/dist/lib/components/Timeline/TimelineTitle.mjs +0 -2
- package/dist/lib/dist/lib/components/Timeline/TimelineTitle.mjs.map +0 -1
- package/dist/lib/dist/lib/components/Timeline/index.mjs +0 -2
- package/dist/lib/dist/lib/components/Timeline/index.mjs.map +0 -1
- package/dist/lib/node_modules/@swc/helpers/cjs/_interop_require_default.mjs +0 -2
- package/dist/lib/node_modules/@swc/helpers/cjs/_interop_require_default.mjs.map +0 -1
- package/dist/lib/node_modules/@swc/helpers/cjs/_interop_require_wildcard.mjs +0 -2
- package/dist/lib/node_modules/@swc/helpers/cjs/_interop_require_wildcard.mjs.map +0 -1
- package/dist/lib/node_modules/@toast-ui/editor/dist/esm/index.mjs +0 -37
- package/dist/lib/node_modules/@toast-ui/editor/dist/esm/index.mjs.map +0 -1
- package/dist/lib/node_modules/@toast-ui/editor/dist/toastui-editor-viewer.mjs +0 -24
- package/dist/lib/node_modules/@toast-ui/editor/dist/toastui-editor-viewer.mjs.map +0 -1
- package/dist/lib/node_modules/@toast-ui/editor-plugin-color-syntax/dist/toastui-editor-plugin-color-syntax.mjs +0 -8
- package/dist/lib/node_modules/@toast-ui/editor-plugin-color-syntax/dist/toastui-editor-plugin-color-syntax.mjs.map +0 -1
- package/dist/lib/node_modules/@toast-ui/react-editor/dist/esm/index.mjs +0 -22
- package/dist/lib/node_modules/@toast-ui/react-editor/dist/esm/index.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/client/add-base-path.mjs +0 -2
- package/dist/lib/node_modules/next/dist/client/add-base-path.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/client/add-locale.mjs +0 -2
- package/dist/lib/node_modules/next/dist/client/add-locale.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/client/components/action-async-storage.external.mjs +0 -2
- package/dist/lib/node_modules/next/dist/client/components/action-async-storage.external.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/client/components/async-local-storage.mjs +0 -2
- package/dist/lib/node_modules/next/dist/client/components/async-local-storage.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/client/components/bailout-to-client-rendering.mjs +0 -2
- package/dist/lib/node_modules/next/dist/client/components/bailout-to-client-rendering.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/client/components/client-hook-in-server-component-error.mjs +0 -2
- package/dist/lib/node_modules/next/dist/client/components/client-hook-in-server-component-error.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/client/components/navigation.mjs +0 -2
- package/dist/lib/node_modules/next/dist/client/components/navigation.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/client/components/not-found.mjs +0 -2
- package/dist/lib/node_modules/next/dist/client/components/not-found.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/client/components/redirect-status-code.mjs +0 -2
- package/dist/lib/node_modules/next/dist/client/components/redirect-status-code.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/client/components/redirect.mjs +0 -2
- package/dist/lib/node_modules/next/dist/client/components/redirect.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/client/components/request-async-storage.external.mjs +0 -2
- package/dist/lib/node_modules/next/dist/client/components/request-async-storage.external.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/client/components/router-reducer/reducers/get-segment-value.mjs +0 -2
- package/dist/lib/node_modules/next/dist/client/components/router-reducer/reducers/get-segment-value.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/client/components/router-reducer/router-reducer-types.mjs +0 -2
- package/dist/lib/node_modules/next/dist/client/components/router-reducer/router-reducer-types.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/client/components/static-generation-async-storage.external.mjs +0 -2
- package/dist/lib/node_modules/next/dist/client/components/static-generation-async-storage.external.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/client/detect-domain-locale.mjs +0 -2
- package/dist/lib/node_modules/next/dist/client/detect-domain-locale.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/client/get-domain-locale.mjs +0 -2
- package/dist/lib/node_modules/next/dist/client/get-domain-locale.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/client/has-base-path.mjs +0 -2
- package/dist/lib/node_modules/next/dist/client/has-base-path.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/client/image-component.mjs +0 -2
- package/dist/lib/node_modules/next/dist/client/image-component.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/client/link.mjs +0 -2
- package/dist/lib/node_modules/next/dist/client/link.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/client/normalize-locale-path.mjs +0 -2
- package/dist/lib/node_modules/next/dist/client/normalize-locale-path.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/client/normalize-trailing-slash.mjs +0 -2
- package/dist/lib/node_modules/next/dist/client/normalize-trailing-slash.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/client/request-idle-callback.mjs +0 -2
- package/dist/lib/node_modules/next/dist/client/request-idle-callback.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/client/resolve-href.mjs +0 -2
- package/dist/lib/node_modules/next/dist/client/resolve-href.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/client/use-intersection.mjs +0 -2
- package/dist/lib/node_modules/next/dist/client/use-intersection.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/compiled/micromatch/index.mjs +0 -23
- package/dist/lib/node_modules/next/dist/compiled/micromatch/index.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/server/future/helpers/interception-routes.mjs +0 -2
- package/dist/lib/node_modules/next/dist/server/future/helpers/interception-routes.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/amp-context.shared-runtime.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/amp-context.shared-runtime.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/amp-mode.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/amp-mode.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/app-router-context.shared-runtime.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/app-router-context.shared-runtime.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/escape-regexp.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/escape-regexp.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/get-img-props.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/get-img-props.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/head.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/head.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/hooks-client-context.shared-runtime.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/hooks-client-context.shared-runtime.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/i18n/detect-domain-locale.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/i18n/detect-domain-locale.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/i18n/normalize-locale-path.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/i18n/normalize-locale-path.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/image-blur-svg.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/image-blur-svg.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/image-config-context.shared-runtime.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/image-config-context.shared-runtime.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/image-config.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/image-config.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/image-external.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/image-external.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/image-loader.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/image-loader.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/lazy-dynamic/bailout-to-csr.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/lazy-dynamic/bailout-to-csr.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/match-remote-pattern.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/match-remote-pattern.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/add-locale.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/add-locale.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/add-path-prefix.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/add-path-prefix.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/app-paths.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/app-paths.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/format-url.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/format-url.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/index.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/index.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/interpolate-as.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/interpolate-as.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/is-dynamic.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/is-dynamic.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/is-local-url.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/is-local-url.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/omit.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/omit.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/parse-path.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/parse-path.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/path-has-prefix.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/path-has-prefix.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/querystring.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/querystring.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/route-matcher.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/route-matcher.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/route-regex.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/route-regex.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/sorted-routes.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/sorted-routes.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/router-context.shared-runtime.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/router-context.shared-runtime.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/segment.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/segment.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/server-inserted-html.shared-runtime.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/server-inserted-html.shared-runtime.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/side-effect.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/side-effect.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/utils/warn-once.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/utils/warn-once.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/utils.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/utils.mjs.map +0 -1
- package/dist/lib/node_modules/next/image.mjs +0 -2
- package/dist/lib/node_modules/next/image.mjs.map +0 -1
- package/dist/lib/node_modules/next/link.mjs +0 -2
- package/dist/lib/node_modules/next/link.mjs.map +0 -1
- package/dist/lib/node_modules/next/navigation.mjs +0 -2
- package/dist/lib/node_modules/next/navigation.mjs.map +0 -1
- package/dist/lib/node_modules/orderedmap/dist/index.mjs +0 -2
- package/dist/lib/node_modules/orderedmap/dist/index.mjs.map +0 -1
- package/dist/lib/node_modules/orderedmap/dist/index2.mjs +0 -2
- package/dist/lib/node_modules/orderedmap/dist/index2.mjs.map +0 -1
- package/dist/lib/node_modules/prosemirror-commands/dist/index.mjs +0 -2
- package/dist/lib/node_modules/prosemirror-commands/dist/index.mjs.map +0 -1
- package/dist/lib/node_modules/prosemirror-history/dist/index.mjs +0 -2
- package/dist/lib/node_modules/prosemirror-history/dist/index.mjs.map +0 -1
- package/dist/lib/node_modules/prosemirror-inputrules/dist/index.mjs +0 -2
- package/dist/lib/node_modules/prosemirror-inputrules/dist/index.mjs.map +0 -1
- package/dist/lib/node_modules/prosemirror-inputrules/dist/index2.mjs +0 -2
- package/dist/lib/node_modules/prosemirror-inputrules/dist/index2.mjs.map +0 -1
- package/dist/lib/node_modules/prosemirror-keymap/dist/index.mjs +0 -2
- package/dist/lib/node_modules/prosemirror-keymap/dist/index.mjs.map +0 -1
- package/dist/lib/node_modules/prosemirror-keymap/dist/index2.mjs +0 -2
- package/dist/lib/node_modules/prosemirror-keymap/dist/index2.mjs.map +0 -1
- package/dist/lib/node_modules/prosemirror-model/dist/index.mjs +0 -2
- package/dist/lib/node_modules/prosemirror-model/dist/index.mjs.map +0 -1
- package/dist/lib/node_modules/prosemirror-model/dist/index2.mjs +0 -2
- package/dist/lib/node_modules/prosemirror-model/dist/index2.mjs.map +0 -1
- package/dist/lib/node_modules/prosemirror-state/dist/index.mjs +0 -2
- package/dist/lib/node_modules/prosemirror-state/dist/index.mjs.map +0 -1
- package/dist/lib/node_modules/prosemirror-state/dist/index2.mjs +0 -2
- package/dist/lib/node_modules/prosemirror-state/dist/index2.mjs.map +0 -1
- package/dist/lib/node_modules/prosemirror-transform/dist/index.mjs +0 -2
- package/dist/lib/node_modules/prosemirror-transform/dist/index.mjs.map +0 -1
- package/dist/lib/node_modules/prosemirror-transform/dist/index2.mjs +0 -2
- package/dist/lib/node_modules/prosemirror-transform/dist/index2.mjs.map +0 -1
- package/dist/lib/node_modules/prosemirror-view/dist/index.mjs +0 -2
- package/dist/lib/node_modules/prosemirror-view/dist/index.mjs.map +0 -1
- package/dist/lib/node_modules/prosemirror-view/dist/index2.mjs +0 -2
- package/dist/lib/node_modules/prosemirror-view/dist/index2.mjs.map +0 -1
- package/dist/lib/node_modules/rope-sequence/dist/index.mjs +0 -2
- package/dist/lib/node_modules/rope-sequence/dist/index.mjs.map +0 -1
- package/dist/lib/node_modules/tui-color-picker/dist/tui-color-picker.mjs +0 -10
- package/dist/lib/node_modules/tui-color-picker/dist/tui-color-picker.mjs.map +0 -1
- package/dist/lib/node_modules/w3c-keyname/index.mjs +0 -2
- package/dist/lib/node_modules/w3c-keyname/index.mjs.map +0 -1
- package/dist/lib/node_modules/w3c-keyname/index2.mjs +0 -2
- package/dist/lib/node_modules/w3c-keyname/index2.mjs.map +0 -1
@@ -1,37 +0,0 @@
|
|
1
|
-
import{Schema as e,Fragment as t,Slice as n,DOMParser as r,NodeRange as o,Node as i,Mark as a}from"../../../../prosemirror-model/dist/index2.mjs";import{DecorationSet as s,Decoration as l,EditorView as u}from"../../../../prosemirror-view/dist/index2.mjs";import{ReplaceAroundStep as c,canSplit as d,StepMap as p,liftTarget as f}from"../../../../prosemirror-transform/dist/index.mjs";import{PluginKey as h,EditorState as m,TextSelection as v,Plugin as g,AllSelection as y,Selection as b,NodeSelection as w,SelectionRange as k}from"../../../../prosemirror-state/dist/index2.mjs";import{keymap as C}from"../../../../prosemirror-keymap/dist/index2.mjs";import{baseKeymap as x,chainCommands as T,setBlockType as E,wrapIn as M,toggleMark as L,exitCode as N,joinForward as A,deleteSelection as S,selectAll as D,newlineInCode as O}from"../../../../prosemirror-commands/dist/index.mjs";import{InputRule as I,inputRules as R,undoInputRule as P}from"../../../../prosemirror-inputrules/dist/index2.mjs";import{history as H,undo as B,redo as F,undoDepth as j}from"../../../../prosemirror-history/dist/index.mjs";
|
2
|
-
/**
|
3
|
-
* @toast-ui/editor
|
4
|
-
* @version 3.2.2 | Fri Feb 17 2023
|
5
|
-
* @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
|
6
|
-
* @license MIT
|
7
|
-
*/
|
8
|
-
/*! *****************************************************************************
|
9
|
-
Copyright (c) Microsoft Corporation.
|
10
|
-
|
11
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
12
|
-
purpose with or without fee is hereby granted.
|
13
|
-
|
14
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
15
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
16
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
17
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
18
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
19
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
20
|
-
PERFORMANCE OF THIS SOFTWARE.
|
21
|
-
***************************************************************************** */var q=function(e,t){return q=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},q(e,t)};function _(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}q(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var z=function(){return z=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},z.apply(this,arguments)};function U(e,t,n){if(2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}function V(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var $=function(e,t,n){var r;for(r in n=n||null,e)if(e.hasOwnProperty(r)&&!1===t.call(n,e[r],r,e))break};var W=function(e,t){var n,r,o,i,a=Object.prototype.hasOwnProperty;for(o=1,i=arguments.length;o<i;o+=1)for(r in n=arguments[o])a.call(n,r)&&(e[r]=n[r]);return e};var G=function(e){return"string"==typeof e||e instanceof String};var X=function(e){return e instanceof Array};var Z=function(e,t,n){var r=0,o=e.length;for(n=n||null;r<o&&!1!==t.call(n,e[r],r,e);r+=1);},Q=X,K=Z,Y=$;var J=function(e,t,n){Q(e)?K(e,t,n):Y(e,t,n)},ee=G,te=J;var ne=function(e,t,n){var r=e.style;ee(t)?r[t]=n:te(t,(function(e,t){r[t]=e}))},re=X;var oe=function(e,t,n){var r,o;if(n=n||0,!re(t))return-1;if(Array.prototype.indexOf)return Array.prototype.indexOf.call(t,e,n);for(o=t.length,r=n;n>=0&&r<o;r+=1)if(t[r]===e)return r;return-1};var ie=function(e){return void 0===e},ae=ie;var se=function(e){return e&&e.className?ae(e.className.baseVal)?e.className:e.className.baseVal:""},le=X,ue=ie;var ce=function(e,t){t=(t=le(t)?t.join(" "):t).replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),ue(e.className.baseVal)?e.className=t:e.className.baseVal=t},de=J,pe=oe,fe=se,he=ce;var me=function(e){var t,n=Array.prototype.slice.call(arguments,1),r=e.classList,o=[];r?de(n,(function(t){e.classList.add(t)})):((t=fe(e))&&(n=[].concat(t.split(/\s+/),n)),de(n,(function(e){pe(e,o)<0&&o.push(e)})),he(e,o))},ve=Z,ge=oe,ye=se,be=ce;var we=function(e){var t,n,r=Array.prototype.slice.call(arguments,1),o=e.classList;o?ve(r,(function(e){o.remove(e)})):(t=ye(e).split(/\s+/),n=[],ve(t,(function(e){ge(e,r)<0&&n.push(e)})),be(e,n))};var ke=function(e){return"number"==typeof e||e instanceof Number};var Ce=function(e){return null===e},xe=$;var Te=ie,Ee=function(e,t){var n=document.createElement("img"),r="";return xe(t,(function(e,t){r+="&"+t+"="+e})),r=r.substring(1),n.src=e+"?"+r,n.style.display="none",document.body.appendChild(n),document.body.removeChild(n),n},Me=6048e5;var Le=function(e,t){var n=location.hostname,r="TOAST UI "+e+" for "+n+": Statistics",o=window.localStorage.getItem(r);(Te(window.tui)||!1!==window.tui.usageStatistics)&&(o&&!function(e){return(new Date).getTime()-e>Me}(o)||(window.localStorage.setItem(r,(new Date).getTime()),setTimeout((function(){"interactive"!==document.readyState&&"complete"!==document.readyState||Ee("https://www.google-analytics.com/collect",{v:1,t:"event",tid:t,cid:n,dp:n,dh:e,el:e,ec:"use"})}),1e3)))},Ne=/[\u0020]+/g,Ae=/[>(){}[\]+-.!#|]/g,Se=/<([a-zA-Z_][a-zA-Z0-9\-._]*)(\s|[^\\>])*\/?>|<(\/)([a-zA-Z_][a-zA-Z0-9\-._]*)\s*\/?>|<!--[^-]+-->|<([a-zA-Z_][a-zA-Z0-9\-.:/]*)>/g,De=/\\[!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~\\]/g,Oe=/[*_~`]/g,Ie=/!\[.*\]\(.*\)/g,Re=/[[\]]/g,Pe=/(?:^|[^\\])\\(?!\\)/g,He=new RegExp('[&<>"]',"g");function Be(e){switch(e){case"&":return"&";case"<":return"<";case">":return">";case'"':return""";default:return e}}function Fe(e){return He.test(e)?e.replace(He,Be):e}function je(e,t){return-1!==e.indexOf(t)}var qe=["rel","target","hreflang","type"],_e={codeblock:/(^ {4}[^\n]+\n*)+/,thematicBreak:/^ *((\* *){3,}|(- *){3,} *|(_ *){3,}) */,atxHeading:/^(#{1,6}) +[\s\S]+/,seTextheading:/^([^\n]+)\n *(=|-){2,} */,blockquote:/^( *>[^\n]+.*)+/,list:/^ *(\*+|-+|\d+\.) [\s\S]+/,def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +["(]([^\n]+)[")])? */,link:/!?\[.*\]\(.*\)/,reflink:/!?\[.*\]\s*\[([^\]]*)\]/,verticalBar:/\u007C/,fencedCodeblock:/^((`|~){3,})/};function ze(e){if(!e)return null;var t={};return qe.forEach((function(n){ie(e[n])||(t[n]=e[n])})),t}function Ue(e,t){for(var n="",r=0;r<t;r+=1)n+=e;return n}function Ve(e){for(var t=[],n=Ie.exec(e);n;)t.push([n.index,n.index+n[0].length]),n=Ie.exec(e);return e.replace(Re,(function(e,n){var r=t.some((function(e){return n>e[0]&&n<e[1]}));return r?e:"\\"+e}))}function $e(e){var t=function(e){return"\\"+e},n=e.replace(Ne," ");return De.test(n)&&(n=n.replace(De,t)),Pe.test(n)&&(n=n.replace(Pe,(function(e){return e+"\\"}))),n=n.replace(Oe,t),Se.test(n)&&(n=n.replace(Se,t)),function(e){var t=!1;return $(_e,(function(n){return n.test(e)&&(t=!0),!t})),t}(n)&&(n=n.replace(Ae,t)),n}function We(e){var t;return(t=-1===e.indexOf('"')?'""':-1===e.indexOf("'")?"''":"()")[0]+e+t[1]}function Ge(e){return Ce(e)||ie(e)}function Xe(e,t){if(null===e&&e===t)return!0;if("object"!=typeof e||"object"!=typeof t||Ge(e)||Ge(t))return e===t;for(var n in e)if(e[n]!==t[n])return!1;for(var n in t)if(!(n in e))return!1;return!0}function Ze(e){return e[e.length-1]}function Qe(e){return"object"==typeof e&&null!==e}function Ke(e,t){var n=z({},e);return e&&t&&Object.keys(t).forEach((function(e){Qe(n[e])?Array.isArray(t[e])?n[e]=Ye(t[e]):n.hasOwnProperty(e)?n[e]=Ke(n[e],t[e]):n[e]=Je(t[e]):n[e]=t[e]})),n}function Ye(e){return e.map((function(e){return Qe(e)?Array.isArray(e)?Ye(e):Je(e):e}))}function Je(e){var t=Object.keys(e);return t.length?t.reduce((function(t,n){return Qe(e[n])?t[n]=Array.isArray(e[n])?Ye(e[n]):Je(e[n]):t[n]=e[n],t}),{}):e}function et(e,t){return void 0===t&&(t={}),Object.keys(t).forEach((function(n){e.hasOwnProperty(n)&&"object"==typeof e[n]?Array.isArray(t[n])?e[n]=t[n]:et(e[n],t[n]):e[n]=t[n]})),e}function tt(e,t){return e>t?[t,e]:[e,t]}var nt=Z;var rt=function(e){var t;try{t=Array.prototype.slice.call(e)}catch(n){t=[],nt(e,(function(e){t.push(e)}))}return t};function ot(e,t){var n=e.nodes.paragraph;return t?n.create(null,G(t)?e.text(t):t):n.createAndFill()}function it(e,t,n){return e.text(t,n)}function at(e,t,n){void 0===n&&(n=t);var r=e.doc.content.size,o=r>0?r-1:1;return v.create(e.doc,Math.min(t,o),Math.min(n,o))}function st(e,t,n){var r=t.pos;return e.replaceWith(r,r,ot(n)),e.setSelection(at(e,r+1))}function lt(e){for(var n=e.state,r=e.from,o=e.startIndex,i=e.endIndex,a=e.createText,s=n.tr,l=n.doc,u=n.schema,c=o;c<=i;c+=1){var d=l.child(c),p=d.nodeSize,f=d.textContent,h=d.content,m=a(f),v=m?it(u,m):t.empty,g=s.mapping.map(r),y=g+h.size;s.replaceWith(g,y,v),r+=p}return s}function ut(e,t,n,r){var o=n.length;e.split(t).delete(t-o,t).insert(e.mapping.map(t),r).setSelection(at(e,e.mapping.map(t)-o))}function ct(e){return e.sourcepos[0][0]}function dt(e){return e.sourcepos[1][0]}function pt(e){return e.sourcepos[0][1]}function ft(e){return e.sourcepos[1][1]}function ht(e){var t=e.type;return"strike"===t||"strong"===t||"emph"===t||"code"===t||"link"===t||"image"===t}function mt(e){return e&&("item"===e.type||"list"===e.type)}function vt(e){return mt(e)&&"ordered"===e.listData.type}function gt(e){return mt(e)&&"ordered"!==e.listData.type}function yt(e){return e&&("tableCell"===e.type||"tableDelimCell"===e.type)}function bt(e,t,n){for(void 0===n&&(n=!0),e=n?e:e.parent;e&&"document"!==e.type;){if(t(e))return e;e=e.parent}return null}function wt(e,t){return[e[0],e[1]+t]}function kt(e,t){return[e[0],t]}function Ct(e){var t=e.firstChild.literal;switch(e.type){case"emph":return"*"+t+"*";case"strong":return"**"+t+"**";case"strike":return"~~"+t+"~~";case"code":return"`"+t+"`";case"link":case"image":var n=e,r=n.destination,o=n.title;return("link"===e.type?"":"!")+"["+t+"]("+r+(o?' "'+o+'"':"")+")";default:return null}}function xt(e){switch(e.type){case"document":case"blockQuote":case"list":case"item":case"paragraph":case"heading":case"emph":case"strong":case"strike":case"link":case"image":case"table":case"tableHead":case"tableBody":case"tableRow":case"tableCell":case"tableDelimRow":case"customInline":return!0;default:return!1}}function Tt(e){for(var t=[],n=e.walker(),r=null;r=n.next();){var o=r.node;"text"===o.type&&t.push(o.literal)}return t.join("")}var Et=[],Mt={},Lt=/\$\$widget\d+\s/;function Nt(e){var t=e.search(Lt);if(-1!==t){var n=e.substring(t).replace(Lt,"").replace("$$","");e=e.substring(0,t),e+=Nt(n)}return e}function At(e,t){return"$$"+e+" "+t+"$$"}function St(e,t){var n=Mt[e],r=n.rule,o=n.toDOM,i=Nt(t).match(r);return i&&(t=i[0]),o(t)}function Dt(){return Et}function Ot(e){(Et=e).forEach((function(e,t){Mt["widget"+t]=e}))}function It(e,t,n,r){return e.concat(Rt(t,n,r))}function Rt(e,t,n){void 0===n&&(n=0);var r=[],o=(Et[n]||{}).rule,i=n+1;if(e=Nt(e),o&&o.test(e)){for(var a=void 0;-1!==(a=e.search(o));){var s=e.substring(0,a);s&&(r=It(r,s,t,i));var l=(e=e.substring(a)).match(o)[0],u="widget"+n;r.push(t.nodes.widget.create({info:u},t.text(At(u,l)))),e=e.substring(l.length)}e&&(r=It(r,e,t,i))}else e&&(r=n<Et.length-1?It(r,e,t,i):[t.text(e)]);return r}function Pt(e){for(var t,n="",r=e.walker();t=r.next();){var o=t.node;t.entering&&(o!==e&&"text"!==o.type?(n+=Ct(o),r.resumeAt(e,!1),r.next()):"text"===o.type&&(n+=o.literal))}return n}function Ht(){return{deleteSelection:function(){return S},selectAll:function(){return D},undo:function(){return B},redo:function(){return F}}}var Bt=oe,Ft=se;var jt=function(e,t){var n;return e.classList?e.classList.contains(t):(n=Ft(e).split(/\s+/),Bt(t,n)>-1)},qt=oe,_t=rt,zt=Element.prototype,Ut=zt.matches||zt.webkitMatchesSelector||zt.mozMatchesSelector||zt.msMatchesSelector||function(e){var t=this.document||this.ownerDocument;return qt(this,_t(t.querySelectorAll(e)))>-1};var Vt=function(e,t){return Ut.call(e,t)},$t="[A-Za-z][A-Za-z0-9-]*",Wt="(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)",Gt="<("+$t+")("+Wt+")*\\s*/?>",Xt="(?:"+Gt+"|"+("</("+$t+")\\s*[>]")+")",Zt=new RegExp("^"+Xt,"i"),Qt=/<br\s*\/*>/i,Kt=/<! ---->|<!--(?:-?[^>-])(?:-?[^-])*-->/,Yt="</p><p>";function Jt(e,t,n){var r=parseInt(e.left,10),o=parseInt(e.top,10),i=parseInt(e.width,10)+parseInt(e.paddingLeft,10)+parseInt(e.paddingRight,10),a=parseInt(e.height,10)+parseInt(e.paddingTop,10)+parseInt(e.paddingBottom,10);return t>=r&&t<=r+i&&n>=o&&n<=o+a}var en="toastui-editor-";function tn(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=[],r=0,o=e;r<o.length;r++){var i=o[r],a=void 0;(a=Array.isArray(i)?i[0]?i[1]:null:i)&&n.push(""+en+a)}return n.join(" ")}function nn(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.map((function(e){return en+"md-"+e})).join(" ")}function rn(e){return e&&e.nodeType===Node.ELEMENT_NODE}function on(e){e.parentNode&&e.parentNode.removeChild(e)}function an(e,t,n){ie(n)&&(n=!jt(e,t)),(n?me:we)(e,t)}function sn(e,t){var n=document.createElement("div");G(e)?n.innerHTML=e:n.appendChild(e);var r=n.firstChild;return t&&t.appendChild(r),r}function ln(e){var t=window.getComputedStyle(e);return["margin-left","margin-right"].reduce((function(e,n){return e+parseInt(t.getPropertyValue(n),10)}),0)+e.offsetWidth}function un(e,t){var n;for(n=G(t)?function(e){return Vt(e,t)}:function(e){return e===t};e&&e!==document;){if(rn(e)&&n(e))return e;e=e.parentNode}return null}function cn(e,t){for(var n=0,r=0;e&&e!==t;){if(n+=e.offsetTop,r+=e.offsetLeft,e.offsetParent===t.offsetParent)break;e=e.offsetParent}return{offsetTop:n,offsetLeft:r}}function dn(e,t){Object.keys(e).forEach((function(n){Ge(e[n])?t.removeAttribute(n):t.setAttribute(n,e[n])}))}function pn(e){var t=e;return t=(t=t.replace(/<img class="ProseMirror-separator" alt="">/g,"")).replace(/ class="ProseMirror-trailingBreak"/g,"")}var fn=new h("widget"),hn=function(){function e(e,t){var n=this;this.popup=null,this.removeWidget=function(){n.popup&&(n.rootEl.removeChild(n.popup),n.popup=null)},this.rootEl=e.dom.parentElement,this.eventEmitter=t,this.eventEmitter.listen("blur",this.removeWidget),this.eventEmitter.listen("loadUI",(function(){n.rootEl=un(e.dom.parentElement,"."+tn("defaultUI"))})),this.eventEmitter.listen("removePopupWidget",this.removeWidget)}return e.prototype.update=function(e){var t=fn.getState(e.state);if(this.removeWidget(),t){var n=t.node,r=t.style,o=e.coordsAtPos(t.pos),i=o.top,a=o.left,s=o.bottom-i,l=this.rootEl.getBoundingClientRect(),u=i-l.top;ne(n,{opacity:"0"}),this.rootEl.appendChild(n),ne(n,{position:"absolute",left:a-l.left+5+"px",top:("bottom"===r?u+s-5:u-s)+"px",opacity:"1"}),this.popup=n,e.focus()}},e.prototype.destroy=function(){this.eventEmitter.removeEventHandler("blur",this.removeWidget)},e}();function mn(e,t,n){e.emit("addImageBlobHook",t,(function(n,r){e.emit("command","addImage",{imageUrl:n,altText:r||t.name||"image"})}),n)}function vn(e){var t=rt(e).filter((function(e){return-1!==e.type.indexOf("image")}));if(1===t.length){var n=t[0];if(n)return n.getAsFile()}return null}function gn(e){var t=e.eventEmitter;return new g({props:{handleDOMEvents:{drop:function(e,n){var r,o=null===(r=n.dataTransfer)||void 0===r?void 0:r.files;return o&&Z(o,(function(e){return-1===e.type.indexOf("image")||(n.preventDefault(),n.stopPropagation(),mn(t,e,n.type),!1)})),!0}}}})}var yn=function(){function e(){}return Object.defineProperty(e.prototype,"type",{get:function(){return"node"},enumerable:!1,configurable:!0}),e.prototype.setContext=function(e){this.context=e},e}();function bn(e){var t=document.createElement("span"),n=St(e.attrs.info,e.textContent);return t.className="tui-widget",t.appendChild(n),{dom:t}}function wn(e){return"widget"===e.type.name}var kn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"widget"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"schema",{get:function(){return{attrs:{info:{default:null}},group:"inline",inline:!0,content:"text*",selectable:!1,atom:!0,toDOM:function(){return["span",{class:"tui-widget"},0]},parseDOM:[{tag:"span.tui-widget",getAttrs:function(e){return{info:e.textContent.match(/\$\$(widget\d+)/)[1]}}}]}},enumerable:!1,configurable:!0}),t}(yn),Cn=function(){function t(e){this.timer=null,this.el=document.createElement("div"),this.el.className="toastui-editor",this.eventEmitter=e,this.placeholder={text:""}}return t.prototype.createState=function(){return m.create({schema:this.schema,plugins:this.createPlugins()})},t.prototype.initEvent=function(){var e=this,t=e.eventEmitter,n=e.view,r=e.editorType;n.dom.addEventListener("focus",(function(){return t.emit("focus",r)})),n.dom.addEventListener("blur",(function(){return t.emit("blur",r)}))},t.prototype.emitChangeEvent=function(e){this.eventEmitter.emit("caretChange",this.editorType),e.docChanged&&this.eventEmitter.emit("change",this.editorType)},Object.defineProperty(t.prototype,"defaultPlugins",{get:function(){var e,t,n=this.createInputRules(),r=U(U([],this.keymaps),[C(z({"Shift-Enter":x.Enter},x)),H(),(t=this.placeholder,new g({props:{decorations:function(e){var n=e.doc;if(t.text&&1===n.childCount&&n.firstChild.isTextblock&&0===n.firstChild.content.size){var r=document.createElement("span");return me(r,"placeholder"),t.className&&me(r,t.className),r.textContent=t.text,s.create(n,[l.widget(1,r)])}return null}}})),(e=this.eventEmitter,new g({key:fn,state:{init:function(){return null},apply:function(e){return e.getMeta("widget")}},view:function(t){return new hn(t,e)}})),gn(this.context)]);return n?r.concat(n):r},enumerable:!1,configurable:!0}),t.prototype.createInputRules=function(){var e=Dt().map((function(e){var t=e.rule;return new I(t,(function(e,n,r,o){var i=e.schema,a=e.tr,s=e.doc,l=n.input.match(new RegExp(t,"g")),u=s.resolve(r),c=u.parent,d=0;if(wn(c)&&(c=u.node(u.depth-1)),c.forEach((function(e){return wn(e)&&(d+=1)})),l.length>d){var p=Ze(l),f=Rt(p,i);return a.replaceWith(o-p.length+1,o,f)}return null}))}));return e.length?R({rules:e}):null},t.prototype.clearTimer=function(){this.timer&&(clearTimeout(this.timer),this.timer=null)},t.prototype.createSchema=function(){return new e({nodes:this.specs.nodes,marks:this.specs.marks})},t.prototype.createKeymaps=function(e){var t=Ht(),n=t.undo,r=t.redo,o=this.specs.keymaps(e),i={"Mod-z":n(),"Shift-Mod-z":r()};return e?o.concat(C(i)):o},t.prototype.createCommands=function(){return this.specs.commands(this.view)},t.prototype.createPluginProps=function(){var e=this;return this.extraPlugins.map((function(t){return t(e.eventEmitter)}))},t.prototype.focus=function(){var e=this;this.clearTimer(),this.timer=setTimeout((function(){e.view.focus(),e.view.dispatch(e.view.state.tr.scrollIntoView())}))},t.prototype.blur=function(){this.view.dom.blur()},t.prototype.destroy=function(){var e=this;this.clearTimer(),this.view.destroy(),Object.keys(this).forEach((function(t){delete e[t]}))},t.prototype.moveCursorToStart=function(e){var t=this.view.state.tr;this.view.dispatch(t.setSelection(at(t,1)).scrollIntoView()),e&&this.focus()},t.prototype.moveCursorToEnd=function(e){var t=this.view.state.tr;this.view.dispatch(t.setSelection(at(t,t.doc.content.size-1)).scrollIntoView()),e&&this.focus()},t.prototype.setScrollTop=function(e){this.view.dom.scrollTop=e},t.prototype.getScrollTop=function(){return this.view.dom.scrollTop},t.prototype.setPlaceholder=function(e){this.placeholder.text=e,this.view.dispatch(this.view.state.tr.scrollIntoView())},t.prototype.setHeight=function(e){ne(this.el,{height:e+"px"})},t.prototype.setMinHeight=function(e){ne(this.el,{minHeight:e+"px"})},t.prototype.getElement=function(){return this.el},t}();var xn=function(e){return e instanceof Function},Tn=["Enter","Shift-Enter","Mod-Enter","Tab","Shift-Tab","Delete","Backspace","Mod-Delete","Mod-Backspace","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Mod-d","Mod-D","Alt-ArrowUp","Alt-ArrowDown"];function En(e,t,n){return e.focus(),t(n)(e.state,e.dispatch,e)}var Mn=function(){function e(e){this.specs=e}return Object.defineProperty(e.prototype,"nodes",{get:function(){return this.specs.filter((function(e){return"node"===e.type})).reduce((function(e,t){var n,r=t.name,o=t.schema;return z(z({},e),((n={})[r]=o,n))}),{})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"marks",{get:function(){return this.specs.filter((function(e){return"mark"===e.type})).reduce((function(e,t){var n,r=t.name,o=t.schema;return z(z({},e),((n={})[r]=o,n))}),{})},enumerable:!1,configurable:!0}),e.prototype.commands=function(e,t){var n=this.specs.filter((function(e){return e.commands})).reduce((function(t,n){var r={},o=n.commands();return xn(o)?r[n.name]=function(t){return En(e,o,t)}:Object.keys(o).forEach((function(t){r[t]=function(n){return En(e,o[t],n)}})),z(z({},t),r)}),{}),r=Ht();return Object.keys(r).forEach((function(t){n[t]=function(n){return En(e,r[t],n)}})),t&&Object.keys(t).forEach((function(r){n[r]=function(n){return En(e,t[r],n)}})),n},e.prototype.keymaps=function(e){return this.specs.filter((function(e){return e.keymaps})).map((function(e){return e.keymaps()})).map((function(t){return e||Object.keys(t).forEach((function(e){je(Tn,e)||delete t[e]})),C(t)}))},e.prototype.setContext=function(e){this.specs.forEach((function(t){t.setContext(e)}))},e}();function Ln(e){var t=e.from,n=e.to;return e instanceof y?[t+1,n-1]:[t,n]}function Nn(e){return e.index(0)+1}function An(e,t,n){void 0===n&&(n=1);var r=0;return e.forEach((function(e,o){wn(e)&&o+2<t&&(r+=2*n)})),r}function Sn(e,t,n){void 0===n&&(n=t);var r=t===n,o=e.resolve(t),i=Nn(o),a=i,s=o.start(1),l=s;if(!r){var u=e.resolve(n===e.content.size?n-1:n);l=u.start(1),a=Nn(u),u.pos===e.content.size&&(n=e.content.size-2)}var c=Math.max(t-s+1,1),d=Math.max(n-l+1,1);return[[i,c+An(e.child(i-1),c,-1)],[a,d+An(e.child(a-1),d,-1)]]}function Dn(e,t){for(var n=[],r=0,o=0;r<t;r+=1){var i=e.child(r);n[r]=o,o+=i.nodeSize}return n}function On(e,t,n){var r=Dn(e,n[0]),o=t[0]-1,i=n[0]-1,a=e.child(o),s=e.child(i),l=r[o],u=r[i];return l+=t[1]+An(a,t[1]-1),u+=n[1]+An(s,n[1]-1),[l,Math.min(u,e.content.size)]}function In(e){var t=e.$from,n=e.$to,r=e.from,o=e.to,i=t.doc;return e instanceof y&&(t=i.resolve(r+1),n=i.resolve(o-1)),0===t.depth&&(n=t=i.resolve(r-1)),{startFromOffset:t.start(1),endFromOffset:n.start(1),startToOffset:t.end(1),endToOffset:n.end(1),startIndex:t.index(0),endIndex:n.index(0),from:t.pos,to:n.pos}}function Rn(e,t){for(var n=1,r=1,o=0,i=0;o<e.childCount;o+=1){var a=e.child(o).nodeSize;if(n=i+1,r=i+a-1,o===t)break;i+=a}return{startOffset:n,endOffset:r}}var Pn="heading",Hn="listItem",Bn="link",Fn="code",jn="meta",qn="delimiter",_n="markedText",zn={strong:2,emph:1,strike:2};function Un(e,t,n,r){return{start:e,end:t,spec:{type:n,attrs:r}}}function Vn(e,t,n){var r=e.type,o=wt(t,zn[r]),i=wt(n,-zn[r]);return[Un(o,i,r),Un(t,o,qn),Un(i,n,qn)]}function $n(e,t,n,r){return[Un(e,t,Bn),Un(kt(e,n[1]+1),kt(t,r),Bn,{desc:!0}),Un(kt(t,r+2),wt(t,-1),Bn,{url:!0})]}function Wn(e,t,n,r){var o={start:t,end:n,spec:{attrs:{className:r+"-line-background",codeStart:t[0],codeEnd:n[0]}},lineBackground:!0};return"item"!==e.type&&"blockQuote"!==e.type?[z(z({},o),{end:t,spec:{attrs:{className:r+"-line-background start"}}}),z(z({},o),{start:[Math.min(t[0]+1,n[0]),t[1]]})]:null}function Gn(e,t){for(var n=[];e;){var r=e.type;"paragraph"!==r&&"codeBlock"!==r||n.push(Un([ct(e),pt(e)-1],[dt(e),ft(e)+1],t)),e=e.next}return n}var Xn={heading:function(e,t,n){var r=e.level,o=e.headingType,i=[Un(t,n,Pn,{level:r})];return"atx"===o?i.push(Un(t,wt(t,r),qn)):i.push(Un(kt(n,0),n,Pn,{seText:!0})),i},strong:Vn,emph:Vn,strike:Vn,link:function(e,t,n){var r=e.lastChild,o=e.extendedAutolink,i=r?ft(r)+1:2;return o?[Un(t,n,Bn,{desc:!0})]:$n(t,n,t,i)},image:function(e,t,n){var r=e.lastChild,o=r?ft(r)+1:3,i=wt(t,1);return U([Un(t,i,jn)],$n(t,n,i,o))},code:function(e,t,n){var r=e.tickCount,o=wt(t,r),i=wt(n,-r);return[Un(t,n,Fn),Un(t,o,Fn,{start:!0}),Un(o,i,Fn,{marked:!0}),Un(i,n,Fn,{end:!0})]},codeBlock:function(e,t,n,r){var o=e.fenceOffset,i=e.fenceLength,a=e.fenceChar,s=e.info,l=e.infoPadding,u=e.parent,c=o+i,d=[Un(kt(t,1),n,"codeBlock")];a&&d.push(Un(t,wt(t,c),qn)),s&&d.push(Un(wt(t,i),wt(t,i+l+s.length),jn)),new RegExp("^(\\s{0,4})("+a+"{"+i+",})").test(r)&&d.push(Un(kt(n,1),n,qn));var p=Wn(u,t,n,"code-block");return p?d.concat(p):d},blockQuote:function(e,t,n){var r=e.parent&&"blockQuote"!==e.parent.type?[Un(t,n,"blockQuote")]:[];if(e.firstChild){var o=[];"paragraph"===e.firstChild.type?o=function(e){for(var t=[];e;)t.push(Un([ct(e),pt(e)],[dt(e),ft(e)+1],_n)),e=e.next;return t}(e.firstChild.firstChild):"list"===e.firstChild.type&&(o=Gn(e.firstChild,_n)),r=U(U([],r),o)}return r},item:function(e,t){var n=e.listData,r=n.padding,o=n.task,i=function(e){for(var t=0;e.parent.parent&&"item"===e.parent.parent.type;)e=e.parent.parent,t+=1;return[Hn,z(z({},[{odd:!0},{even:!0}][t%2]),{listStyle:!0})]}(e),a=[Un.apply(void 0,U([t,wt(t,r)],i))];return o&&(a.push(Un(wt(t,r),wt(t,r+3),"taskDelimiter")),a.push(Un(wt(t,r+1),wt(t,r+2),jn))),a.concat(Gn(e.firstChild,_n))},customBlock:function(e,t,n){var r=e,o=r.offset,i=r.syntaxLength,a=r.info,s=r.parent,l=o+i,u=[Un(kt(t,1),n,"customBlock")];u.push(Un(t,wt(t,l),qn)),a&&u.push(Un(wt(t,l),wt(t,i+a.length),jn)),u.push(Un(kt(n,1),n,qn));var c=Wn(s,t,n,"custom-block");return c?u.concat(c):u}},Zn={thematicBreak:"thematicBreak",table:"table",tableCell:"tableCell",htmlInline:"html"};function Qn(e,t,n,r){var o=e.type;return xn(Xn[o])?Xn[o](e,t,n,r):Zn[o]?[Un(t,n,Zn[o])]:null}var Kn={};function Yn(e){var t=e.schema,n=e.toastMark;return new g({appendTransaction:function(e,r,o){var i=e[0],a=o.tr;if(i.docChanged){var s=[];i.getMeta("editResult").forEach((function(e){var t=e.nodes,r=e.removedNodeRange;if(t.length){s=s.concat(function(e,t){var n=e.doc,r=t[0].sourcepos[0],o=Ze(t).sourcepos,i=o[1],a=[r[0],r[1]],s=[i[0],i[1]+1],l=[];return function(e,t,n){var r=[];Kn={};for(var o=t[0]-1;o<n[0];o+=1){var i=e.child(o),a=i.attrs.codeEnd,s=i.attrs.codeStart;if(s&&a&&!je(r,s)){r.push(s),a=Math.min(a,e.childCount);for(var l=s-1,u=n[0],c=l;c<u;c+=1)Kn[c]=!0}}}(n,r,i),l.push({start:a,end:s}),l}(a,t));for(var o=0,i=t;o<i.length;o++)for(var l=i[o].walker(),u=l.next();u;){var c=u.node;u.entering&&(s=s.concat(er(c,n))),u=l.next()}}else if(r)for(var d=a.doc.childCount-1,p=r.line,f=p[0],h=p[1],m=Math.min(f,d),v=Math.min(h,d),g=m;g<=v;g+=1)Kn[g]=!0})),function(e,t,n){var r=e.doc,o=t.nodes.paragraph,i=Dn(r,r.childCount);n.forEach((function(n){var a=n.start,s=n.end,l=n.spec,u=n.lineBackground,c=Math.min(a[0],r.childCount)-1,d=Math.min(s[0],r.childCount)-1,p=r.child(c),f=r.child(d),h=i[c],m=i[d];(h+=a[1]+An(p,a[1]-1),m+=s[1]+An(f,s[1]-1),l)?u?function(e,t,n,r,o){void 0===o&&(o={});for(var i=r.startIndex,a=r.endIndex,s=r.from,l=r.to,u=!1,c=i;c<=a;c+=1)delete Kn[c],u=Jn(t,c,o);u&&e.setBlockType(s,l,n,o)}(e,r,o,{from:h,to:m,startIndex:c,endIndex:d},l.attrs):e.addMark(h,m,t.mark(l.type,l.attrs)):e.removeMark(h,m)})),function(e,t,n){Object.keys(Kn).forEach((function(r){var o=Number(r),i=Math.min(Number(r)+1,e.doc.childCount-1),a=t[o],s=t[i]-1;o===i&&(s+=2),e.setBlockType(a,s,n)}))}(e,i,o)}(a,t,s)}return a.setMeta("widget",i.getMeta("widget"))}})}function Jn(e,t,n){return Object.keys(n).some((function(r){return n[r]!==e.child(t).attrs[r]}))}function er(e,t){var n=t.getLineTexts(),r=[ct(e),pt(e)],o=[dt(e),ft(e)+1],i=Qn(e,r,o,n[o[0]-1]);return null!=i?i:[]}var tr=["taskList","orderedList","bulletList","table","strong","emph","strike","heading","thematicBreak","blockQuote","code","codeBlock","indent","outdent"];function nr(e){var t={indent:{active:!1,disabled:!0},outdent:{active:!1,disabled:!0}},n=!0;return function(e,t,n){for(void 0===n&&(n=!0),e=n?e:e.parent;e&&"document"!==e.type;)t(e),e=e.parent}(e,(function(e){var r=function(e){var t=e.type;return mt(e)?e.listData.task?"taskList":"ordered"===e.listData.type?"orderedList":"bulletList":-1!==t.indexOf("table")?"table":je(tr,t)?t:null}(e);r&&("bulletList"===r||"orderedList"===r?n&&(t[r]={active:!0},t.indent.disabled=!1,t.outdent.disabled=!1,n=!1):t[r]={active:!0})})),t}var rr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"doc"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"schema",{get:function(){return{content:"block+"}},enumerable:!1,configurable:!0}),t}(yn),or=function(){function e(){}return Object.defineProperty(e.prototype,"type",{get:function(){return"mark"},enumerable:!1,configurable:!0}),e.prototype.setContext=function(e){this.context=e},e}();function ir(e,t){return ar(e,t-1)}function ar(e,t){return e.child(t).textContent}var sr=/^\s*> ?/,lr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"blockQuote"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:nn("block-quote")},0]}}},enumerable:!1,configurable:!0}),t.prototype.createBlockQuoteText=function(e,t){return t?e.replace(sr,"").trim():"> "+e.trim()},t.prototype.extendBlockQuote=function(){var e=this;return function(t,n){var r=t.selection,o=t.doc,i=t.tr,a=t.schema,s=In(r),l=s.endFromOffset,u=s.endToOffset,c=s.endIndex,d=s.to,p=ar(o,c);if(sr.test(p)&&d>l&&r.empty){if(!p.replace(sr,"").trim())i.deleteRange(l,u).split(i.mapping.map(u));else{var f=p.slice(d-l).trim();ut(i,u,f,it(a,e.createBlockQuoteText(f)))}return n(i),!0}return!1}},t.prototype.commands=function(){var e=this;return function(){return function(t,n){var r=t.selection,o=t.doc,i=In(r),a=i.startFromOffset,s=i.endToOffset,l=i.startIndex,u=i.endIndex,c=sr.test(ar(o,l)),d=lt({state:t,startIndex:l,endIndex:u,from:a,createText:function(t){return e.createBlockQuoteText(t,c)}});return n(d.setSelection(at(d,d.mapping.map(s)))),!0}}},t.prototype.keymaps=function(){var e=this.commands()();return{"alt-q":e,"alt-Q":e,Enter:this.extendBlockQuote()}},t}(or),ur=/(^\s*)([-*+] |[\d]+\. )/,cr=/(^\s*)([\d])+\.( \[[ xX]])? /,dr=/^(\s*)((\d+)([.)]\s(?:\[(?:x|\s)\]\s)?))(.*)/,pr=/(^\s*)([-*+]|[\d]+\.)( \[[ xX]])? /,fr=/^(\s*)([-*+]+(\s(?:\[(?:x|\s)\]\s)?))(.*)/,hr=/(^\s*)([-*+] |[\d]+\. )(\[[ xX]] )/,mr=/(^\s*)([-*+])( \[[ xX]]) /;function vr(e){return cr.test(e)?"ordered":"bullet"}function gr(e){for(var t=0;e&&"document"!==e.type;)"list"===e.type&&(t+=1),e=e.parent;return t}function yr(e,t,n,r){for(var o=e.getLineTexts().length,i=[],a=t;r?a<o:a>1;){a=r?a+1:a-1;var s=e.findFirstNodeAtLine(a),l=gr(s);if(l===n)i.push({line:a,depth:n,mdNode:s});else if(l<n)break}return i}function br(e,t,n,r){void 0===r&&(r=0);var o=Number.MAX_VALUE,i=0,a=t.map((function(t,a){var s=t.line;o=Math.min(s-1,o),i=Math.max(s-1,i);var l=ir(e,s);return l="bullet"===n?function(e){if(!ur.test(e))return"* "+e;var t=vr(e);return"bullet"===t&&pr.test(e)?e=e.replace(mr,"$1$2 "):"ordered"===t&&(e=e.replace(cr,"$1* ")),e}(l):function(e,t){if(!ur.test(e))return t+". "+e;var n=vr(e);if("bullet"===n||"ordered"===n&&pr.test(e))e=e.replace(pr,"$1"+t+". ");else if("ordered"===n){var r=dr.exec(e)[3];Number(r)!==t&&(e=e.replace(cr,"$1"+t+". "))}return e}(l,a+1+r),{text:l,line:s}}));return{changedResults:a,firstIndex:o,lastIndex:i}}function wr(e,t){var n,r,o,i,a,s,l,u=(r=(n=t).toastMark,o=n.mdNode,i=n.line,a=gr(o),s=yr(r,i,a,!1).reverse(),l=yr(r,i,a,!0),s.concat([{line:i,depth:a,mdNode:o}]).concat(l));return br(t.doc,u,e)}var kr={bullet:function(e){return wr("bullet",e)},ordered:function(e){return wr("ordered",e)},task:function(e){var t=e.mdNode,n=e.doc,r=e.line,o=ir(n,r);return t.listData.task?o=o.replace(hr,"$1$2"):mt(t)&&(o=o.replace(ur,"$1$2[ ] ")),{changedResults:[{text:o,line:r}]}}},Cr={bullet:function(e){var t=e.doc,n=e.line;return{changedResults:[{text:"* "+ir(t,n),line:n}]}},ordered:function(e){for(var t=e.toastMark,n=e.doc,r=e.line,o=e.startLine,i=ir(n,r),a=1,s=o,l=0,u=o-1;u>0;u-=1){var c=t.findFirstNodeAtLine(u),d=ir(n,u)&&!!bt(c,(function(e){return mt(e)})),p=dr.exec(ir(n,u));if(!p&&!d)break;if(p||!d){var f=p,h=f[1],m=f[3];if(!h){a=Number(m),s=u;break}}else l+=1}return{changedResults:[{text:a+r-s-l+". "+i,line:r}]}},task:function(e){var t=e.doc,n=e.line;return{changedResults:[{text:"* [ ] "+ir(t,n),line:n}]}}},xr={bullet:function(e){var t=e.line,n=ir(e.doc,t),r=fr.exec(n);return{listSyntax:""+r[1]+r[2]}},ordered:function(e){var t=e.toastMark,n=e.line,r=e.mdNode,o=e.doc,i=gr(r),a=ir(o,n),s=dr.exec(a),l=s[1],u=s[3],c=s[4],d=Number(u)+1,p=""+l+d+c,f=yr(t,n,i,!0).filter((function(e){var t=dr.exec(ir(o,e.line));return t&&t[1].length===l.length&&!!bt(e.mdNode,(function(e){return vt(e)}))}));return z({listSyntax:p},br(o,f,"ordered",d))}};function Tr(e,t,n,r,o){for(var i=[],a=ir(e,n),s=dr.exec(a);s;){var l=s[1],u=s[4],c=s[5],d=l.length;if(d===o)i.push(it(t,""+l+r+u+c)),r+=1,n+=1;else if(d>o){var p=Tr(e,t,n,1,d);n=p.line,i=i.concat(p.nodes)}if(d<o||n>e.childCount)break;a=ir(e,n),s=dr.exec(a)}return{nodes:i,line:n}}var Er=/(^\s{1,4})(.*)/;function Mr(e,t,n){return e<t||ur.test(n)||sr.test(n)}function Lr(e,t,n){var r=n.$from;0===r.depth&&(r=e.resolve(r.pos-1));var o=r.node(1),i=r.start(1),a=o.content.size;return o.rangeHasMark(0,a,t.marks.table)&&r.pos-i!==a&&r.pos!==i}function Nr(e,t){var n=t.from,r=t.to;if("indent"===t.type){n+=4,r+=4*(t.lineLen+1)}else{var o=t.spaceLenList;n-=o[0];for(var i=0;i<o.length;i+=1)r-=o[i]}return at(e,n,r)}var Ar=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"paragraph"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"schema",{get:function(){return{content:"inline*",attrs:{className:{default:null},codeStart:{default:null},codeEnd:{default:null}},selectable:!1,group:"block",parseDOM:[{tag:"div"}],toDOM:function(e){var t=e.attrs;return t.className?["div",{class:nn(t.className)},0]:["div",0]}}},enumerable:!1,configurable:!0}),t.prototype.reorderList=function(e,t){for(var n=this.context,r=n.view,o=n.toastMark,i=n.schema,a=r.state,s=a.tr,l=a.selection,u=a.doc,c=o.findFirstNodeAtLine(e),d=c;c&&!gt(c)&&"document"!==c.parent.type;)if(vt(c=c.parent)){d=c;break}d&&(e=d.sourcepos[0][0]);var p=dr.exec(ir(u,e)),f=p[1],h=p[3],m=f.length,v=Tr(u,i,e,Number(h),m),g=v.line,y=v.nodes;t=Math.max(t,g-1);for(var b=Rn(u,e-1).startOffset,w=e-1;w<=t-1;w+=1){var k=u.child(w),C=k.nodeSize,x=k.content,T=s.mapping.map(b),E=T+x.size;s.replaceWith(T,E,y[w-e+1]),b+=C}var M=at(s,l.from,l.to);r.dispatch(s.setSelection(M))},t.prototype.indent=function(e){var t=this;return void 0===e&&(e=!1),function(){return function(n,r){var o=n.schema,i=n.selection,a=n.doc,s=In(i),l=s.from,u=s.to,c=s.startFromOffset,d=s.startIndex,p=s.endIndex;if(e&&Lr(a,o,i))return!1;var f=ar(a,d);if(e&&Mr(l,u,f)||!e&&ur.test(f)){var h=lt({state:n,from:c,startIndex:d,endIndex:p,createText:function(e){return" "+e}}),m={type:"indent",from:l,to:u,lineLen:p-d};r(h.setSelection(Nr(h,m))),dr.test(f)&&t.reorderList(d+1,p+1)}else e&&r(n.tr.insert(u,it(o," ")));return!0}}},t.prototype.outdent=function(e){var t=this;return void 0===e&&(e=!1),function(){return function(n,r){var o=n.selection,i=n.doc,a=n.schema,s=In(o),l=s.from,u=s.to,c=s.startFromOffset,d=s.startIndex,p=s.endIndex;if(e&&Lr(i,a,o))return!1;var f=ar(i,d);if(e&&Mr(l,u,f)||!e&&ur.test(f)){var h=[],m=lt({state:n,from:c,startIndex:d,endIndex:p,createText:function(e){var t=Er.exec(e);return h.push(t?t[1].length:0),e.replace(Er,"$2")}}),v={type:"outdent",from:l,to:u,spaceLenList:h};r(m.setSelection(Nr(m,v))),dr.test(f)&&t.reorderList(d+1,p+1)}else if(e){var g=f.slice(0,u-c),y=g.replace(/\s{1,4}$/,""),b=u-(g.length-y.length);r(n.tr.delete(b,u))}return!0}}},t.prototype.deleteLines=function(){var e=this;return function(t,n){var r=e.context.view,o=In(t.selection),i=o.startFromOffset,a=o.endToOffset;return T((function(){return n(t.tr.deleteRange(i,a)),!0}),A)(t,n,r)}},t.prototype.moveDown=function(){return function(e,t){var n=e.doc,r=e.tr,o=e.selection,i=e.schema,a=In(o),s=a.startFromOffset,l=a.endToOffset,u=a.endIndex;if(u<n.content.childCount-1){var c=n.child(u+1),d=c.nodeSize,p=c.textContent;return r.delete(l,l+d).split(s).insert(r.mapping.map(s)-2,it(i,p)),t(r),!0}return!1}},t.prototype.moveUp=function(){return function(e,t){var n=e.tr,r=e.doc,o=e.selection,i=e.schema,a=In(o),s=a.startFromOffset,l=a.endToOffset,u=a.startIndex;if(u>0){var c=r.child(u-1),d=c.nodeSize,p=c.textContent;return n.delete(s-d,s).split(n.mapping.map(l)).insert(n.mapping.map(l),it(i,p)),t(n),!0}return!1}},t.prototype.commands=function(){return{indent:this.indent(),outdent:this.outdent()}},t.prototype.keymaps=function(){return{Tab:this.indent(!0)(),"Shift-Tab":this.outdent(!0)(),"Mod-d":this.deleteLines(),"Mod-D":this.deleteLines(),"Alt-ArrowUp":this.moveUp(),"Alt-ArrowDown":this.moveDown()}},t}(yn),Sr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"text"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"schema",{get:function(){return{group:"inline"}},enumerable:!1,configurable:!0}),t}(yn),Dr=/^#{1,6}\s/,Or=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"heading"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"schema",{get:function(){return{attrs:{level:{default:1},seText:{default:!1}},toDOM:function(e){var t=e.attrs,n="heading|heading"+t.level;return t.seText&&(n+="|delimiter|setext"),["span",{class:nn.apply(void 0,n.split("|"))},0]}}},enumerable:!1,configurable:!0}),t.prototype.createHeadingText=function(e,t,n){for(var r=t.replace(n,"").trim(),o="";e>0;)o+="#",e-=1;return o+" "+r},t.prototype.commands=function(){var e=this;return function(t){return function(n,r){var o=t.level,i=In(n.selection),a=i.startFromOffset,s=i.endToOffset,l=lt({state:n,from:a,startIndex:i.startIndex,endIndex:i.endIndex,createText:function(t){var n=t.match(Dr),r=n?n[0]:"";return e.createHeadingText(o,t,r)}});return r(l.setSelection(at(l,l.mapping.map(s)))),!0}}},t}(or),Ir="```",Rr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"codeBlock"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:nn("code-block")},0]}}},enumerable:!1,configurable:!0}),t.prototype.commands=function(){return function(){return function(e,t){var n=e.selection,r=e.schema,o=e.tr,i=In(n),a=i.startFromOffset,s=i.endToOffset,l=it(r,Ir);return o.insert(a,l).split(a+3),o.split(o.mapping.map(s)).insert(o.mapping.map(s),l),t(o.setSelection(at(o,o.mapping.map(s)-5))),!0}}},t.prototype.keepIndentation=function(){var e=this;return function(t,n){var r=t.selection,o=t.tr,i=t.doc,a=t.schema,s=e.context.toastMark,l=In(r),u=l.startFromOffset,c=l.endToOffset,d=l.endIndex,p=l.from,f=l.to,h=ar(i,d);if(p===f&&h.trim()){var m=h.match(/^\s+/);if(function(e){return e&&"codeBlock"===e.type}(s.findFirstNodeAtLine(d+1))&&m){var v=m[0],g=h.slice(f-u);return ut(o,c,g,it(a,v+g)),n(o),!0}}return!1}},t.prototype.keymaps=function(){var e=this.commands()();return{"Shift-Mod-p":e,"Shift-Mod-P":e,Enter:this.keepIndentation()}},t}(or),Pr=/\||\s/g;function Hr(e,t){for(var n="|",r=0;r<e;r+=1)n+=t?" --- |":" |";return n}var Br=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"table"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:nn("table")},0]}}},enumerable:!1,configurable:!0}),t.prototype.extendTable=function(){var e=this;return function(t,n){var r=t.selection,o=t.doc,i=t.tr,a=t.schema;if(!r.empty)return!1;var s=In(r),l=s.endFromOffset,u=s.endToOffset,c=s.endIndex,d=s.to,p=ar(o,c),f=[c+1,d-l+1],h=bt(e.context.toastMark.findNodeAtPosition(f),(function(e){return yt(e)&&("tableDelimRow"===e.parent.type||"tableBody"===e.parent.parent.type)}));if(h){var m=!p.replace(Pr,"").trim(),v=Hr(h.parent.parent.parent.columns.length);return m?i.deleteRange(l,u).split(i.mapping.map(u)):i.split(u).insert(i.mapping.map(u),it(a,v)).setSelection(at(i,i.mapping.map(u)-2)),n(i),!0}return!1}},t.prototype.moveTableCell=function(e){var t=this;return function(n,r){var o=n.selection,i=n.tr,a=In(o),s=a.endFromOffset,l=[a.endIndex+1,a.to-s],u=bt(t.context.toastMark.findNodeAtPosition(l),(function(e){return yt(e)}));if(u){var c=u.parent,d=function(e){return e?{type:"next",parentType:"tableHead",childType:"firstChild"}:{type:"prev",parentType:"tableBody",childType:"lastChild"}}(e),p=d.type,f=d.parentType,h=d.childType,m=ft(u);if(u[p])m=ft(u[p])-1;else{var v=c[p]||c.parent.type!==f?c[p]:c.parent[p][h];if("next"===p)m+=(v?ft(v[h]):0)+2;else"prev"===p&&(m=v?-4:0)}return r(i.setSelection(at(i,s+m))),!0}return!1}},t.prototype.addTable=function(){return function(e){return function(t,n){var r=t.selection,o=t.tr,i=t.schema,a=e,s=a.columnCount,l=a.rowCount,u=In(r).endToOffset,c=function(e){return[Hr(e),Hr(e,!0)]}(s),d=function(e,t){for(var n=[],r=0;r<t;r+=1)n.push(Hr(e));return n}(s,l-1);return U(U([],c),d).forEach((function(e){o.split(o.mapping.map(u)).insert(o.mapping.map(u),it(i,e))})),n(o.setSelection(at(o,u+4))),!0}}},t.prototype.commands=function(){return{addTable:this.addTable()}},t.prototype.keymaps=function(){return{Enter:this.extendTable(),Tab:this.moveTableCell(!0),"Shift-Tab":this.moveTableCell(!1)}},t}(or),Fr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"thematicBreak"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:nn("thematic-break")},0]}}},enumerable:!1,configurable:!0}),t.prototype.hr=function(){return function(){return function(e,t){var n=e.selection,r=e.schema,o=e.tr,i=In(n),a=i.from,s=i.to,l=i.endToOffset,u=it(r,"***");return o.split(a).replaceWith(o.mapping.map(a),o.mapping.map(s),u).split(o.mapping.map(s)).setSelection(at(o,o.mapping.map(l))),t(o),!0}}},t.prototype.commands=function(){return{hr:this.hr()}},t.prototype.keymaps=function(){var e=this.hr()();return{"Mod-l":e,"Mod-L":e}},t}(or);function jr(e,t){var n=e.type;return t<=e.sourcepos[0][0]&&("codeBlock"===n||"heading"===n||n.match("table"))}var qr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"listItem"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"schema",{get:function(){return{attrs:{odd:{default:!1},even:{default:!1},listStyle:{default:!1}},toDOM:function(e){var t=e.attrs,n=t.odd,r=t.even,o="list-item";return t.listStyle&&(o+="|list-item-style"),n&&(o+="|list-item-odd"),r&&(o+="|list-item-even"),["span",{class:nn.apply(void 0,o.split("|"))},0]}}},enumerable:!1,configurable:!0}),t.prototype.extendList=function(){var e=this;return function(t,n){var r=t.selection,o=t.doc,i=t.schema,a=t.tr,s=e.context.toastMark,l=In(r),u=l.to,c=l.startFromOffset,d=l.endFromOffset,p=l.endIndex,f=l.endToOffset,h=ar(o,p);if(!ur.test(h)||r.from===c||!r.empty)return!1;if(!h.replace(pr,"").trim())a.deleteRange(d,f).split(a.mapping.map(f));else{var m=vr(h),v=s.findFirstNodeAtLine(p+1),g=h.slice(u-d),y={toastMark:s,mdNode:v,doc:o,line:p+1},b=xr[m](y),w=b.listSyntax,k=b.changedResults;if(null==k?void 0:k.length){a.split(u),k.unshift({text:w+g,line:p+1}),e.changeToListPerLine(a,k,{from:u,startLine:k[0].line,endLine:Ze(k).line});var C=a.mapping.map(f)-g.length;a.setSelection(at(a,C))}else{ut(a,f,g,it(i,w+g))}}return n(a),!0}},t.prototype.toList=function(e){var t=this;return function(){return function(n,r){for(var o=n.doc,i=n.tr,a=n.selection,s=t.context.toastMark,l=In(a),u=l.startIndex+1,c=l.endIndex+1,d=l.endToOffset,p=[],f=u;f<=c;f+=1){var h=s.findFirstNodeAtLine(f);if(h&&jr(h,f))break;if(-1===p.indexOf(f)){var m={toastMark:s,mdNode:h,doc:o,line:f,startLine:u},v=(mt(h)?kr[e](m):Cr[e](m)).changedResults,g=t.changeToListPerLine(i,v,{from:Rn(o,v[0].line-1).startOffset,startLine:v[0].line,endLine:Ze(v).line,indexDiff:1});d=Math.max(g,d),v&&(p=p.concat(v.map((function(e){return e.line}))))}}return r(i.setSelection(at(i,i.mapping.map(d)))),!0}}},t.prototype.changeToListPerLine=function(e,t,n){for(var r=n.from,o=n.startLine,i=n.endLine,a=n.indexDiff,s=void 0===a?0:a,l=0,u=function(n){var o=e.doc.child(n),i=o.nodeSize,a=o.content,u=e.mapping.map(r),d=u+a.size,p=t.filter((function(e){return e.line-s===n}))[0];p&&(e.replaceWith(u,d,it(c.context.schema,p.text)),l=Math.max(l,r+a.size)),r+=i},c=this,d=o-s;d<=i-s;d+=1)u(d);return l},t.prototype.toggleTask=function(){var e=this;return function(t,n){for(var r=t.selection,o=t.tr,i=t.doc,a=t.schema,s=e.context.toastMark,l=In(r),u=l.startIndex,c=l.endIndex,d=null,p=u;p<=c;p+=1){var f=s.findFirstNodeAtLine(p+1);if(mt(f)&&f.listData.task){var h=f.listData,m=h.checked,v=h.padding,g=m?" ":"x",y=f.sourcepos[0],b=Rn(i,y[0]-1).startOffset;b+=y[1]+v,d=o.replaceWith(b,b+1,a.text(g))}}return!!d&&(n(d),!0)}},t.prototype.commands=function(){return{bulletList:this.toList("bullet"),orderedList:this.toList("ordered"),taskList:this.toList("task")}},t.prototype.keymaps=function(){var e=this.toList("bullet")(),t=this.toList("ordered")(),n=this.toList("task")(),r=this.toggleTask();return{"Mod-u":e,"Mod-U":e,"Mod-o":t,"Mod-O":t,"alt-t":n,"alt-T":n,"Shift-Ctrl-x":r,"Shift-Ctrl-X":r,Enter:this.extendList()}},t}(or);function _r(e,t){return function(){return function(n,r){var o=n.tr,i=n.selection,a=xn(e)?e:function(t){return e.test(t)},s=t.length,l=o.doc,u=Ln(i),c=u[0],d=u[1],p=Math.max(c-s,1),f=Math.min(d+s,l.content.size-1),h=i.content(),m=h.content.textBetween(0,h.content.size,"\n"),v=l.textBetween(p,c,"\n"),g=l.textBetween(d,f,"\n");if(m=""+v+m+g,v&&g&&a(m))o.delete(f-s,f).delete(p,p+s);else{o.insertText(t,d).insertText(t,c);var y=i.empty?at(o,c+s):at(o,c+s,d+s);o.setSelection(y)}return r(o),!0}}}var zr=/^(\*{2}|_{2}).*([\s\S]*)\1$/m,Ur=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"strong"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:nn("strong")},0]}}},enumerable:!1,configurable:!0}),t.prototype.bold=function(){return _r(zr,"**")},t.prototype.commands=function(){return{bold:this.bold()}},t.prototype.keymaps=function(){var e=this.bold()();return{"Mod-b":e,"Mod-B":e}},t}(or),Vr=/^(~{2}).*([\s\S]*)\1$/m,$r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"strike"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:nn("strike")},0]}}},enumerable:!1,configurable:!0}),t.prototype.commands=function(){return _r(Vr,"~~")},t.prototype.keymaps=function(){var e=this.commands()();return{"Mod-s":e,"Mod-S":e}},t}(or),Wr=/^(\*|_).*([\s\S]*)\1$/m,Gr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"emph"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:nn("emph")},0]}}},enumerable:!1,configurable:!0}),t.prototype.italic=function(){return _r(Wr,"*")},t.prototype.commands=function(){return{italic:this.italic()}},t.prototype.keymaps=function(){var e=this.italic()();return{"Mod-i":e,"Mod-I":e}},t}(or),Xr=/^(`).*([\s\S]*)\1$/m,Zr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"code"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"schema",{get:function(){return{attrs:{start:{default:!1},end:{default:!1},marked:{default:!1}},toDOM:function(e){var t=e.attrs,n="code";return t.start&&(n+="|delimiter|start"),t.end&&(n+="|delimiter|end"),t.marked&&(n+="|marked-text"),["span",{class:nn.apply(void 0,n.split("|"))},0]}}},enumerable:!1,configurable:!0}),t.prototype.commands=function(){return _r(Xr,"`")},t.prototype.keymaps=function(){var e=this.commands()();return{"Shift-Mod-c":e,"Shift-Mod-C":e}},t}(or),Qr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"link"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"schema",{get:function(){return{attrs:{url:{default:!1},desc:{default:!1}},toDOM:function(e){var t=e.attrs,n="link";return t.url&&(n+="|link-url|marked-text"),t.desc&&(n+="|link-desc|marked-text"),["span",{class:nn.apply(void 0,n.split("|"))},0]}}},enumerable:!1,configurable:!0}),t.prototype.addLinkOrImage=function(e){return function(t){return function(n,r){var o=n.selection,i=n.tr,a=n.schema,s=Ln(o),l=s[0],u=s[1],c=t,d=c.linkText,p=c.altText,f=c.linkUrl,h=c.imageUrl,m=d,v=f,g="";return"image"===e&&(m=p,v=h,g="!"),g+="["+(m=Ve(m))+"]("+v+")",r(i.replaceWith(l,u,it(a,g))),!0}}},t.prototype.commands=function(){return{addImage:this.addLinkOrImage("image"),addLink:this.addLinkOrImage("link")}},t}(or),Kr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"taskDelimiter"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:nn("delimiter","list-item")},0]}}},enumerable:!1,configurable:!0}),t}(or),Yr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"delimiter"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:nn("delimiter")},0]}}},enumerable:!1,configurable:!0}),t}(or),Jr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"meta"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:nn("meta")},0]}}},enumerable:!1,configurable:!0}),t}(or),eo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"markedText"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:nn("marked-text")},0]}}},enumerable:!1,configurable:!0}),t}(or),to=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"tableCell"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:nn("table-cell")},0]}}},enumerable:!1,configurable:!0}),t}(or),no=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"html"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:nn("html")},0]}}},enumerable:!1,configurable:!0}),t}(or),ro="$$",oo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"customBlock"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:nn("custom-block")},0]}}},enumerable:!1,configurable:!0}),t.prototype.commands=function(){return function(e){return function(t,n){var r=t.selection,o=t.schema,i=t.tr,a=In(r),s=a.startFromOffset,l=a.endToOffset;if(!(null==e?void 0:e.info))return!1;var u="$$"+e.info,c=it(o,u),d=it(o,ro);return i.insert(s,c).split(s+u.length),i.split(i.mapping.map(l)).insert(i.mapping.map(l),d),n(i.setSelection(at(i,i.mapping.map(l)-4))),!0}}},t}(or),io=/x|backspace/i,ao=/^\[(\s*)(x?)(\s*)\](?:\s+)/i;function so(e){var t=e.schema,n=e.toastMark;return new g({props:{handleDOMEvents:{keyup:function(e,r){var o,i=e.state,a=i.doc,s=i.tr,l=i.selection;if(l.empty&&io.test(r.key)){var u=In(l),c=u.startIndex,d=u.startFromOffset,p=[c+1,u.from-d+1],f=bt(n.findNodeAtPosition(p),(function(e){var t;return"paragraph"===e.type&&"item"===(null===(t=e.parent)||void 0===t?void 0:t.type)}));if(null===(o=null==f?void 0:f.firstChild)||void 0===o?void 0:o.literal){var h=f.firstChild,m=h.literal.match(ao);if(m){var v=h.sourcepos[0],g=m[1],y=m[2],b=m[3],w=g.length+b.length,k=Rn(a,v[0]-1).startOffset,C=v[1]+k;if(y){var x=w?w+1:0;s.replaceWith(C,x+C,t.text(y)),e.dispatch(s)}else w||(s.insertText(" ",C),e.dispatch(s))}}}return!1}}}})}var lo="cut",uo=/\r\n|\n|\r/,co=function(e){function r(t,n){var r=e.call(this,t)||this,o=n.toastMark,i=n.useCommandShortcut,a=void 0===i||i,s=n.mdPlugins,l=void 0===s?[]:s;return r.editorType="markdown",r.el.classList.add("md-mode"),r.toastMark=o,r.extraPlugins=l,r.specs=r.createSpecs(),r.schema=r.createSchema(),r.context=r.createContext(),r.keymaps=r.createKeymaps(a),r.view=r.createView(),r.commands=r.createCommands(),r.specs.setContext(z(z({},r.context),{view:r.view})),r.createClipboard(),r.eventEmitter.listen("changePreviewTabWrite",(function(e){return r.toggleActive(!0,e)})),r.eventEmitter.listen("changePreviewTabPreview",(function(){return r.toggleActive(!1)})),r.initEvent(),r}return _(r,e),r.prototype.toggleActive=function(e,t){an(this.el,"active",e),e?t||this.focus():this.blur()},r.prototype.createClipboard=function(){var e=this;this.clipboard=document.createElement("textarea"),this.clipboard.className=tn("pseudo-clipboard"),this.clipboard.addEventListener("paste",(function(t){var n=t.clipboardData||window.clipboardData,r=n&&n.items;if(r){var o=rt(r).some((function(e){return"string"===e.kind&&"text/rtf"===e.type}));if(!o){var i=vn(r);i&&(t.preventDefault(),mn(e.eventEmitter,i,t.type))}}})),this.clipboard.addEventListener("input",(function(t){var n=t.target.value;e.replaceSelection(n),t.preventDefault(),t.target.value=""})),this.el.insertBefore(this.clipboard,this.view.dom)},r.prototype.createContext=function(){return{toastMark:this.toastMark,schema:this.schema,eventEmitter:this.eventEmitter}},r.prototype.createSpecs=function(){return new Mn([new rr,new Ar,new kn,new Sr,new Or,new lr,new Rr,new oo,new Br,new to,new Fr,new qr,new Ur,new $r,new Gr,new Zr,new Qr,new Yr,new Kr,new eo,new Jr,new no])},r.prototype.createPlugins=function(){return U([Yn(this.context),(e=this.context,t=e.toastMark,n=e.eventEmitter,new g({view:function(){return{update:function(e,r){var o=e.state,i=o.doc,a=o.selection;if(!(r&&r.doc.eq(i)&&r.selection.eq(a))){var s=a.from,l=o.doc.resolve(s).start(),u=s-l;s===l&&(u+=1);var c=[o.doc.content.findIndex(s).index+1,u],d=t.findNodeAtPosition(c),p=nr(d);n.emit("changeToolbarState",{cursorPos:c,mdNode:d,toolbarState:p}),n.emit("setFocusedNode",d)}}}}})),so(this.context)],this.createPluginProps()).concat(this.defaultPlugins);var e,t,n},r.prototype.createView=function(){var e=this;return new u(this.el,{state:this.createState(),dispatchTransaction:function(t){e.updateMarkdown(t);var n=e.view.state.applyTransaction(t).state;e.view.updateState(n),e.emitChangeEvent(t)},handleKeyDown:function(t,n){return(n.metaKey||n.ctrlKey)&&"V"===n.key.toUpperCase()&&e.clipboard.focus(),e.eventEmitter.emit("keydown",e.editorType,n),!1},handleDOMEvents:{copy:function(t,n){return e.captureCopy(n)},cut:function(t,n){return e.captureCopy(n,lo)},scroll:function(){return e.eventEmitter.emit("scroll","editor"),!0},keyup:function(t,n){return e.eventEmitter.emit("keyup",e.editorType,n),!1}},nodeViews:{widget:bn}})},r.prototype.createCommands=function(){return this.specs.commands(this.view)},r.prototype.captureCopy=function(e,t){e.preventDefault();var n=this.view.state,r=n.selection,o=n.tr;if(r.empty)return!0;var i=this.getChanged(r.content());return e.clipboardData?e.clipboardData.setData("text/plain",i):window.clipboardData.setData("Text",i),t===lo&&this.view.dispatch(o.deleteSelection().scrollIntoView().setMeta("uiEvent",lo)),!0},r.prototype.updateMarkdown=function(e){var t=this;e.docChanged&&e.steps.forEach((function(n,r){if(n.slice&&!(n instanceof c)){var o=e.docs[r],i=[n.from,n.to],a=Sn(o,i[0],i[1]),s=a[0],l=a[1],u=t.getChanged(n.slice);s[0]===l[0]&&s[1]===l[1]&&""===u&&(u="\n");var d=t.toastMark.editMarkdown(s,l,u);t.eventEmitter.emit("updatePreview",d),e.setMeta("editResult",d).scrollIntoView()}}))},r.prototype.getChanged=function(e){var t="",n=e.content.size;return e.content.nodesBetween(0,n,(function(e,r){e.isText?t+=e.text.slice(Math.max(0,r)-r,n-r):e.isBlock&&r>0&&(t+="\n")})),t},r.prototype.setSelection=function(e,t){void 0===t&&(t=e);var n=this.view.state.tr,r=On(n.doc,e,t),o=r[0],i=r[1];this.view.dispatch(n.setSelection(at(n,o,i)).scrollIntoView())},r.prototype.replaceSelection=function(e,r,o){var i,a=this.view.state,s=a.tr,l=a.schema,u=a.doc,c=e.split(uo).map((function(e){return ot(l,Rt(e,l))})),d=new n(t.from(c),1,1);if(this.focus(),r&&o){var p=On(u,r,o),f=p[0],h=p[1];i=s.replaceRange(f,h,d)}else i=s.replaceSelection(d);this.view.dispatch(i.scrollIntoView())},r.prototype.deleteSelection=function(e,t){var n,r=this.view.state,o=r.tr,i=r.doc;if(e&&t){var a=On(i,e,t),s=a[0],l=a[1];n=o.deleteRange(s,l)}else n=o.deleteSelection();this.view.dispatch(n.scrollIntoView())},r.prototype.getSelectedText=function(e,t){var n=this.view.state,r=n.doc,o=n.selection,i=o.from,a=o.to;if(e&&t){var s=On(r,e,t);i=s[0],a=s[1]}return r.textBetween(i,a,"\n")},r.prototype.getSelection=function(){var e=this.view.state.selection,t=e.from,n=e.to;return Sn(this.view.state.tr.doc,t,n)},r.prototype.setMarkdown=function(e,t){void 0===t&&(t=!0);var n=e.split(uo),r=this.view.state,o=r.tr,i=r.doc,a=r.schema,s=n.map((function(e){return ot(a,Rt(e,a))}));this.view.dispatch(o.replaceWith(0,i.content.size,s)),t&&this.moveCursorToEnd(!0)},r.prototype.addWidget=function(e,t,n){var r=this.view.state,o=r.tr,i=r.doc,a=r.selection,s=n?On(i,n,n)[0]:a.to;this.view.dispatch(o.setMeta("widget",{pos:s,node:e,style:t}))},r.prototype.replaceWithWidget=function(e,t,n){var r=this.view.state,o=r.tr,i=r.schema,a=On(r.doc,e,t),s=Rt(n,i);this.view.dispatch(o.replaceWith(a[0],a[1],s))},r.prototype.getRangeInfoOfNode=function(e){var t=this.view.state,n=t.doc,r=t.selection,o=e||Sn(n,r.from)[0],i=this.toastMark.findNodeAtPosition(o);return"text"===i.type&&"paragraph"!==i.parent.type&&(i=i.parent),i.sourcepos[1][1]+=1,{range:i.sourcepos,type:i.type}},r.prototype.getMarkdown=function(){return this.toastMark.getLineTexts().map((function(e){return Nt(e)})).join("\n")},r.prototype.getToastMark=function(){return this.toastMark},r}(Cn),po="_feEventKey";var fo=function(e,t){var n,r=e[po];return r||(r=e[po]={}),(n=r[t])||(n=r[t]=[]),n},ho=G,mo=J,vo=fo;function go(e,t,n){var r,o=vo(e,t);n?(mo(o,(function(o,i){return n!==o.handler||(yo(e,t,o.wrappedHandler),r=i,!1)})),o.splice(r,1)):(mo(o,(function(n){yo(e,t,n.wrappedHandler)})),o.splice(0,o.length))}function yo(e,t,n){"removeEventListener"in e?e.removeEventListener(t,n):"detachEvent"in e&&e.detachEvent("on"+t,n)}var bo=function(e,t,n){ho(t)?mo(t.split(/\s+/g),(function(t){go(e,t,n)})):mo(t,(function(t,n){go(e,n,t)}))},wo=G,ko=J,Co=fo;function xo(e,t,n,r){function o(t){n.call(r||e,t||window.event)}"addEventListener"in e?e.addEventListener(t,o):"attachEvent"in e&&e.attachEvent("on"+t,o),function(e,t,n,r){var o=Co(e,t),i=!1;ko(o,(function(e){return e.handler!==n||(i=!0,!1)})),i||o.push({handler:n,wrappedHandler:r})}(e,t,n,o)}var To=function(e,t,n,r){wo(t)?ko(t.split(/\s+/g),(function(t){xo(e,t,n,r)})):ko(t,(function(t,r){xo(e,r,t,n)}))},Eo=function(e,t){return Eo=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Eo(e,t)};
|
22
|
-
/*! *****************************************************************************
|
23
|
-
Copyright (c) Microsoft Corporation.
|
24
|
-
|
25
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
26
|
-
purpose with or without fee is hereby granted.
|
27
|
-
|
28
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
29
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
30
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
31
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
32
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
33
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
34
|
-
PERFORMANCE OF THIS SOFTWARE.
|
35
|
-
***************************************************************************** */function Mo(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Eo(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Lo=function(){return Lo=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Lo.apply(this,arguments)};function No(e,t,n){if(2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}var Ao="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},So={};function Do(e,t,n){var r,o,i,a,s,l="";for("string"!=typeof t&&(n=t,t=Do.defaultChars),void 0===n&&(n=!0),s=function(e){var t,n,r=So[e];if(r)return r;for(r=So[e]=[],t=0;t<128;t++)n=String.fromCharCode(t),/^[0-9a-z]$/i.test(n)?r.push(n):r.push("%"+("0"+t.toString(16).toUpperCase()).slice(-2));for(t=0;t<e.length;t++)r[e.charCodeAt(t)]=e[t];return r}(t),r=0,o=e.length;r<o;r++)if(i=e.charCodeAt(r),n&&37===i&&r+2<o&&/^[0-9a-f]{2}$/i.test(e.slice(r+1,r+3)))l+=e.slice(r,r+3),r+=2;else if(i<128)l+=s[i];else if(i>=55296&&i<=57343){if(i>=55296&&i<=56319&&r+1<o&&(a=e.charCodeAt(r+1))>=56320&&a<=57343){l+=encodeURIComponent(e[r]+e[r+1]),r++;continue}l+="%EF%BF%BD"}else l+=encodeURIComponent(e[r]);return l}Do.defaultChars=";/?:@&=+$,-_.!~*'()#",Do.componentChars="-_.!~*'()";var Oo=Do,Io={},Ro={},Po={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",amp:"&",AMP:"&",andand:"⩕",And:"⩓",and:"∧",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angmsd:"∡",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",apacir:"⩯",ap:"≈",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxHd:"╤",boxhD:"╥",boxHD:"╦",boxhu:"┴",boxHu:"╧",boxhU:"╨",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsolb:"⧅",bsol:"\\",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",capand:"⩄",capbrcup:"⩉",capcap:"⩋",cap:"∩",Cap:"⋒",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cir:"○",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cup:"∪",Cup:"⋓",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",Darr:"↡",dArr:"⇓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",ddagger:"‡",ddarr:"⇊",DD:"ⅅ",dd:"ⅆ",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrowBar:"⤓",downarrow:"↓",DownArrow:"↓",Downarrow:"⇓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVectorBar:"⥖",DownLeftVector:"↽",DownRightTeeVector:"⥟",DownRightVectorBar:"⥗",DownRightVector:"⇁",DownTeeArrow:"↧",DownTee:"⊤",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",Ecirc:"Ê",ecirc:"ê",ecir:"≖",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",edot:"ė",eDot:"≑",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp13:" ",emsp14:" ",emsp:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",ge:"≥",gE:"≧",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",gescc:"⪩",ges:"⩾",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gla:"⪥",gl:"≷",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gt:">",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",Im:"ℑ",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅",in:"∈",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺",int:"∫",Int:"∬",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"",InvisibleTimes:"",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",midast:"*",midcir:"⫰",mid:"∣",middot:"·",minusb:"⊟",minus:"−",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"♮",naturals:"ℕ",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"≐̸",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"⩔",or:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",Re:"ℜ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoustache:"⎱",rmoust:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:" ",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",Vcy:"В",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"∨",Vee:"⋁",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"",Zeta:"Ζ",zeta:"ζ",zfr:"𝔷",Zfr:"ℨ",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",Zscr:"𝒵",zscr:"𝓏",zwj:"",zwnj:""},Ho={Aacute:"Á",aacute:"á",Acirc:"Â",acirc:"â",acute:"´",AElig:"Æ",aelig:"æ",Agrave:"À",agrave:"à",amp:"&",AMP:"&",Aring:"Å",aring:"å",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",brvbar:"¦",Ccedil:"Ç",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",COPY:"©",curren:"¤",deg:"°",divide:"÷",Eacute:"É",eacute:"é",Ecirc:"Ê",ecirc:"ê",Egrave:"È",egrave:"è",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",GT:">",Iacute:"Í",iacute:"í",Icirc:"Î",icirc:"î",iexcl:"¡",Igrave:"Ì",igrave:"ì",iquest:"¿",Iuml:"Ï",iuml:"ï",laquo:"«",lt:"<",LT:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",Ntilde:"Ñ",ntilde:"ñ",Oacute:"Ó",oacute:"ó",Ocirc:"Ô",ocirc:"ô",Ograve:"Ò",ograve:"ò",ordf:"ª",ordm:"º",Oslash:"Ø",oslash:"ø",Otilde:"Õ",otilde:"õ",Ouml:"Ö",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',QUOT:'"',raquo:"»",reg:"®",REG:"®",sect:"§",shy:"",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",THORN:"Þ",thorn:"þ",times:"×",Uacute:"Ú",uacute:"ú",Ucirc:"Û",ucirc:"û",Ugrave:"Ù",ugrave:"ù",uml:"¨",Uuml:"Ü",uuml:"ü",Yacute:"Ý",yacute:"ý",yen:"¥",yuml:"ÿ"},Bo={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'},Fo={},jo=Ao&&Ao.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Fo,"__esModule",{value:!0});var qo=jo({0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376}),_o=String.fromCodePoint||function(e){var t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+=String.fromCharCode(e)};Fo.default=function(e){return e>=55296&&e<=57343||e>1114111?"�":(e in qo.default&&(e=qo.default[e]),_o(e))};var zo=Ao&&Ao.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ro,"__esModule",{value:!0}),Ro.decodeHTML=Ro.decodeHTMLStrict=Ro.decodeXML=void 0;var Uo=zo(Po),Vo=zo(Ho),$o=zo(Bo),Wo=zo(Fo),Go=/&(?:[a-zA-Z0-9]+|#[xX][\da-fA-F]+|#\d+);/g;function Xo(e){var t=Qo(e);return function(e){return String(e).replace(Go,t)}}Ro.decodeXML=Xo($o.default),Ro.decodeHTMLStrict=Xo(Uo.default);var Zo=function(e,t){return e<t?1:-1};function Qo(e){return function(t){if("#"===t.charAt(1)){var n=t.charAt(2);return"X"===n||"x"===n?Wo.default(parseInt(t.substr(3),16)):Wo.default(parseInt(t.substr(2),10))}return e[t.slice(1,-1)]||t}}Ro.decodeHTML=function(){for(var e=Object.keys(Vo.default).sort(Zo),t=Object.keys(Uo.default).sort(Zo),n=0,r=0;n<t.length;n++)e[r]===t[n]?(t[n]+=";?",r++):t[n]+=";";var o=new RegExp("&(?:"+t.join("|")+"|#[xX][\\da-fA-F]+;?|#\\d+;?)","g"),i=Qo(Uo.default);function a(e){return";"!==e.substr(-1)&&(e+=";"),i(e)}return function(e){return String(e).replace(o,a)}}();var Ko={},Yo=Ao&&Ao.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ko,"__esModule",{value:!0}),Ko.escapeUTF8=Ko.escape=Ko.encodeNonAsciiHTML=Ko.encodeHTML=Ko.encodeXML=void 0;var Jo=ii(Yo(Bo).default),ei=ai(Jo);Ko.encodeXML=di(Jo);var ti,ni,ri=ii(Yo(Po).default),oi=ai(ri);function ii(e){return Object.keys(e).sort().reduce((function(t,n){return t[e[n]]="&"+n+";",t}),{})}function ai(e){for(var t=[],n=[],r=0,o=Object.keys(e);r<o.length;r++){var i=o[r];1===i.length?t.push("\\"+i):n.push(i)}t.sort();for(var a=0;a<t.length-1;a++){for(var s=a;s<t.length-1&&t[s].charCodeAt(1)+1===t[s+1].charCodeAt(1);)s+=1;var l=1+s-a;l<3||t.splice(a,l,t[a]+"-"+t[s])}return n.unshift("["+t.join("")+"]"),new RegExp(n.join("|"),"g")}Ko.encodeHTML=(ti=ri,ni=oi,function(e){return e.replace(ni,(function(e){return ti[e]})).replace(si,ui)}),Ko.encodeNonAsciiHTML=di(ri);var si=/(?:[\x80-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g,li=null!=String.prototype.codePointAt?function(e){return e.codePointAt(0)}:function(e){return 1024*(e.charCodeAt(0)-55296)+e.charCodeAt(1)-56320+65536};function ui(e){return"&#x"+(e.length>1?li(e):e.charCodeAt(0)).toString(16).toUpperCase()+";"}var ci=new RegExp(ei.source+"|"+si.source,"g");function di(e){return function(t){return t.replace(ci,(function(t){return e[t]||ui(t)}))}}Ko.escape=function(e){return e.replace(ci,ui)},Ko.escapeUTF8=function(e){return e.replace(ei,ui)},function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.decodeXMLStrict=e.decodeHTML5Strict=e.decodeHTML4Strict=e.decodeHTML5=e.decodeHTML4=e.decodeHTMLStrict=e.decodeHTML=e.decodeXML=e.encodeHTML5=e.encodeHTML4=e.escapeUTF8=e.escape=e.encodeNonAsciiHTML=e.encodeHTML=e.encodeXML=e.encode=e.decodeStrict=e.decode=void 0;var t=Ro,n=Ko;e.decode=function(e,n){return(!n||n<=0?t.decodeXML:t.decodeHTML)(e)},e.decodeStrict=function(e,n){return(!n||n<=0?t.decodeXML:t.decodeHTMLStrict)(e)},e.encode=function(e,t){return(!t||t<=0?n.encodeXML:n.encodeHTML)(e)};var r=Ko;Object.defineProperty(e,"encodeXML",{enumerable:!0,get:function(){return r.encodeXML}}),Object.defineProperty(e,"encodeHTML",{enumerable:!0,get:function(){return r.encodeHTML}}),Object.defineProperty(e,"encodeNonAsciiHTML",{enumerable:!0,get:function(){return r.encodeNonAsciiHTML}}),Object.defineProperty(e,"escape",{enumerable:!0,get:function(){return r.escape}}),Object.defineProperty(e,"escapeUTF8",{enumerable:!0,get:function(){return r.escapeUTF8}}),Object.defineProperty(e,"encodeHTML4",{enumerable:!0,get:function(){return r.encodeHTML}}),Object.defineProperty(e,"encodeHTML5",{enumerable:!0,get:function(){return r.encodeHTML}});var o=Ro;Object.defineProperty(e,"decodeXML",{enumerable:!0,get:function(){return o.decodeXML}}),Object.defineProperty(e,"decodeHTML",{enumerable:!0,get:function(){return o.decodeHTML}}),Object.defineProperty(e,"decodeHTMLStrict",{enumerable:!0,get:function(){return o.decodeHTMLStrict}}),Object.defineProperty(e,"decodeHTML4",{enumerable:!0,get:function(){return o.decodeHTML}}),Object.defineProperty(e,"decodeHTML5",{enumerable:!0,get:function(){return o.decodeHTML}}),Object.defineProperty(e,"decodeHTML4Strict",{enumerable:!0,get:function(){return o.decodeHTMLStrict}}),Object.defineProperty(e,"decodeHTML5Strict",{enumerable:!0,get:function(){return o.decodeHTMLStrict}}),Object.defineProperty(e,"decodeXMLStrict",{enumerable:!0,get:function(){return o.decodeXML}})}(Io);var pi="&(?:#x[a-f0-9]{1,6}|#[0-9]{1,7}|[a-z][a-z0-9]{1,31});",fi=/[\\&]/,hi="[!\"#$%&'()*+,./:;<=>?@[\\\\\\]^_`{|}~-]",mi=new RegExp("\\\\"+hi+"|"+pi,"gi"),vi=new RegExp('[&<>"]',"g"),gi=function(e){return 92===e.charCodeAt(0)?e.charAt(1):Io.decodeHTML(e)};function yi(e){return fi.test(e)?e.replace(mi,gi):e}function bi(e){try{return Oo(e)}catch(t){return e}}function wi(e){switch(e){case"&":return"&";case"<":return"<";case">":return">";case'"':return""";default:return e}}function ki(e){return vi.test(e)?e.replace(vi,wi):e}function Ci(e,t){for(var n=[],r=0;r<t;r++)n.push(e);return n.join("")}function xi(e){return!e||!/[^ \t]+/.test(e)}var Ti=function(){function e(e){this.current=e,this.root=e,this.entering=!0}return e.prototype.next=function(){var e=this.current,t=this.entering;if(null===e)return null;var n=Ei(e);return t&&n?e.firstChild?(this.current=e.firstChild,this.entering=!0):this.entering=!1:e===this.root?this.current=null:null===e.next?(this.current=e.parent,this.entering=!1):(this.current=e.next,this.entering=!0),{entering:t,node:e}},e.prototype.resumeAt=function(e,t){this.current=e,this.entering=!0===t},e}();function Ei(e){switch(e.type){case"document":case"blockQuote":case"list":case"item":case"paragraph":case"heading":case"emph":case"strong":case"strike":case"link":case"image":case"table":case"tableHead":case"tableBody":case"tableRow":case"tableCell":case"tableDelimRow":case"customInline":return!0;default:return!1}}var Mi=1,Li={};function Ni(e){delete Li[e]}var Ai=function(){function e(e,t){this.parent=null,this.prev=null,this.next=null,this.firstChild=null,this.lastChild=null,this.literal=null,this.id="document"===e?-1:Mi++,this.type=e,this.sourcepos=t,Li[this.id]=this}return e.prototype.isContainer=function(){return Ei(this)},e.prototype.unlink=function(){this.prev?this.prev.next=this.next:this.parent&&(this.parent.firstChild=this.next),this.next?this.next.prev=this.prev:this.parent&&(this.parent.lastChild=this.prev),this.parent=null,this.next=null,this.prev=null},e.prototype.replaceWith=function(e){this.insertBefore(e),this.unlink()},e.prototype.insertAfter=function(e){e.unlink(),e.next=this.next,e.next&&(e.next.prev=e),e.prev=this,this.next=e,this.parent&&(e.parent=this.parent,e.next||(e.parent.lastChild=e))},e.prototype.insertBefore=function(e){e.unlink(),e.prev=this.prev,e.prev&&(e.prev.next=e),e.next=this,this.prev=e,e.parent=this.parent,e.prev||(e.parent.firstChild=e)},e.prototype.appendChild=function(e){e.unlink(),e.parent=this,this.lastChild?(this.lastChild.next=e,e.prev=this.lastChild,this.lastChild=e):(this.firstChild=e,this.lastChild=e)},e.prototype.prependChild=function(e){e.unlink(),e.parent=this,this.firstChild?(this.firstChild.prev=e,e.next=this.firstChild,this.firstChild=e):(this.firstChild=e,this.lastChild=e)},e.prototype.walker=function(){return new Ti(this)},e}(),Si=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.open=!0,r.lineOffsets=null,r.stringContent=null,r.lastLineBlank=!1,r.lastLineChecked=!1,r.type=t,r}return Mo(t,e),t}(Ai),Di=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.listData=null,t}return Mo(t,e),t}(Si),Oi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.level=0,t.headingType="atx",t}return Mo(t,e),t}(Si),Ii=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.isFenced=!1,t.fenceChar=null,t.fenceLength=0,t.fenceOffset=-1,t.info=null,t.infoPadding=0,t}return Mo(t,e),t}(Si),Ri=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.columns=[],t}return Mo(t,e),t}(Si),Pi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.startIdx=0,t.endIdx=0,t.paddingLeft=0,t.paddingRight=0,t.ignored=!1,t}return Mo(t,e),t}(Si),Hi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.title="",t.dest="",t.label="",t}return Mo(t,e),t}(Si),Bi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.syntaxLength=0,t.offset=-1,t.info="",t}return Mo(t,e),t}(Si),Fi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.htmlBlockType=-1,t}return Mo(t,e),t}(Si),ji=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.destination=null,t.title=null,t.extendedAutolink=!1,t}return Mo(t,e),t}(Ai),qi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.tickCount=0,t}return Mo(t,e),t}(Ai),_i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.info="",t}return Mo(t,e),t}(Ai);function zi(e,t){switch(e){case"heading":return new Oi(e,t);case"list":case"item":return new Di(e,t);case"link":case"image":return new ji(e,t);case"codeBlock":return new Ii(e,t);case"htmlBlock":return new Fi(e,t);case"table":return new Ri(e,t);case"tableCell":return new Pi(e,t);case"document":case"paragraph":case"blockQuote":case"thematicBreak":case"tableRow":case"tableBody":case"tableHead":case"frontMatter":return new Si(e,t);case"code":return new qi(e,t);case"refDef":return new Hi(e,t);case"customBlock":return new Bi(e,t);case"customInline":return new _i(e,t);default:return new Ai(e,t)}}function Ui(e){return"codeBlock"===e.type}function Vi(e){return"list"===e.type}function $i(e){return"refDef"===e.type}function Wi(e){return"customBlock"===e.type}function Gi(e,t){var n=zi("text",t);return n.literal=e,n}var Xi,Zi="[A-Za-z][A-Za-z0-9-]*",Qi="<"+Zi+"(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*/?>",Ki="</"+Zi+"\\s*[>]",Yi=new RegExp("^"+("(?:"+Qi+"|"+Ki+"|\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e|[<][?].*?[?][>]|<![A-Z]+\\s+[^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)"),"i");if(String.fromCodePoint)Xi=function(e){try{return String.fromCodePoint(e)}catch(e){if(e instanceof RangeError)return String.fromCharCode(65533);throw e}};else{var Ji=String.fromCharCode,ea=Math.floor;Xi=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n,r,o=[],i=-1,a=e.length;if(!a)return"";for(var s="";++i<a;){var l=Number(e[i]);if(!isFinite(l)||l<0||l>1114111||ea(l)!==l)return String.fromCharCode(65533);l<=65535?o.push(l):(n=55296+((l-=65536)>>10),r=l%1024+56320,o.push(n,r)),(i+1===a||o.length>16384)&&(s+=Ji.apply(void 0,o),o.length=0)}return s}}var ta=Xi,na="(?:[w-]+.)*[A-Za-z0-9-]+.[A-Za-z0-9-]+",ra="[^<\\s]*[^<?!.,:*_?~\\s]",oa="[\\w.+-]+@(?:[\\w-]+\\.)+[\\w-]+";function ia(e){var t=/\)+$/.exec(e);if(t){for(var n=0,r=0,o=e;r<o.length;r++){var i=o[r];"("===i?n<0?n=1:n+=1:")"===i&&(n-=1)}if(n<0){var a=Math.min(-n,t[0].length);return e.substring(0,e.length-a)}}return e}function aa(e){return e.replace(/&[A-Za-z0-9]+;$/,"")}function sa(e){return No(No([],function(e){for(var t,n=new RegExp("(www|https?://)."+na+ra,"g"),r=[];t=n.exec(e);){var o=aa(ia(t[0])),i="www"===t[1]?"http://":"";r.push({text:o,range:[t.index,t.index+o.length-1],url:""+i+o})}return r}(e)),function(e){for(var t,n=new RegExp(oa,"g"),r=[];t=n.exec(e);){var o=t[0];/[_-]+$/.test(o)||r.push({text:o,range:[t.index,t.index+o.length-1],url:"mailto:"+o})}return r}(e)).sort((function(e,t){return e.range[0]-t.range[0]}))}function la(e){return e[e.length-1]}function ua(e){return e.slice(1,e.length-1).trim().replace(/[ \t\r\n]+/," ").toLowerCase().toUpperCase()}function ca(e,t){Object.keys(e).forEach((function(n){t(n,e[n])}))}function da(e){return!Object.keys(e).length}var pa=126,fa=39,ha=34,ma=36,va="\\\\"+hi,ga=new RegExp(/[!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\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\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\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]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/),ya=new RegExp('^(?:"('+va+'|[^"\\x00])*"|\'('+va+"|[^'\\x00])*'|\\(("+va+"|[^()\\x00])*\\))"),ba=/^(?:<(?:[^<>\n\\\x00]|\\.)*>)/,wa=new RegExp("^"+hi),ka=new RegExp("^"+pi,"i"),Ca=/`+/,xa=/^`+/,Ta=/\.\.\./g,Ea=/--+/g,Ma=/^<([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])?)*)>/,La=/^<[A-Za-z][A-Za-z0-9.+-]{1,31}:[^<>\x00-\x20]*>/i,Na=/^ *(?:\n *)?/,Aa=/^[ \t\n\x0b\x0c\x0d]/,Sa=/^\s/,Da=/ *$/,Oa=/^ */,Ia=/^ *(?:\n|$)/,Ra=/^\[(?:[^\\\[\]]|\\.){0,1000}\]/,Pa=/^[^\n`\[\]\\!<&*_'"~$]+/m,Ha=function(){function e(e){this.subject="",this.delimiters=null,this.brackets=null,this.pos=0,this.lineStartNum=0,this.lineIdx=0,this.lineOffsets=[0],this.linePosOffset=0,this.refMap={},this.refLinkCandidateMap={},this.refDefCandidateMap={},this.options=e}return e.prototype.sourcepos=function(e,t){var n=this.linePosOffset+this.lineOffsets[this.lineIdx],r=this.lineStartNum+this.lineIdx,o=[r,e+n];return"number"==typeof t?[o,[r,t+n]]:o},e.prototype.nextLine=function(){this.lineIdx+=1,this.linePosOffset=-this.pos},e.prototype.match=function(e){var t=e.exec(this.subject.slice(this.pos));return null===t?null:(this.pos+=t.index+t[0].length,t[0])},e.prototype.peek=function(){return this.pos<this.subject.length?this.subject.charCodeAt(this.pos):-1},e.prototype.spnl=function(){return this.match(Na),!0},e.prototype.parseBackticks=function(e){var t=this.pos+1,n=this.match(xa);if(null===n)return!1;for(var r,o=this.pos;null!==(r=this.match(Ca));)if(r===n){var i=this.subject.slice(o,this.pos-n.length),a=this.sourcepos(t,this.pos),s=i.split("\n");if(s.length>1){var l=la(s);this.lineIdx+=s.length-1,this.linePosOffset=-(this.pos-l.length-n.length),a[1]=this.sourcepos(this.pos),i=s.join(" ")}var u=zi("code",a);return i.length>0&&null!==i.match(/[^ ]/)&&" "==i[0]&&" "==i[i.length-1]?u.literal=i.slice(1,i.length-1):u.literal=i,u.tickCount=n.length,e.appendChild(u),!0}return this.pos=o,e.appendChild(Gi(n,this.sourcepos(t,this.pos-1))),!0},e.prototype.parseBackslash=function(e){var t,n=this.subject;this.pos+=1;var r=this.pos;return 10===this.peek()?(this.pos+=1,t=zi("linebreak",this.sourcepos(this.pos-1,this.pos)),e.appendChild(t),this.nextLine()):wa.test(n.charAt(this.pos))?(e.appendChild(Gi(n.charAt(this.pos),this.sourcepos(r,this.pos))),this.pos+=1):e.appendChild(Gi("\\",this.sourcepos(r,r))),!0},e.prototype.parseAutolink=function(e){var t,n,r,o=this.pos+1;return(t=this.match(Ma))?(n=t.slice(1,t.length-1),(r=zi("link",this.sourcepos(o,this.pos))).destination=bi("mailto:"+n),r.title="",r.appendChild(Gi(n,this.sourcepos(o+1,this.pos-1))),e.appendChild(r),!0):!!(t=this.match(La))&&(n=t.slice(1,t.length-1),(r=zi("link",this.sourcepos(o,this.pos))).destination=bi(n),r.title="",r.appendChild(Gi(n,this.sourcepos(o+1,this.pos-1))),e.appendChild(r),!0)},e.prototype.parseHtmlTag=function(e){var t=this.pos+1,n=this.match(Yi);if(null===n)return!1;var r=zi("htmlInline",this.sourcepos(t,this.pos));return r.literal=n,e.appendChild(r),!0},e.prototype.scanDelims=function(e){var t=0,n=this.pos;if(e===fa||e===ha)t++,this.pos++;else for(;this.peek()===e;)t++,this.pos++;if(0===t||t<2&&(e===pa||e===ma))return this.pos=n,null;var r,o=0===n?"\n":this.subject.charAt(n-1),i=this.peek();r=-1===i?"\n":ta(i);var a,s,l=Sa.test(r),u=ga.test(r),c=Sa.test(o),d=ga.test(o),p=!l&&(!u||c||d),f=!c&&(!d||l||u);return 95===e?(a=p&&(!f||d),s=f&&(!p||u)):e===fa||e===ha?(a=p&&!f,s=f):e===ma?(a=!l,s=!c):(a=p,s=f),this.pos=n,{numdelims:t,canOpen:a,canClose:s}},e.prototype.handleDelim=function(e,t){var n=this.scanDelims(e);if(!n)return!1;var r=n.numdelims,o=this.pos+1;this.pos+=r;var i=Gi(e===fa?"’":e===ha?"“":this.subject.slice(o-1,this.pos),this.sourcepos(o,this.pos));return t.appendChild(i),(n.canOpen||n.canClose)&&(this.options.smart||e!==fa&&e!==ha)&&(this.delimiters={cc:e,numdelims:r,origdelims:r,node:i,previous:this.delimiters,next:null,canOpen:n.canOpen,canClose:n.canClose},this.delimiters.previous&&(this.delimiters.previous.next=this.delimiters)),!0},e.prototype.removeDelimiter=function(e){null!==e.previous&&(e.previous.next=e.next),null===e.next?this.delimiters=e.previous:e.next.previous=e.previous},e.prototype.removeDelimitersBetween=function(e,t){e.next!==t&&(e.next=t,t.previous=e)},e.prototype.processEmphasis=function(e){var t,n,r,o,i,a,s,l=!1,u=((t={})[95]=[e,e,e],t[42]=[e,e,e],t[39]=[e],t[34]=[e],t[126]=[e],t[36]=[e],t);for(r=this.delimiters;null!==r&&r.previous!==e;)r=r.previous;for(;null!==r;){var c=r.cc,d=95===c||42===c;if(r.canClose){for(n=r.previous,s=!1;null!==n&&n!==e&&n!==u[c][d?r.origdelims%3:0];){if(l=d&&(r.canOpen||n.canClose)&&r.origdelims%3!=0&&(n.origdelims+r.origdelims)%3==0,n.cc===r.cc&&n.canOpen&&!l){s=!0;break}n=n.previous}if(o=r,d||c===pa||c===ma)if(s){if(n){var p=r.numdelims>=2&&n.numdelims>=2?2:1,f=d?0:1;i=n.node,a=r.node;var h=d?1===p?"emph":"strong":"strike";c===ma&&(h="customInline");var m=zi(h),v=i.sourcepos[1],g=a.sourcepos[0];m.sourcepos=[[v[0],v[1]-p+1],[g[0],g[1]+p-1]],i.sourcepos[1][1]-=p,a.sourcepos[0][1]+=p,i.literal=i.literal.slice(p),a.literal=a.literal.slice(p),n.numdelims-=p,r.numdelims-=p;for(var y=i.next,b=void 0;y&&y!==a;)b=y.next,y.unlink(),m.appendChild(y),y=b;if(c===ma){var w=m.firstChild,k=w.literal||"",C=k.split(/\s/)[0];m.info=C,k.length<=C.length?w.unlink():(w.sourcepos[0][1]+=C.length,w.literal=k.replace(C+" ",""))}if(i.insertAfter(m),this.removeDelimitersBetween(n,r),n.numdelims<=f&&(0===n.numdelims&&i.unlink(),this.removeDelimiter(n)),r.numdelims<=f){0===r.numdelims&&a.unlink();var x=r.next;this.removeDelimiter(r),r=x}}}else r=r.next;else c===fa?(r.node.literal="’",s&&(n.node.literal="‘"),r=r.next):c===ha&&(r.node.literal="”",s&&(n.node.literal="“"),r=r.next);s||(u[c][d?o.origdelims%3:0]=o.previous,o.canOpen||this.removeDelimiter(o))}else r=r.next}for(;null!==this.delimiters&&this.delimiters!==e;)this.removeDelimiter(this.delimiters)},e.prototype.parseLinkTitle=function(){var e=this.match(ya);return null===e?null:yi(e.substr(1,e.length-2))},e.prototype.parseLinkDestination=function(){var e=this.match(ba);if(null===e){if(60===this.peek())return null;for(var t=this.pos,n=0,r=void 0;-1!==(r=this.peek());)if(92===r&&wa.test(this.subject.charAt(this.pos+1)))this.pos+=1,-1!==this.peek()&&(this.pos+=1);else if(40===r)this.pos+=1,n+=1;else if(41===r){if(n<1)break;this.pos+=1,n-=1}else{if(null!==Aa.exec(ta(r)))break;this.pos+=1}return this.pos===t&&41!==r||0!==n?null:bi(yi(e=this.subject.substr(t,this.pos-t)))}return bi(yi(e.substr(1,e.length-2)))},e.prototype.parseLinkLabel=function(){var e=this.match(Ra);return null===e||e.length>1001?0:e.length},e.prototype.parseOpenBracket=function(e){var t=this.pos;this.pos+=1;var n=Gi("[",this.sourcepos(this.pos,this.pos));return e.appendChild(n),this.addBracket(n,t,!1),!0},e.prototype.parseBang=function(e){var t=this.pos;if(this.pos+=1,91===this.peek()){this.pos+=1;var n=Gi("![",this.sourcepos(this.pos-1,this.pos));e.appendChild(n),this.addBracket(n,t+1,!0)}else{n=Gi("!",this.sourcepos(this.pos,this.pos));e.appendChild(n)}return!0},e.prototype.parseCloseBracket=function(e){var t=null,n=null,r=!1;this.pos+=1;var o=this.pos,i=this.brackets;if(null===i)return e.appendChild(Gi("]",this.sourcepos(o,o))),!0;if(!i.active)return e.appendChild(Gi("]",this.sourcepos(o,o))),this.removeBracket(),!0;var a=i.image,s=this.pos;40===this.peek()&&(this.pos++,this.spnl()&&null!==(t=this.parseLinkDestination())&&this.spnl()&&(Aa.test(this.subject.charAt(this.pos-1))&&(n=this.parseLinkTitle()),1)&&this.spnl()&&41===this.peek()?(this.pos+=1,r=!0):this.pos=s);var l="";if(!r){var u=this.pos,c=this.parseLinkLabel();if(c>2?l=this.subject.slice(u,u+c):i.bracketAfter||(l=this.subject.slice(i.index,o)),0===c&&(this.pos=s),l){l=ua(l);var d=this.refMap[l];d&&(t=d.destination,n=d.title,r=!0)}}if(r){var p=zi(a?"image":"link");p.destination=t,p.title=n||"",p.sourcepos=[i.startpos,this.sourcepos(this.pos)];for(var f=i.node.next,h=void 0;f;)h=f.next,f.unlink(),p.appendChild(f),f=h;if(e.appendChild(p),this.processEmphasis(i.previousDelimiter),this.removeBracket(),i.node.unlink(),!a)for(i=this.brackets;null!==i;)i.image||(i.active=!1),i=i.previous;return this.options.referenceDefinition&&(this.refLinkCandidateMap[e.id]={node:e,refLabel:l}),!0}return this.removeBracket(),this.pos=o,e.appendChild(Gi("]",this.sourcepos(o,o))),this.options.referenceDefinition&&(this.refLinkCandidateMap[e.id]={node:e,refLabel:l}),!0},e.prototype.addBracket=function(e,t,n){null!==this.brackets&&(this.brackets.bracketAfter=!0),this.brackets={node:e,startpos:this.sourcepos(t+(n?0:1)),previous:this.brackets,previousDelimiter:this.delimiters,index:t,image:n,active:!0}},e.prototype.removeBracket=function(){this.brackets&&(this.brackets=this.brackets.previous)},e.prototype.parseEntity=function(e){var t,n=this.pos+1;return!!(t=this.match(ka))&&(e.appendChild(Gi(Io.decodeHTML(t),this.sourcepos(n,this.pos))),!0)},e.prototype.parseString=function(e){var t,n=this.pos+1;if(t=this.match(Pa)){if(this.options.smart){var r=t.replace(Ta,"…").replace(Ea,(function(e){var t=0,n=0;return e.length%3==0?n=e.length/3:e.length%2==0?t=e.length/2:e.length%3==2?(t=1,n=(e.length-2)/3):(t=2,n=(e.length-4)/3),Ci("—",n)+Ci("–",t)}));e.appendChild(Gi(r,this.sourcepos(n,this.pos)))}else{var o=Gi(t,this.sourcepos(n,this.pos));e.appendChild(o)}return!0}return!1},e.prototype.parseNewline=function(e){this.pos+=1;var t=e.lastChild;if(t&&"text"===t.type&&" "===t.literal[t.literal.length-1]){var n=" "===t.literal[t.literal.length-2],r=t.literal.length;t.literal=t.literal.replace(Da,"");var o=r-t.literal.length;t.sourcepos[1][1]-=o,e.appendChild(zi(n?"linebreak":"softbreak",this.sourcepos(this.pos-o,this.pos)))}else e.appendChild(zi("softbreak",this.sourcepos(this.pos,this.pos)));return this.nextLine(),this.match(Oa),!0},e.prototype.parseReference=function(e,t){if(!this.options.referenceDefinition)return 0;this.subject=e.stringContent,this.pos=0;var n=null,r=this.pos,o=this.parseLinkLabel();if(0===o)return 0;var i=this.subject.substr(0,o);if(58!==this.peek())return this.pos=r,0;this.pos++,this.spnl();var a=this.parseLinkDestination();if(null===a)return this.pos=r,0;var s=this.pos;this.spnl(),this.pos!==s&&(n=this.parseLinkTitle()),null===n&&(n="",this.pos=s);var l=!0;if(null===this.match(Ia)&&(""===n?l=!1:(n="",this.pos=s,l=null!==this.match(Ia))),!l)return this.pos=r,0;var u=ua(i);if(""===u)return this.pos=r,0;var c=this.getReferenceDefSourcepos(e);e.sourcepos[0][0]=c[1][0]+1;var d=zi("refDef",c);return d.title=n,d.dest=a,d.label=u,e.insertBefore(d),t[u]?this.refDefCandidateMap[d.id]=d:t[u]=Ds(d),this.pos-r},e.prototype.mergeTextNodes=function(e){for(var t,n=[];t=e.next();){var r=t.entering,o=t.node;if(r&&"text"===o.type)n.push(o);else if(1===n.length)n=[];else if(n.length>1){var i=n[0],a=n[n.length-1];i.sourcepos&&a.sourcepos&&(i.sourcepos[1]=a.sourcepos[1]),i.next=a.next,i.next&&(i.next.prev=i);for(var s=1;s<n.length;s+=1)i.literal+=n[s].literal,n[s].unlink();n=[]}}},e.prototype.getReferenceDefSourcepos=function(e){for(var t=e.stringContent.split(/\n|\r\n/),n=!1,r=0,o={line:0,ch:0},i=0;i<t.length;i+=1){var a=t[i];if(Aa.test(a))break;if(/\:/.test(a)&&0===r){if(n)break;var s=a.indexOf(":")===a.length-1?i+1:i;o={line:s,ch:t[s].length},n=!0}var l=a.match(/'|"/g);if(l&&(r+=l.length),2===r){o={line:i,ch:a.length};break}}return[[e.sourcepos[0][0],e.sourcepos[0][1]],[e.sourcepos[0][0]+o.line,o.ch]]},e.prototype.parseInline=function(e){var t,n=!1,r=this.peek();if(-1===r)return!1;switch(r){case 10:n=this.parseNewline(e);break;case 92:n=this.parseBackslash(e);break;case 96:n=this.parseBackticks(e);break;case 42:case 95:case pa:case ma:n=this.handleDelim(r,e);break;case fa:case ha:n=!!(null===(t=this.options)||void 0===t?void 0:t.smart)&&this.handleDelim(r,e);break;case 91:n=this.parseOpenBracket(e);break;case 33:n=this.parseBang(e);break;case 93:n=this.parseCloseBracket(e);break;case 60:n=this.parseAutolink(e)||this.parseHtmlTag(e);break;case 38:e.disabledEntityParse||(n=this.parseEntity(e));break;default:n=this.parseString(e)}return n||(this.pos+=1,e.appendChild(Gi(ta(r),this.sourcepos(this.pos,this.pos+1)))),!0},e.prototype.parse=function(e){for(this.subject=e.stringContent.trim(),this.pos=0,this.delimiters=null,this.brackets=null,this.lineOffsets=e.lineOffsets||[0],this.lineIdx=0,this.linePosOffset=0,this.lineStartNum=e.sourcepos[0][0],function(e){return"heading"===e.type}(e)&&(this.lineOffsets[0]+=e.level+1);this.parseInline(e););e.stringContent=null,this.processEmphasis(null),this.mergeTextNodes(e.walker());var t=this.options,n=t.extendedAutolinks,r=t.customParser;if(n&&function(e,t){var n;"boolean"==typeof t&&(t=sa);for(var r=function(){var e=n.entering,r=n.node;if(e&&"text"===r.type&&"link"!==r.parent.type){var o=r.literal,i=t(o);if(!i||!i.length)return"continue";for(var a=0,s=r.sourcepos[0],l=s[0],u=s[1],c=function(e,t){return[[l,u+e],[l,u+t]]},d=[],p=0,f=i;p<f.length;p++){var h=f[p],m=h.range,v=h.url,g=h.text;m[0]>a&&d.push(Gi(o.substring(a,m[0]),c(a,m[0]-1)));var y=zi("link",c.apply(void 0,m));y.appendChild(Gi(g,c.apply(void 0,m))),y.destination=v,y.extendedAutolink=!0,d.push(y),a=m[1]+1}a<o.length&&d.push(Gi(o.substring(a),c(a,o.length-1)));for(var b=0,w=d;b<w.length;b++){var k=w[b];r.insertBefore(k)}r.unlink()}};n=e.next();)r()}(e.walker(),n),r&&e.firstChild)for(var o,i=e.firstChild.walker();o=i.next();){var a=o.node,s=o.entering;r[a.type]&&r[a.type](a,{entering:s,options:this.options})}},e}(),Ba=/^\[([ \txX])\][ \t]+/;var Fa=9,ja=32,qa=/[^ \t\f\v\r\n]/,_a=/^(?:`{3,}|~{3,})(?= *$)/;function za(e){for(var t=e;t;){if(t.lastLineBlank)return!0;var n=t.type;if(t.lastLineChecked||"list"!==n&&"item"!==n){t.lastLineChecked=!0;break}t.lastLineChecked=!0,t=t.lastChild}return!1}function Ua(e,t){return t<e.length?e.charCodeAt(t):-1}function Va(e){return!qa.test(e)}function $a(e){return e===ja||e===Fa}var Wa=/^\$\$$/,Ga={continue:function(e,t){var n=e.currentLine,r=n.match(Wa);if(r)return e.lastLineLength=r[0].length,e.finalize(t,e.lineNumber),2;for(var o=t.offset;o>0&&$a(Ua(n,e.offset));)e.advanceOffset(1,!0),o--;return 0},finalize:function(e,t){if(null!==t.stringContent){var n=t.stringContent,r=n.indexOf("\n"),o=n.slice(0,r),i=n.slice(r+1),a=o.match(/^(\s*)(.*)/);t.info=yi(a[2].trim()),t.literal=i,t.stringContent=null}},canContain:function(){return!1},acceptsLines:!0},Xa={continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!0},Za={continue:function(){return 0},finalize:function(e,t){for(var n=t.firstChild;n;){if(za(n)&&n.next){t.listData.tight=!1;break}for(var r=n.firstChild;r;){if(za(r)&&(n.next||r.next)){t.listData.tight=!1;break}r=r.next}n=n.next}},canContain:function(e){return"item"===e},acceptsLines:!1},Qa={continue:function(e,t){if(e.blank){if(null===t.firstChild)return 1;e.advanceNextNonspace()}else{if(!(e.indent>=t.listData.markerOffset+t.listData.padding))return 1;e.advanceOffset(t.listData.markerOffset+t.listData.padding,!0)}return 0},finalize:function(e,t){if(t.firstChild&&"paragraph"===t.firstChild.type){var n=t.firstChild,r=n.stringContent.match(Ba);if(r){var o=r[0].length;n.stringContent=n.stringContent.substring(o-1),n.sourcepos[0][1]+=o,n.lineOffsets[0]+=o,t.listData.task=!0,t.listData.checked=/[xX]/.test(r[1])}}},canContain:function(e){return"item"!==e},acceptsLines:!1},Ka={continue:function(e,t){var n=e.currentLine,r=e.indent;if(t.isFenced){var o=r<=3&&n.charAt(e.nextNonspace)===t.fenceChar&&n.slice(e.nextNonspace).match(_a);if(o&&o[0].length>=t.fenceLength)return e.lastLineLength=e.offset+r+o[0].length,e.finalize(t,e.lineNumber),2;for(var i=t.fenceOffset;i>0&&$a(Ua(n,e.offset));)e.advanceOffset(1,!0),i--}else if(r>=4)e.advanceOffset(4,!0);else{if(!e.blank)return 1;e.advanceNextNonspace()}return 0},finalize:function(e,t){var n;if(null!==t.stringContent){if(t.isFenced){var r=t.stringContent,o=r.indexOf("\n"),i=r.slice(0,o),a=r.slice(o+1),s=i.match(/^(\s*)(.*)/);t.infoPadding=s[1].length,t.info=yi(s[2].trim()),t.literal=a}else t.literal=null===(n=t.stringContent)||void 0===n?void 0:n.replace(/(\n *)+$/,"\n");t.stringContent=null}},canContain:function(){return!1},acceptsLines:!0},Ya={continue:function(e){return e.blank?1:0},finalize:function(e,t){if(null!==t.stringContent){for(var n,r=!1;91===Ua(t.stringContent,0)&&(n=e.inlineParser.parseReference(t,e.refMap));)t.stringContent=t.stringContent.slice(n),r=!0;r&&Va(t.stringContent)&&t.unlink()}},canContain:function(){return!1},acceptsLines:!0},Ja={document:{continue:function(){return 0},finalize:function(){},canContain:function(e){return"item"!==e},acceptsLines:!1},list:Za,blockQuote:{continue:function(e){var t=e.currentLine;return e.indented||62!==Ua(t,e.nextNonspace)?1:(e.advanceNextNonspace(),e.advanceOffset(1,!1),$a(Ua(t,e.offset))&&e.advanceOffset(1,!0),0)},finalize:function(){},canContain:function(e){return"item"!==e},acceptsLines:!1},item:Qa,heading:{continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!1},thematicBreak:{continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!1},codeBlock:Ka,htmlBlock:{continue:function(e,t){return!e.blank||6!==t.htmlBlockType&&7!==t.htmlBlockType?0:1},finalize:function(e,t){var n;t.literal=(null===(n=t.stringContent)||void 0===n?void 0:n.replace(/(\n *)+$/,""))||null,t.stringContent=null},canContain:function(){return!1},acceptsLines:!0},paragraph:Ya,table:{continue:function(){return 0},finalize:function(){},canContain:function(e){return"tableHead"===e||"tableBody"===e},acceptsLines:!1},tableBody:{continue:function(){return 0},finalize:function(){},canContain:function(e){return"tableRow"===e},acceptsLines:!1},tableHead:{continue:function(){return 1},finalize:function(){},canContain:function(e){return"tableRow"===e||"tableDelimRow"===e},acceptsLines:!1},tableRow:{continue:function(){return 1},finalize:function(){},canContain:function(e){return"tableCell"===e},acceptsLines:!1},tableCell:{continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!1},tableDelimRow:{continue:function(){return 1},finalize:function(){},canContain:function(e){return"tableDelimCell"===e},acceptsLines:!1},tableDelimCell:{continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!1},refDef:Xa,customBlock:Ga,frontMatter:Xa};function es(e){for(var t=0,n=0,r=[],o=0;o<e.length;o+=1)if("|"===e[o]&&"\\"!==e[o-1]){var i=e.substring(t,o);0===t&&xi(i)?n=o+1:r.push(i),t=o+1}t<e.length&&(xi(i=e.substring(t,e.length))||r.push(i));return[n,r]}function ts(e,t,n,r){for(var o=[],i=0,a=t;i<a.length;i++){var s=a[i],l=s.match(/^[ \t]+/),u=l?l[0].length:0,c=void 0,d=void 0;if(u===s.length)u=0,c=0,d="";else{var p=s.match(/[ \t]+$/);c=p?p[0].length:0,d=s.slice(u,s.length-c)}var f=r+u,h=zi(e,[[n,r],[n,r+s.length-1]]);h.stringContent=d.replace(/\\\|/g,"|"),h.startIdx=o.length,h.endIdx=o.length,h.lineOffsets=[f-1],h.paddingLeft=u,h.paddingRight=c,o.push(h),r+=s.length+1}return o}function ns(e){var t=null,n=e.stringContent,r=n[0];return":"===n[n.length-1]?t=":"===r?"center":"right":":"===r&&(t="left"),{align:t}}var rs=/^(\$\$)(\s*[a-zA-Z])+/,os=/^(\$\$)(\s*[a-zA-Z])+.*(\$\$)/,is=/^`{3,}(?!.*`)|^~{3,}/,as=[/./,/^<(?:script|pre|style)(?:\s|>|$)/i,/^<!--/,/^<[?]/,/^<![A-Z]/,/^<!\[CDATA\[/,/^<[/]?(?: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[123456]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|[/]?[>]|$)/i,new RegExp("^(?:"+Qi+"|"+Ki+")\\s*$","i")],ss=/^(?:=+|-+)[ \t]*$/,ls=/^#{1,6}(?:[ \t]+|$)/,us=/^(?:(?:\*[ \t]*){3,}|(?:_[ \t]*){3,}|(?:-[ \t]*){3,})[ \t]*$/,cs=/^[*+-]/,ds=/^(\d{1,9})([.)])/;function ps(e,t){return e.options.disallowDeepHeading&&("blockQuote"===t.type||"item"===t.type)}var fs=[function(e){return e.indented||62!==Ua(e.currentLine,e.nextNonspace)?0:(e.advanceNextNonspace(),e.advanceOffset(1,!1),$a(Ua(e.currentLine,e.offset))&&e.advanceOffset(1,!0),e.closeUnmatchedBlocks(),e.addChild("blockQuote",e.nextNonspace),1)},function(e,t){var n;if(!e.indented&&!ps(e,t)&&(n=e.currentLine.slice(e.nextNonspace).match(ls))){e.advanceNextNonspace(),e.advanceOffset(n[0].length,!1),e.closeUnmatchedBlocks();var r=e.addChild("heading",e.nextNonspace);return r.level=n[0].trim().length,r.headingType="atx",r.stringContent=e.currentLine.slice(e.offset).replace(/^[ \t]*#+[ \t]*$/,"").replace(/[ \t]+#+[ \t]*$/,""),e.advanceOffset(e.currentLine.length-e.offset),2}return 0},function(e){var t;if(!e.indented&&(t=e.currentLine.slice(e.nextNonspace).match(is))){var n=t[0].length;e.closeUnmatchedBlocks();var r=e.addChild("codeBlock",e.nextNonspace);return r.isFenced=!0,r.fenceLength=n,r.fenceChar=t[0][0],r.fenceOffset=e.indent,e.advanceNextNonspace(),e.advanceOffset(n,!1),2}return 0},function(e,t){if(!e.indented&&60===Ua(e.currentLine,e.nextNonspace)){var n=e.currentLine.slice(e.nextNonspace),r=e.options.disallowedHtmlBlockTags,o=void 0;for(o=1;o<=7;o++){var i=n.match(as[o]);if(i){if(7===o){if("paragraph"===t.type)return 0;if(r.length>0)if(new RegExp("</?(?:"+r.join("|")+")","i").test(i[0]))return 0}return e.closeUnmatchedBlocks(),e.addChild("htmlBlock",e.offset).htmlBlockType=o,2}}}return 0},function(e,t){var n;if(null!==t.stringContent&&!e.indented&&"paragraph"===t.type&&!ps(e,t.parent)&&(n=e.currentLine.slice(e.nextNonspace).match(ss))){e.closeUnmatchedBlocks();for(var r=void 0;91===Ua(t.stringContent,0)&&(r=e.inlineParser.parseReference(t,e.refMap));)t.stringContent=t.stringContent.slice(r);if(t.stringContent.length>0){var o=zi("heading",t.sourcepos);return o.level="="===n[0][0]?1:2,o.headingType="setext",o.stringContent=t.stringContent,t.insertAfter(o),t.unlink(),e.tip=o,e.advanceOffset(e.currentLine.length-e.offset,!1),2}return 0}return 0},function(e){return!e.indented&&us.test(e.currentLine.slice(e.nextNonspace))?(e.closeUnmatchedBlocks(),e.addChild("thematicBreak",e.nextNonspace),e.advanceOffset(e.currentLine.length-e.offset,!1),2):0},function(e,t){var n,r,o,i=t;return e.indented&&"list"!==t.type||!(n=function(e,t){var n,r,o=e.currentLine.slice(e.nextNonspace),i={type:"bullet",tight:!0,bulletChar:"",start:0,delimiter:"",padding:0,markerOffset:e.indent,task:!1,checked:!1};if(e.indent>=4)return null;if(n=o.match(cs))i.type="bullet",i.bulletChar=n[0][0];else{if(!(n=o.match(ds))||"paragraph"===t.type&&"1"!==n[1])return null;i.type="ordered",i.start=parseInt(n[1],10),i.delimiter=n[2]}if(-1!==(r=Ua(e.currentLine,e.nextNonspace+n[0].length))&&r!==Fa&&r!==ja)return null;if("paragraph"===t.type&&!e.currentLine.slice(e.nextNonspace+n[0].length).match(qa))return null;e.advanceNextNonspace(),e.advanceOffset(n[0].length,!0);var a=e.column,s=e.offset;do{e.advanceOffset(1,!0),r=Ua(e.currentLine,e.offset)}while(e.column-a<5&&$a(r));var l=-1===Ua(e.currentLine,e.offset),u=e.column-a;return u>=5||u<1||l?(i.padding=n[0].length+1,e.column=a,e.offset=s,$a(Ua(e.currentLine,e.offset))&&e.advanceOffset(1,!0)):i.padding=n[0].length+u,i}(e,i))?0:(e.closeUnmatchedBlocks(),"list"===e.tip.type&&(r=i.listData,o=n,r.type===o.type&&r.delimiter===o.delimiter&&r.bulletChar===o.bulletChar)||((i=e.addChild("list",e.nextNonspace)).listData=n),(i=e.addChild("item",e.nextNonspace)).listData=n,1)},function(e){return e.indented&&"paragraph"!==e.tip.type&&!e.blank?(e.advanceOffset(4,!0),e.closeUnmatchedBlocks(),e.addChild("codeBlock",e.offset),2):0},function(e,t){var n=t.stringContent;if("paragraph"===t.type&&!e.indented&&!e.blank){var r=n.length-1,o=n.lastIndexOf("\n",r-1)+1,i=n.slice(o,r),a=e.currentLine.slice(e.nextNonspace),s=es(i),l=s[0],u=s[1],c=es(a),d=c[0],p=c[1],f=/^[ \t]*:?-+:?[ \t]*$/;if(!u.length||!p.length||p.some((function(e){return!f.test(e)}))||1===p.length&&0!==a.indexOf("|"))return 0;var h=t.lineOffsets,m=e.lineNumber-1,v=la(h)+1,g=zi("table",[[m,v],[e.lineNumber,e.offset]]);if(g.columns=p.map((function(){return{align:null}})),t.insertAfter(g),1===h.length)t.unlink();else{t.stringContent=n.slice(0,o);var y=o-(n.lastIndexOf("\n",o-2)+1)-1;e.lastLineLength=h[h.length-2]+y,e.finalize(t,m-1)}e.advanceOffset(e.currentLine.length-e.offset,!1);var b=zi("tableHead",[[m,v],[e.lineNumber,e.offset]]);g.appendChild(b);var w=zi("tableRow",[[m,v],[m,v+i.length-1]]),k=zi("tableDelimRow",[[e.lineNumber,e.nextNonspace+1],[e.lineNumber,e.offset]]);b.appendChild(w),b.appendChild(k),ts("tableCell",u,m,v+l).forEach((function(e){w.appendChild(e)}));var C=ts("tableDelimCell",p,e.lineNumber,e.nextNonspace+1+d);return C.forEach((function(e){k.appendChild(e)})),g.columns=C.map(ns),e.tip=g,2}return 0},function(e,t){if("table"!==t.type&&"tableBody"!==t.type||!e.blank&&-1===e.currentLine.indexOf("|"))return 0;if(e.advanceOffset(e.currentLine.length-e.offset,!1),e.blank){var n=t;return"tableBody"===t.type&&(n=t.parent,e.finalize(t,e.lineNumber-1)),e.finalize(n,e.lineNumber-1),0}var r=t;"table"===t.type&&((r=e.addChild("tableBody",e.nextNonspace)).stringContent=null);var o=zi("tableRow",[[e.lineNumber,e.nextNonspace+1],[e.lineNumber,e.currentLine.length]]);r.appendChild(o);var i=r.parent,a=es(e.currentLine.slice(e.nextNonspace)),s=a[0];return ts("tableCell",a[1],e.lineNumber,e.nextNonspace+1+s).forEach((function(e,t){t>=i.columns.length&&(e.ignored=!0),o.appendChild(e)})),2},function(e){var t;if(!e.indented&&!os.test(e.currentLine)&&(t=e.currentLine.match(rs))){var n=t[1].length;e.closeUnmatchedBlocks();var r=e.addChild("customBlock",e.nextNonspace);return r.syntaxLength=n,r.offset=e.indent,e.advanceNextNonspace(),e.advanceOffset(n,!1),2}return 0}],hs=/^(-{3}|\+{3}|;{3})$/,ms=function(e,t){var n=e.currentLine,r=e.lineNumber,o=e.indented;return 1===r&&!o&&"document"===t.type&&hs.test(n)?(e.closeUnmatchedBlocks(),e.addChild("frontMatter",e.nextNonspace).stringContent=n,e.advanceNextNonspace(),e.advanceOffset(n.length,!1),2):0},vs={continue:function(e,t){var n=e.currentLine,r=n.match(hs);return"frontMatter"===t.type&&r?(t.stringContent+=n,e.lastLineLength=r[0].length,e.finalize(t,e.lineNumber),2):0},finalize:function(e,t){null!==t.stringContent&&(t.literal=t.stringContent,t.stringContent=null)},canContain:function(){return!1},acceptsLines:!0},gs=[/./,/<\/(?:script|pre|style)>/i,/-->/,/\?>/,/>/,/\]\]>/],ys=/^[#`~*+_=<>0-9-;$]/,bs=/\r\n|\n|\r/;function ws(){return zi("document",[[1,1],[0,0]])}var ks={smart:!1,tagFilter:!1,extendedAutolinks:!1,disallowedHtmlBlockTags:[],referenceDefinition:!1,disallowDeepHeading:!1,customParser:null,frontMatter:!1},Cs=function(){function e(e){this.options=Lo(Lo({},ks),e),this.doc=ws(),this.tip=this.doc,this.oldtip=this.doc,this.lineNumber=0,this.offset=0,this.column=0,this.nextNonspace=0,this.nextNonspaceColumn=0,this.indent=0,this.currentLine="",this.indented=!1,this.blank=!1,this.partiallyConsumedTab=!1,this.allClosed=!0,this.lastMatchedContainer=this.doc,this.refMap={},this.refLinkCandidateMap={},this.refDefCandidateMap={},this.lastLineLength=0,this.lines=[],this.options.frontMatter&&(Ja.frontMatter=vs,fs.unshift(ms)),this.inlineParser=new Ha(this.options)}return e.prototype.advanceOffset=function(e,t){void 0===t&&(t=!1);for(var n,r,o,i=this.currentLine;e>0&&(o=i[this.offset]);)"\t"===o?(n=4-this.column%4,t?(this.partiallyConsumedTab=n>e,r=n>e?e:n,this.column+=r,this.offset+=this.partiallyConsumedTab?0:1,e-=r):(this.partiallyConsumedTab=!1,this.column+=n,this.offset+=1,e-=1)):(this.partiallyConsumedTab=!1,this.offset+=1,this.column+=1,e-=1)},e.prototype.advanceNextNonspace=function(){this.offset=this.nextNonspace,this.column=this.nextNonspaceColumn,this.partiallyConsumedTab=!1},e.prototype.findNextNonspace=function(){for(var e,t=this.currentLine,n=this.offset,r=this.column;""!==(e=t.charAt(n));)if(" "===e)n++,r++;else{if("\t"!==e)break;n++,r+=4-r%4}this.blank="\n"===e||"\r"===e||""===e,this.nextNonspace=n,this.nextNonspaceColumn=r,this.indent=this.nextNonspaceColumn-this.column,this.indented=this.indent>=4},e.prototype.addLine=function(){if(this.partiallyConsumedTab){this.offset+=1;var e=4-this.column%4;this.tip.stringContent+=Ci(" ",e)}this.tip.lineOffsets?this.tip.lineOffsets.push(this.offset):this.tip.lineOffsets=[this.offset],this.tip.stringContent+=this.currentLine.slice(this.offset)+"\n"},e.prototype.addChild=function(e,t){for(;!Ja[this.tip.type].canContain(e);)this.finalize(this.tip,this.lineNumber-1);var n=t+1,r=zi(e,[[this.lineNumber,n],[0,0]]);return r.stringContent="",this.tip.appendChild(r),this.tip=r,r},e.prototype.closeUnmatchedBlocks=function(){if(!this.allClosed){for(;this.oldtip!==this.lastMatchedContainer;){var e=this.oldtip.parent;this.finalize(this.oldtip,this.lineNumber-1),this.oldtip=e}this.allClosed=!0}},e.prototype.finalize=function(e,t){var n=e.parent;e.open=!1,e.sourcepos[1]=[t,this.lastLineLength],Ja[e.type].finalize(this,e),this.tip=n},e.prototype.processInlines=function(e){var t,n=this.options.customParser,r=e.walker();for(this.inlineParser.refMap=this.refMap,this.inlineParser.refLinkCandidateMap=this.refLinkCandidateMap,this.inlineParser.refDefCandidateMap=this.refDefCandidateMap,this.inlineParser.options=this.options;t=r.next();){var o=t.node,i=t.entering,a=o.type;n&&n[a]&&n[a](o,{entering:i,options:this.options}),i||"paragraph"!==a&&"heading"!==a&&("tableCell"!==a||o.ignored)||this.inlineParser.parse(o)}},e.prototype.incorporateLine=function(e){var t=this.doc;this.oldtip=this.tip,this.offset=0,this.column=0,this.blank=!1,this.partiallyConsumedTab=!1,this.lineNumber+=1,-1!==e.indexOf("\0")&&(e=e.replace(/\0/g,"�")),this.currentLine=e;for(var n,r=!0;(n=t.lastChild)&&n.open;){switch(t=n,this.findNextNonspace(),Ja[t.type].continue(this,t)){case 0:break;case 1:r=!1;break;case 2:return void(this.lastLineLength=e.length);default:throw new Error("continue returned illegal value, must be 0, 1, or 2")}if(!r){t=t.parent;break}}this.allClosed=t===this.oldtip,this.lastMatchedContainer=t;for(var o="paragraph"!==t.type&&Ja[t.type].acceptsLines,i=fs.length;!o;){if(this.findNextNonspace(),"table"!==t.type&&"tableBody"!==t.type&&"paragraph"!==t.type&&!this.indented&&!ys.test(e.slice(this.nextNonspace))){this.advanceNextNonspace();break}for(var a=0;a<i;){var s=fs[a](this,t);if(1===s){t=this.tip;break}if(2===s){t=this.tip,o=!0;break}a++}if(a===i){this.advanceNextNonspace();break}}if(this.allClosed||this.blank||"paragraph"!==this.tip.type){this.closeUnmatchedBlocks(),this.blank&&t.lastChild&&(t.lastChild.lastLineBlank=!0);for(var l=t.type,u=this.blank&&!("blockQuote"===l||Ui(t)&&t.isFenced||"item"===l&&!t.firstChild&&t.sourcepos[0][0]===this.lineNumber),c=t;c;)c.lastLineBlank=u,c=c.parent;Ja[l].acceptsLines?(this.addLine(),"htmlBlock"===t.type&&t.htmlBlockType>=1&&t.htmlBlockType<=5&&gs[t.htmlBlockType].test(this.currentLine.slice(this.offset))&&(this.lastLineLength=e.length,this.finalize(t,this.lineNumber))):this.offset<e.length&&!this.blank&&(t=this.addChild("paragraph",this.offset),this.advanceNextNonspace(),this.addLine())}else this.addLine();this.lastLineLength=e.length},e.prototype.parse=function(e,t){this.doc=ws(),this.tip=this.doc,this.lineNumber=0,this.lastLineLength=0,this.offset=0,this.column=0,this.lastMatchedContainer=this.doc,this.currentLine="";var n=e.split(bs),r=n.length;this.lines=t||n,this.options.referenceDefinition&&this.clearRefMaps(),10===e.charCodeAt(e.length-1)&&(r-=1);for(var o=0;o<r;o++)this.incorporateLine(n[o]);for(;this.tip;)this.finalize(this.tip,r);return this.processInlines(this.doc),this.doc},e.prototype.partialParseStart=function(e,t){this.doc=ws(),this.tip=this.doc,this.lineNumber=e-1,this.lastLineLength=0,this.offset=0,this.column=0,this.lastMatchedContainer=this.doc,this.currentLine="";for(var n=t.length,r=0;r<n;r++)this.incorporateLine(t[r]);return this.doc},e.prototype.partialParseExtends=function(e){for(var t=0;t<e.length;t++)this.incorporateLine(e[t])},e.prototype.partialParseFinish=function(){for(;this.tip;)this.finalize(this.tip,this.lineNumber);this.processInlines(this.doc)},e.prototype.setRefMaps=function(e,t,n){this.refMap=e,this.refLinkCandidateMap=t,this.refDefCandidateMap=n},e.prototype.clearRefMaps=function(){[this.refMap,this.refLinkCandidateMap,this.refDefCandidateMap].forEach((function(e){var t;t=e,Object.keys(t).forEach((function(e){delete t[e]}))}))},e}();function xs(e,t){return e[0]<t[0]?1:e[0]>t[0]?-1:e[1]<t[1]?1:e[1]>t[1]?-1:0}function Ts(e,t){var n=e[0];return 1===xs(e[1],t)?1:-1===xs(n,t)?-1:0}function Es(e,t){for(var n=0,r=t;n<r.length;n++){var o=r[n];e.insertBefore(o)}}function Ms(e,t){var n=e[0];return e[1][0]<t?1:n[0]>t?-1:0}function Ls(e,t){for(var n=e.firstChild;n;){var r=Ms(n.sourcepos,t);if(0===r)return n;if(-1===r)return n.prev||n;n=n.next}return e.lastChild}function Ns(e){return function(e){return Li[e]}(e)||null}function As(e,t,n){if(void 0===n&&(n=null),t)for(var r=t.walker();t&&t!==n;){e(t);var o=r.next();if(!o)break;t=o.node}}var Ss=/\r\n|\n|\r/;function Ds(e){return{id:e.id,title:e.title,sourcepos:e.sourcepos,unlinked:!1,destination:e.dest}}var Os=function(){function e(e,t){this.refMap={},this.refLinkCandidateMap={},this.refDefCandidateMap={},this.referenceDefinition=!!(null==t?void 0:t.referenceDefinition),this.parser=new Cs(t),this.parser.setRefMaps(this.refMap,this.refLinkCandidateMap,this.refDefCandidateMap),this.eventHandlerMap={change:[]},e=e||"",this.lineTexts=e.split(Ss),this.root=this.parser.parse(e,this.lineTexts)}return e.prototype.updateLineTexts=function(e,t,n){var r,o=e[0],i=e[1],a=t[0],s=t[1],l=n.split(Ss),u=l.length,c=this.lineTexts[o-1],d=this.lineTexts[a-1];l[0]=c.slice(0,i-1)+l[0],l[u-1]=l[u-1]+d.slice(s-1);var p=a-o+1;return(r=this.lineTexts).splice.apply(r,No([o-1,p],l)),u-p},e.prototype.updateRootNodeState=function(){if(1===this.lineTexts.length&&""===this.lineTexts[0])return this.root.lastLineBlank=!0,void(this.root.sourcepos=[[1,1],[1,0]]);this.root.lastChild&&(this.root.lastLineBlank=this.root.lastChild.lastLineBlank);for(var e=this.lineTexts,t=e.length-1;""===e[t];)t-=1;e.length-2>t&&(t+=1),this.root.sourcepos[1]=[t+1,e[t].length]},e.prototype.replaceRangeNodes=function(e,t,n){e?(Es(e,n),function(e,t){if(e.parent===t.parent&&e!==t){for(var n=e.next;n&&n!==t;){for(var r=n.next,o=0,i=["parent","prev","next"];o<i.length;o++){var a=i[o];n[a]&&(Ni(n[a].id),n[a]=null)}n=r}e.next=t.next,t.next?t.next.prev=e:e.parent.lastChild=e}}(e,t),[e.id,t.id].forEach((function(e){return Ni(e)})),e.unlink()):t?(Es(t,n),Ni(t.id),t.unlink()):function(e,t){for(var n=t.length-1;n>=0;n-=1)e.prependChild(t[n])}(this.root,n)},e.prototype.getNodeRange=function(e,t){var n=Ls(this.root,e[0]),r=Ls(this.root,t[0]);return r&&r.next&&t[0]+1===r.next.sourcepos[0][0]&&(r=r.next),[n,r]},e.prototype.trigger=function(e,t){this.eventHandlerMap[e].forEach((function(e){e(t)}))},e.prototype.extendEndLine=function(e){for(;""===this.lineTexts[e];)e+=1;return e},e.prototype.parseRange=function(e,t,n,r){var o;e&&e.prev&&(Vi(e.prev)&&function(e){var t=e.match(/^[ \t]+/);if(t&&(t[0].length>=2||/\t/.test(t[0])))return!0;var n=t?e.slice(t.length):e;return cs.test(n)||ds.test(n)}(this.lineTexts[n-1])||"table"===e.prev.type&&(!Va(o=this.lineTexts[n-1])&&-1!==o.indexOf("|")))&&(n=(e=e.prev).sourcepos[0][0]);for(var i=this.lineTexts.slice(n-1,r),a=this.parser.partialParseStart(n,i),s=t?t.next:this.root.firstChild,l=a.lastChild,u=l&&Ui(l)&&l.open,c=l&&Wi(l)&&l.open,d=l&&Vi(l);(u||c)&&s||d&&s&&("list"===s.type||s.sourcepos[0][1]>=2);){var p=this.extendEndLine(s.sourcepos[1][0]);this.parser.partialParseExtends(this.lineTexts.slice(r,p)),e||(e=t),t=s,r=p,s=s.next}return this.parser.partialParseFinish(),{newNodes:function(e){for(var t=[],n=e.firstChild;n;)t.push(n),n=n.next;return t}(a),extStartNode:e,extEndNode:t}},e.prototype.getRemovedNodeRange=function(e,t){return!e||e&&$i(e)||t&&$i(t)?null:{id:[e.id,t.id],line:[e.sourcepos[0][0]-1,t.sourcepos[1][0]-1]}},e.prototype.markDeletedRefMap=function(e,t){var n=this;if(!da(this.refMap)){var r=function(e){if($i(e)){var t=n.refMap[e.label];t&&e.id===t.id&&(t.unlinked=!0)}};e&&As(r,e.parent,t),t&&As(r,t)}},e.prototype.replaceWithNewRefDefState=function(e){var t=this;if(!da(this.refMap)){var n=function(e){if($i(e)){var n=e.label,r=t.refMap[n];r&&!r.unlinked||(t.refMap[n]=Ds(e))}};e.forEach((function(e){As(n,e)}))}},e.prototype.replaceWithRefDefCandidate=function(){var e=this;da(this.refDefCandidateMap)||ca(this.refDefCandidateMap,(function(t,n){var r=n.label,o=n.sourcepos,i=e.refMap[r];(!i||i.unlinked||i.sourcepos[0][0]>o[0][0])&&(e.refMap[r]=Ds(n))}))},e.prototype.getRangeWithRefDef=function(e,t,n,r,o){if(this.referenceDefinition&&!da(this.refMap)){var i=Ls(this.root,e-1),a=Ls(this.root,t+1);i&&$i(i)&&i!==n&&i!==r&&(e=(n=i).sourcepos[0][0]),a&&$i(a)&&a!==n&&a!==r&&(r=a,t=this.extendEndLine(r.sourcepos[1][0]+o))}return[n,r,e,t]},e.prototype.parse=function(e,t,n){void 0===n&&(n=0);var r=this.getNodeRange(e,t),o=r[0],i=r[1],a=o?Math.min(o.sourcepos[0][0],e[0]):e[0],s=this.extendEndLine((i?Math.max(i.sourcepos[1][0],t[0]):t[0])+n),l=this.parseRange.apply(this,this.getRangeWithRefDef(a,s,o,i,n)),u=l.newNodes,c=l.extStartNode,d=l.extEndNode,p=this.getRemovedNodeRange(c,d),f=d?d.next:this.root.firstChild;return this.referenceDefinition?(this.markDeletedRefMap(c,d),this.replaceRangeNodes(c,d,u),this.replaceWithNewRefDefState(u)):this.replaceRangeNodes(c,d,u),{nodes:u,removedNodeRange:p,nextNode:f}},e.prototype.parseRefLink=function(){var e=this,t=[];return da(this.refMap)||ca(this.refMap,(function(n,r){r.unlinked&&delete e.refMap[n],ca(e.refLinkCandidateMap,(function(r,o){var i=o.node;o.refLabel===n&&t.push(e.parse(i.sourcepos[0],i.sourcepos[1]))}))})),t},e.prototype.removeUnlinkedCandidate=function(){da(this.refDefCandidateMap)||[this.refLinkCandidateMap,this.refDefCandidateMap].forEach((function(e){ca(e,(function(t){(function(e){var t=Ns(e);if(!t)return!0;for(;t&&"document"!==t.type;){if(!t.parent&&!t.prev&&!t.next)return!0;t=t.parent}return!1})(t)&&delete e[t]}))}))},e.prototype.editMarkdown=function(e,t,n){var r=this.updateLineTexts(e,t,n),o=this.parse(e,t,r),i=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=Lo({},e);return t.forEach((function(e){delete r[e]})),r}(o,"nextNode");!function(e,t){if(e&&e.parent&&0!==t){var n,r=e.parent.walker();for(r.resumeAt(e,!0);n=r.next();){var o=n.node;n.entering&&(o.sourcepos[0][0]+=t,o.sourcepos[1][0]+=t)}}}(o.nextNode,r),this.updateRootNodeState();var a=[i];return this.referenceDefinition&&(this.removeUnlinkedCandidate(),this.replaceWithRefDefCandidate(),a=a.concat(this.parseRefLink())),this.trigger("change",a),a},e.prototype.getLineTexts=function(){return this.lineTexts},e.prototype.getRootNode=function(){return this.root},e.prototype.findNodeAtPosition=function(e){var t=function(e,t){for(var n=e,r=null;n;){var o=Ts(n.sourcepos,t);if(0===o){if(!n.firstChild)return n;r=n,n=n.firstChild}else{if(-1===o)return r;if(!n.next)return r;n=n.next}}return n}(this.root,e);return t&&t!==this.root?t:null},e.prototype.findFirstNodeAtLine=function(e){return function(e,t){for(var n=e.firstChild,r=null;n;){var o=Ms(n.sourcepos,t);if(0===o){if(n.sourcepos[0][0]===t||!n.firstChild)return n;r=n,n=n.firstChild}else{if(-1===o)break;r=n,n=n.next}}return r?function(e){for(;e.parent&&"document"!==e.parent.type&&e.parent.sourcepos[0][0]===e.sourcepos[0][0];)e=e.parent;return e}(function(e){for(;e.lastChild;)e=e.lastChild;return e}(r)):null}(this.root,e)},e.prototype.on=function(e,t){this.eventHandlerMap[e].push(t)},e.prototype.off=function(e,t){var n=this.eventHandlerMap[e],r=n.indexOf(t);n.splice(r,1)},e.prototype.findNodeById=function(e){return Ns(e)},e.prototype.removeAllNode=function(){Li={}},e}(),Is=new RegExp("<(/?(?:"+["title","textarea","style","xmp","iframe","noembed","noframes","script","plaintext"].join("|")+")[^>]*>)","ig");function Rs(e){return Is.test(e)?e.replace(Is,(function(e,t){return"<"+t})):e}var Ps={heading:function(e,t){return{type:t.entering?"openTag":"closeTag",tagName:"h"+e.level,outerNewLine:!0}},text:function(e){return{type:"text",content:e.literal}},softbreak:function(e,t){return{type:"html",content:t.options.softbreak}},linebreak:function(){return{type:"html",content:"<br />\n"}},emph:function(e,t){return{type:t.entering?"openTag":"closeTag",tagName:"em"}},strong:function(e,t){return{type:t.entering?"openTag":"closeTag",tagName:"strong"}},paragraph:function(e,t){var n,r=t.entering,o=null===(n=e.parent)||void 0===n?void 0:n.parent;return o&&"list"===o.type&&o.listData.tight?null:{type:r?"openTag":"closeTag",tagName:"p",outerNewLine:!0}},thematicBreak:function(){return{type:"openTag",tagName:"hr",outerNewLine:!0,selfClose:!0}},blockQuote:function(e,t){return{type:t.entering?"openTag":"closeTag",tagName:"blockquote",outerNewLine:!0,innerNewLine:!0}},list:function(e,t){var n=t.entering,r=e.listData,o=r.type,i=r.start,a="bullet"===o?"ul":"ol",s={};return"ol"===a&&null!==i&&1!==i&&(s.start=i.toString()),{type:n?"openTag":"closeTag",tagName:a,attributes:s,outerNewLine:!0}},item:function(e,t){return{type:t.entering?"openTag":"closeTag",tagName:"li",outerNewLine:!0}},htmlInline:function(e,t){return{type:"html",content:t.options.tagFilter?Rs(e.literal):e.literal}},htmlBlock:function(e,t){var n=t.options,r=n.tagFilter?Rs(e.literal):e.literal;return n.nodeId?[{type:"openTag",tagName:"div",outerNewLine:!0},{type:"html",content:r},{type:"closeTag",tagName:"div",outerNewLine:!0}]:{type:"html",content:r,outerNewLine:!0}},code:function(e){return[{type:"openTag",tagName:"code"},{type:"text",content:e.literal},{type:"closeTag",tagName:"code"}]},codeBlock:function(e){var t=e.info,n=t?t.split(/\s+/):[],r=[];return n.length>0&&n[0].length>0&&r.push("language-"+ki(n[0])),[{type:"openTag",tagName:"pre",outerNewLine:!0},{type:"openTag",tagName:"code",classNames:r},{type:"text",content:e.literal},{type:"closeTag",tagName:"code"},{type:"closeTag",tagName:"pre",outerNewLine:!0}]},link:function(e,t){if(t.entering){var n=e,r=n.title,o=n.destination;return{type:"openTag",tagName:"a",attributes:Lo({href:ki(o)},r&&{title:ki(r)})}}return{type:"closeTag",tagName:"a"}},image:function(e,t){var n=t.getChildrenText,r=t.skipChildren,o=e,i=o.title,a=o.destination;return r(),{type:"openTag",tagName:"img",selfClose:!0,attributes:Lo({src:ki(a),alt:n(e)},i&&{title:ki(i)})}},customBlock:function(e,t,n){var r=e.info.trim().toLowerCase(),o=n[r];if(o)try{return o(e,t)}catch(e){console.warn("[@toast-ui/editor] - The error occurred when "+r+" block node was parsed in markdown renderer: "+e)}return[{type:"openTag",tagName:"div",outerNewLine:!0},{type:"text",content:e.literal},{type:"closeTag",tagName:"div",outerNewLine:!0}]},frontMatter:function(e){return[{type:"openTag",tagName:"div",outerNewLine:!0,attributes:{style:"white-space: pre; display: none;"}},{type:"text",content:e.literal},{type:"closeTag",tagName:"div",outerNewLine:!0}]},customInline:function(e,t,n){var r=e,o=r.info,i=r.firstChild,a=o.trim().toLowerCase(),s=n[a],l=t.entering;if(s)try{return s(e,t)}catch(e){console.warn("[@toast-ui/editor] - The error occurred when "+a+" inline node was parsed in markdown renderer: "+e)}return l?[{type:"openTag",tagName:"span"},{type:"text",content:"$$"+o+(i?" ":"")}]:[{type:"text",content:"$$"},{type:"closeTag",tagName:"span"}]}},Hs={strike:function(e,t){return{type:t.entering?"openTag":"closeTag",tagName:"del"}},item:function(e,t){var n=t.entering,r=e.listData,o=r.checked,i=r.task;if(n){var a={type:"openTag",tagName:"li",outerNewLine:!0};return i?[a,{type:"openTag",tagName:"input",selfClose:!0,attributes:Lo(Lo({},o&&{checked:""}),{disabled:"",type:"checkbox"})},{type:"text",content:" "}]:a}return{type:"closeTag",tagName:"li",outerNewLine:!0}},table:function(e,t){return{type:t.entering?"openTag":"closeTag",tagName:"table",outerNewLine:!0}},tableHead:function(e,t){return{type:t.entering?"openTag":"closeTag",tagName:"thead",outerNewLine:!0}},tableBody:function(e,t){return{type:t.entering?"openTag":"closeTag",tagName:"tbody",outerNewLine:!0}},tableRow:function(e,t){if(t.entering)return{type:"openTag",tagName:"tr",outerNewLine:!0};var n=[];if(e.lastChild)for(var r=e.parent.parent.columns.length,o=e.lastChild.endIdx+1;o<r;o+=1)n.push({type:"openTag",tagName:"td",outerNewLine:!0},{type:"closeTag",tagName:"td",outerNewLine:!0});return n.push({type:"closeTag",tagName:"tr",outerNewLine:!0}),n},tableCell:function(e,t){var n=t.entering;if(e.ignored)return{type:"text",content:""};var r=e.parent.parent,o="tableHead"===r.type?"th":"td",i=r.parent.columns[e.startIdx],a=(null==i?void 0:i.align)?{align:i.align}:null;return n?Lo({type:"openTag",tagName:o,outerNewLine:!0},a&&{attributes:a}):{type:"closeTag",tagName:o,outerNewLine:!0}}},Bs={softbreak:"\n",gfm:!1,tagFilter:!1,nodeId:!1};function Fs(e){for(var t=[],n=e.walker(),r=null;r=n.next();){var o=r.node;"text"===o.type&&t.push(o.literal)}return t.join("")}var js=function(){function e(e){this.buffer=[],this.options=Lo(Lo({},Bs),e),this.convertors=this.createConvertors(),delete this.options.convertors}return e.prototype.createConvertors=function(){var e=Lo({},Ps);if(this.options.gfm&&(e=Lo(Lo({},e),Hs)),this.options.convertors){var t=this.options.convertors,n=Object.keys(t),r=Lo(Lo({},Ps),Hs);n.forEach((function(n){var o=e[n],i=t[n],a=-1===Object.keys(r).indexOf(n)?n.toLowerCase():n;e[a]=o?function(e,t,n){return t.origin=function(){return o(e,t,n)},i(e,t)}:i}))}return e},e.prototype.getConvertors=function(){return this.convertors},e.prototype.getOptions=function(){return this.options},e.prototype.render=function(e){var t=this;this.buffer=[];for(var n=e.walker(),r=null,o=function(){var e=r.node,o=r.entering,a=i.convertors[e.type];if(!a)return"continue";var s=!1,l={entering:o,leaf:!Ei(e),options:i.options,getChildrenText:Fs,skipChildren:function(){s=!0}},u=Wi(e)||function(e){return"customInline"===e.type}(e)?a(e,l,i.convertors):a(e,l);u&&((Array.isArray(u)?u:[u]).forEach((function(n,r){"openTag"===n.type&&t.options.nodeId&&0===r&&(n.attributes||(n.attributes={}),n.attributes["data-nodeid"]=String(e.id)),t.renderHTMLNode(n)})),s&&(n.resumeAt(e,!1),n.next()))},i=this;r=n.next();)o();return this.addNewLine(),this.buffer.join("")},e.prototype.renderHTMLNode=function(e){switch(e.type){case"openTag":case"closeTag":this.renderElementNode(e);break;case"text":this.renderTextNode(e);break;case"html":this.renderRawHtmlNode(e)}},e.prototype.generateOpenTagString=function(e){var t=this,n=e.tagName,r=e.classNames,o=e.attributes;this.buffer.push("<"+n),r&&r.length>0&&this.buffer.push(' class="'+r.join(" ")+'"'),o&&Object.keys(o).forEach((function(e){var n=o[e];t.buffer.push(" "+e+'="'+n+'"')})),e.selfClose&&this.buffer.push(" /"),this.buffer.push(">")},e.prototype.generateCloseTagString=function(e){var t=e.tagName;this.buffer.push("</"+t+">")},e.prototype.addNewLine=function(){this.buffer.length&&"\n"!==la(la(this.buffer))&&this.buffer.push("\n")},e.prototype.addOuterNewLine=function(e){e.outerNewLine&&this.addNewLine()},e.prototype.addInnerNewLine=function(e){e.innerNewLine&&this.addNewLine()},e.prototype.renderTextNode=function(e){this.buffer.push(ki(e.content))},e.prototype.renderRawHtmlNode=function(e){this.addOuterNewLine(e),this.buffer.push(e.content),this.addOuterNewLine(e)},e.prototype.renderElementNode=function(e){"openTag"===e.type?(this.addOuterNewLine(e),this.generateOpenTagString(e),e.selfClose?this.addOuterNewLine(e):this.addInnerNewLine(e)):(this.addInnerNewLine(e),this.generateCloseTagString(e),this.addOuterNewLine(e))},e}();
|
36
|
-
/*! @license DOMPurify 2.3.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.3/LICENSE */var qs=Object.hasOwnProperty,_s=Object.setPrototypeOf,zs=Object.isFrozen,Us=Object.getPrototypeOf,Vs=Object.getOwnPropertyDescriptor,$s=Object.freeze,Ws=Object.seal,Gs=Object.create,Xs="undefined"!=typeof Reflect&&Reflect,Zs=Xs.apply,Qs=Xs.construct;Zs||(Zs=function(e,t,n){return e.apply(t,n)}),$s||($s=function(e){return e}),Ws||(Ws=function(e){return e}),Qs||(Qs=function(e,t){return new(Function.prototype.bind.apply(e,[null].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(t))))});var Ks,Ys=ll(Array.prototype.forEach),Js=ll(Array.prototype.pop),el=ll(Array.prototype.push),tl=ll(String.prototype.toLowerCase),nl=ll(String.prototype.match),rl=ll(String.prototype.replace),ol=ll(String.prototype.indexOf),il=ll(String.prototype.trim),al=ll(RegExp.prototype.test),sl=(Ks=TypeError,function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return Qs(Ks,t)});function ll(e){return function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return Zs(e,t,r)}}function ul(e,t){_s&&_s(e,null);for(var n=t.length;n--;){var r=t[n];if("string"==typeof r){var o=tl(r);o!==r&&(zs(t)||(t[n]=o),r=o)}e[r]=!0}return e}function cl(e){var t=Gs(null),n=void 0;for(n in e)Zs(qs,e,[n])&&(t[n]=e[n]);return t}function dl(e,t){for(;null!==e;){var n=Vs(e,t);if(n){if(n.get)return ll(n.get);if("function"==typeof n.value)return ll(n.value)}e=Us(e)}return function(e){return console.warn("fallback value for",e),null}}var pl=$s(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),fl=$s(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),hl=$s(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),ml=$s(["animate","color-profile","cursor","discard","fedropshadow","feimage","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),vl=$s(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),gl=$s(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),yl=$s(["#text"]),bl=$s(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),wl=$s(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),kl=$s(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Cl=$s(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),xl=Ws(/\{\{[\s\S]*|[\s\S]*\}\}/gm),Tl=Ws(/<%[\s\S]*|[\s\S]*%>/gm),El=Ws(/^data-[\-\w.\u00B7-\uFFFF]/),Ml=Ws(/^aria-[\-\w]+$/),Ll=Ws(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Nl=Ws(/^(?:\w+script|data):/i),Al=Ws(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Sl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function Dl(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var Ol=function(){return"undefined"==typeof window?null:window};var Il=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ol(),n=function(t){return e(t)};if(n.version="2.3.3",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;var r=t.document,o=t.document,i=t.DocumentFragment,a=t.HTMLTemplateElement,s=t.Node,l=t.Element,u=t.NodeFilter,c=t.NamedNodeMap,d=void 0===c?t.NamedNodeMap||t.MozNamedAttrMap:c,p=t.Text,f=t.Comment,h=t.DOMParser,m=t.trustedTypes,v=l.prototype,g=dl(v,"cloneNode"),y=dl(v,"nextSibling"),b=dl(v,"childNodes"),w=dl(v,"parentNode");if("function"==typeof a){var k=o.createElement("template");k.content&&k.content.ownerDocument&&(o=k.content.ownerDocument)}var C=function(e,t){if("object"!==(void 0===e?"undefined":Sl(e))||"function"!=typeof e.createPolicy)return null;var n=null,r="data-tt-policy-suffix";t.currentScript&&t.currentScript.hasAttribute(r)&&(n=t.currentScript.getAttribute(r));var o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(m,r),x=C&&te?C.createHTML(""):"",T=o,E=T.implementation,M=T.createNodeIterator,L=T.createDocumentFragment,N=T.getElementsByTagName,A=r.importNode,S={};try{S=cl(o).documentMode?o.documentMode:{}}catch(e){}var D={};n.isSupported="function"==typeof w&&E&&void 0!==E.createHTMLDocument&&9!==S;var O=xl,I=Tl,R=El,P=Ml,H=Nl,B=Al,F=Ll,j=null,q=ul({},[].concat(Dl(pl),Dl(fl),Dl(hl),Dl(vl),Dl(yl))),_=null,z=ul({},[].concat(Dl(bl),Dl(wl),Dl(kl),Dl(Cl))),U=null,V=null,$=!0,W=!0,G=!1,X=!1,Z=!1,Q=!1,K=!1,Y=!1,J=!1,ee=!0,te=!1,ne=!0,re=!0,oe=!1,ie={},ae=null,se=ul({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),le=null,ue=ul({},["audio","video","img","source","image","track"]),ce=null,de=ul({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),pe="http://www.w3.org/1998/Math/MathML",fe="http://www.w3.org/2000/svg",he="http://www.w3.org/1999/xhtml",me=he,ve=!1,ge=void 0,ye=["application/xhtml+xml","text/html"],be=void 0,we=null,ke=o.createElement("form"),Ce=function(e){we&&we===e||(e&&"object"===(void 0===e?"undefined":Sl(e))||(e={}),e=cl(e),j="ALLOWED_TAGS"in e?ul({},e.ALLOWED_TAGS):q,_="ALLOWED_ATTR"in e?ul({},e.ALLOWED_ATTR):z,ce="ADD_URI_SAFE_ATTR"in e?ul(cl(de),e.ADD_URI_SAFE_ATTR):de,le="ADD_DATA_URI_TAGS"in e?ul(cl(ue),e.ADD_DATA_URI_TAGS):ue,ae="FORBID_CONTENTS"in e?ul({},e.FORBID_CONTENTS):se,U="FORBID_TAGS"in e?ul({},e.FORBID_TAGS):{},V="FORBID_ATTR"in e?ul({},e.FORBID_ATTR):{},ie="USE_PROFILES"in e&&e.USE_PROFILES,$=!1!==e.ALLOW_ARIA_ATTR,W=!1!==e.ALLOW_DATA_ATTR,G=e.ALLOW_UNKNOWN_PROTOCOLS||!1,X=e.SAFE_FOR_TEMPLATES||!1,Z=e.WHOLE_DOCUMENT||!1,Y=e.RETURN_DOM||!1,J=e.RETURN_DOM_FRAGMENT||!1,ee=!1!==e.RETURN_DOM_IMPORT,te=e.RETURN_TRUSTED_TYPE||!1,K=e.FORCE_BODY||!1,ne=!1!==e.SANITIZE_DOM,re=!1!==e.KEEP_CONTENT,oe=e.IN_PLACE||!1,F=e.ALLOWED_URI_REGEXP||F,me=e.NAMESPACE||he,ge=ge=-1===ye.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,be="application/xhtml+xml"===ge?function(e){return e}:tl,X&&(W=!1),J&&(Y=!0),ie&&(j=ul({},[].concat(Dl(yl))),_=[],!0===ie.html&&(ul(j,pl),ul(_,bl)),!0===ie.svg&&(ul(j,fl),ul(_,wl),ul(_,Cl)),!0===ie.svgFilters&&(ul(j,hl),ul(_,wl),ul(_,Cl)),!0===ie.mathMl&&(ul(j,vl),ul(_,kl),ul(_,Cl))),e.ADD_TAGS&&(j===q&&(j=cl(j)),ul(j,e.ADD_TAGS)),e.ADD_ATTR&&(_===z&&(_=cl(_)),ul(_,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&ul(ce,e.ADD_URI_SAFE_ATTR),e.FORBID_CONTENTS&&(ae===se&&(ae=cl(ae)),ul(ae,e.FORBID_CONTENTS)),re&&(j["#text"]=!0),Z&&ul(j,["html","head","body"]),j.table&&(ul(j,["tbody"]),delete U.tbody),$s&&$s(e),we=e)},xe=ul({},["mi","mo","mn","ms","mtext"]),Te=ul({},["foreignobject","desc","title","annotation-xml"]),Ee=ul({},fl);ul(Ee,hl),ul(Ee,ml);var Me=ul({},vl);ul(Me,gl);var Le=function(e){el(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=x}catch(t){e.remove()}}},Ne=function(e,t){try{el(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){el(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!_[e])if(Y||J)try{Le(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Ae=function(e){var t=void 0,n=void 0;if(K)e="<remove></remove>"+e;else{var r=nl(e,/^[\r\n\t ]+/);n=r&&r[0]}"application/xhtml+xml"===ge&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");var i=C?C.createHTML(e):e;if(me===he)try{t=(new h).parseFromString(i,ge)}catch(e){}if(!t||!t.documentElement){t=E.createDocument(me,"template",null);try{t.documentElement.innerHTML=ve?"":i}catch(e){}}var a=t.body||t.documentElement;return e&&n&&a.insertBefore(o.createTextNode(n),a.childNodes[0]||null),me===he?N.call(t,Z?"html":"body")[0]:Z?t.documentElement:a},Se=function(e){return M.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,null,!1)},De=function(e){return"object"===(void 0===s?"undefined":Sl(s))?e instanceof s:e&&"object"===(void 0===e?"undefined":Sl(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},Oe=function(e,t,r){D[e]&&Ys(D[e],(function(e){e.call(n,t,r,we)}))},Ie=function(e){var t,r=void 0;if(Oe("beforeSanitizeElements",e,null),!((t=e)instanceof p||t instanceof f||"string"==typeof t.nodeName&&"string"==typeof t.textContent&&"function"==typeof t.removeChild&&t.attributes instanceof d&&"function"==typeof t.removeAttribute&&"function"==typeof t.setAttribute&&"string"==typeof t.namespaceURI&&"function"==typeof t.insertBefore))return Le(e),!0;if(nl(e.nodeName,/[\u0080-\uFFFF]/))return Le(e),!0;var o=be(e.nodeName);if(Oe("uponSanitizeElement",e,{tagName:o,allowedTags:j}),!De(e.firstElementChild)&&(!De(e.content)||!De(e.content.firstElementChild))&&al(/<[/\w]/g,e.innerHTML)&&al(/<[/\w]/g,e.textContent))return Le(e),!0;if("select"===o&&al(/<template/i,e.innerHTML))return Le(e),!0;if(!j[o]||U[o]){if(re&&!ae[o]){var i=w(e)||e.parentNode,a=b(e)||e.childNodes;if(a&&i)for(var s=a.length-1;s>=0;--s)i.insertBefore(g(a[s],!0),y(e))}return Le(e),!0}return e instanceof l&&!function(e){var t=w(e);t&&t.tagName||(t={namespaceURI:he,tagName:"template"});var n=tl(e.tagName),r=tl(t.tagName);if(e.namespaceURI===fe)return t.namespaceURI===he?"svg"===n:t.namespaceURI===pe?"svg"===n&&("annotation-xml"===r||xe[r]):Boolean(Ee[n]);if(e.namespaceURI===pe)return t.namespaceURI===he?"math"===n:t.namespaceURI===fe?"math"===n&&Te[r]:Boolean(Me[n]);if(e.namespaceURI===he){if(t.namespaceURI===fe&&!Te[r])return!1;if(t.namespaceURI===pe&&!xe[r])return!1;var o=ul({},["title","style","font","a","script"]);return!Me[n]&&(o[n]||!Ee[n])}return!1}(e)?(Le(e),!0):"noscript"!==o&&"noembed"!==o||!al(/<\/no(script|embed)/i,e.innerHTML)?(X&&3===e.nodeType&&(r=e.textContent,r=rl(r,O," "),r=rl(r,I," "),e.textContent!==r&&(el(n.removed,{element:e.cloneNode()}),e.textContent=r)),Oe("afterSanitizeElements",e,null),!1):(Le(e),!0)},Re=function(e,t,n){if(ne&&("id"===t||"name"===t)&&(n in o||n in ke))return!1;if(W&&!V[t]&&al(R,t));else if($&&al(P,t));else{if(!_[t]||V[t])return!1;if(ce[t]);else if(al(F,rl(n,B,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==ol(n,"data:")||!le[e]){if(G&&!al(H,rl(n,B,"")));else if(n)return!1}else;}return!0},Pe=function(e){var t=void 0,r=void 0,o=void 0,i=void 0;Oe("beforeSanitizeAttributes",e,null);var a=e.attributes;if(a){var s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:_};for(i=a.length;i--;){var l=t=a[i],u=l.name,c=l.namespaceURI;if(r=il(t.value),o=be(u),s.attrName=o,s.attrValue=r,s.keepAttr=!0,s.forceKeepAttr=void 0,Oe("uponSanitizeAttribute",e,s),r=s.attrValue,!s.forceKeepAttr&&(Ne(u,e),s.keepAttr))if(al(/\/>/i,r))Ne(u,e);else{X&&(r=rl(r,O," "),r=rl(r,I," "));var d=be(e.nodeName);if(Re(d,o,r))try{c?e.setAttributeNS(c,u,r):e.setAttribute(u,r),Js(n.removed)}catch(e){}}}Oe("afterSanitizeAttributes",e,null)}},He=function e(t){var n=void 0,r=Se(t);for(Oe("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)Oe("uponSanitizeShadowNode",n,null),Ie(n)||(n.content instanceof i&&e(n.content),Pe(n));Oe("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(e,o){var a=void 0,l=void 0,u=void 0,c=void 0,d=void 0;if((ve=!e)&&(e="\x3c!--\x3e"),"string"!=typeof e&&!De(e)){if("function"!=typeof e.toString)throw sl("toString is not a function");if("string"!=typeof(e=e.toString()))throw sl("dirty is not a string, aborting")}if(!n.isSupported){if("object"===Sl(t.toStaticHTML)||"function"==typeof t.toStaticHTML){if("string"==typeof e)return t.toStaticHTML(e);if(De(e))return t.toStaticHTML(e.outerHTML)}return e}if(Q||Ce(o),n.removed=[],"string"==typeof e&&(oe=!1),oe);else if(e instanceof s)1===(l=(a=Ae("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===l.nodeName||"HTML"===l.nodeName?a=l:a.appendChild(l);else{if(!Y&&!X&&!Z&&-1===e.indexOf("<"))return C&&te?C.createHTML(e):e;if(!(a=Ae(e)))return Y?null:x}a&&K&&Le(a.firstChild);for(var p=Se(oe?e:a);u=p.nextNode();)3===u.nodeType&&u===c||Ie(u)||(u.content instanceof i&&He(u.content),Pe(u),c=u);if(c=null,oe)return e;if(Y){if(J)for(d=L.call(a.ownerDocument);a.firstChild;)d.appendChild(a.firstChild);else d=a;return ee&&(d=A.call(r,d,!0)),d}var f=Z?a.outerHTML:a.innerHTML;return X&&(f=rl(f,O," "),f=rl(f,I," ")),C&&te?C.createHTML(f):f},n.setConfig=function(e){Ce(e),Q=!0},n.clearConfig=function(){we=null,Q=!1},n.isValidAttribute=function(e,t,n){we||Ce({});var r=be(e),o=be(t);return Re(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&(D[e]=D[e]||[],el(D[e],t))},n.removeHook=function(e){D[e]&&Js(D[e])},n.removeHooks=function(e){D[e]&&(D[e]=[])},n.removeAllHooks=function(){D={}},n}(),Rl=["iframe","embed"],Pl=[];function Hl(e){je(Rl,e)&&Pl.push(e.toLowerCase())}function Bl(e,t){return Il.sanitize(e,z({ADD_TAGS:Pl,ADD_ATTR:["rel","target","hreflang","type"],FORBID_TAGS:["input","script","textarea","form","button","select","meta","style","link","title","object","base"]},t))}function Fl(e,t){return e.literal.replace(new RegExp("(<\\s*"+t+"[^>]*>)|(</"+t+"\\s*[>])","ig"),"").trim()}function jl(e){var t=(e=e.match(Zt)[0]).match(new RegExp(Wt,"g"));return t?t.reduce((function(e,t){var n=t.trim().split("="),r=n[0],o=n.slice(1);return o.length&&(e[r]=o.join("=").replace(/'|"/g,"").trim()),e}),{}):{}}function ql(e){return rt(e.attributes).reduce((function(e,t){return e[t.nodeName]=t.nodeValue,e}),{})}function _l(e,t,n,r){var o=r.getToDOMNode(t)(e),i=n(o.outerHTML),a=document.createElement("div");return a.innerHTML=i,{dom:o=a.firstChild,htmlAttrs:ql(o)}}var zl={htmlBlock:function(e,t,n){return{atom:!0,content:"block+",group:"block",attrs:{htmlAttrs:{default:{}},childrenHTML:{default:""},htmlBlock:{default:!0}},parseDOM:[{tag:e,getAttrs:function(e){return{htmlAttrs:ql(e),childrenHTML:e.innerHTML}}}],toDOM:function(r){var o=_l(r,e,t,n),i=o.dom,a=o.htmlAttrs;return a.class=a.class?a.class+" html-block":"html-block",U([e,a],rt(i.childNodes))}}},htmlInline:function(e,t,n){return{attrs:{htmlAttrs:{default:{}},htmlInline:{default:!0}},parseDOM:[{tag:e,getAttrs:function(e){return{htmlAttrs:ql(e)}}}],toDOM:function(r){var o=_l(r,e,t,n).htmlAttrs;return[e,o,0]}}}};var Ul=/^\s*<\s*\//,Vl={paragraph:function(e,t){var n=t.entering,r=t.origin;return t.options.nodeId?{type:n?"openTag":"closeTag",outerNewLine:!0,tagName:"p"}:r()},softbreak:function(e){return{type:"html",content:e.prev&&"htmlInline"===e.prev.type&&/<br ?\/?>/.test(e.prev.literal)?"\n":"<br>\n"}},item:function(e,t){if(t.entering){var n={},r=[];return e.listData.task&&(n["data-task"]="",r.push("task-list-item"),e.listData.checked&&(r.push("checked"),n["data-task-checked"]="")),{type:"openTag",tagName:"li",classNames:r,attributes:n,outerNewLine:!0}}return{type:"closeTag",tagName:"li",outerNewLine:!0}},code:function(e){return[{type:"openTag",tagName:"code",attributes:{"data-backticks":String(e.tickCount)}},{type:"text",content:e.literal},{type:"closeTag",tagName:"code"}]},codeBlock:function(e){var t=e,n=t.fenceLength,r=t.info,o=r?r.split(/\s+/):[],i=[],a={};if(n>3&&(a["data-backticks"]=n),o.length>0&&o[0].length>0){var s=o[0];i.push("lang-"+s),a["data-language"]=s}return[{type:"openTag",tagName:"pre",classNames:i},{type:"openTag",tagName:"code",attributes:a},{type:"text",content:e.literal},{type:"closeTag",tagName:"code"},{type:"closeTag",tagName:"pre"}]},customInline:function(e,t){var n=t.origin,r=t.entering,o=t.skipChildren,i=e.info;return-1!==i.indexOf("widget")&&r?(o(),[{type:"openTag",tagName:"span",classNames:["tui-widget"]},{type:"html",content:St(i,Pt(e)).outerHTML},{type:"closeTag",tagName:"span"}]):n()}};function $l(e,t){var n=z({},Vl);return e&&(n.link=function(t,n){var r=n.entering,o=(0,n.origin)();return r&&(o.attributes=z(z({},o.attributes),e)),o}),t&&Object.keys(t).forEach((function(e){var r=n[e],o=t[e];r&&xn(o)?n[e]=function(e,t){var n=z({},t);return n.origin=function(){return r(e,t)},o(e,n)}:je(["htmlBlock","htmlInline"],e)&&!xn(o)?n[e]=function(e,t){var n=e.literal.match(Zt);if(n){var r=n[0],i=n[1],a=n[3],s=(i||a).toLowerCase(),l=o[s],u=Fl(e,s);if(l){var c=z({},e);return c.attrs=jl(r),c.childrenHTML=u,c.type=s,t.entering=!Ul.test(e.literal),l(c,t)}}return t.origin()}:n[e]=o})),n}var Wl=["list","item","blockQuote"],Gl=["UL","OL","BLOCKQUOTE"];function Xl(e,t){var n,r=e.child(t);return!r.childCount||1===r.childCount&&!(null===(n=r.firstChild.text)||void 0===n?void 0:n.trim())}function Zl(e,t,n){var r=ct(t)-1,o=dt(t)-1,i=n[r].getBoundingClientRect(),a=n[o].offsetTop-n[r].offsetTop+n[o].clientHeight;return{height:a<=0?n[r].clientHeight:a+Ql(e,n,Math.min(o+1,e.childCount-1)),rect:i}}function Ql(e,t,n){for(var r=e.childCount-1,o=0;n<=r&&Xl(e,n);)o+=t[n].clientHeight,n+=1;return o}function Kl(e,t){for(var n=0;e&&e!==t&&(je(Gl,e.tagName)||(n+=e.offsetTop),e.offsetParent!==t.offsetParent);)e=e.parentElement;return n}function Yl(e,t,n){return e&&t>n+e.offsetTop?Yl(e.nextElementSibling,t,n)||e:null}function Jl(e,t){for(var n=e.querySelector('[data-nodeid="'+t.id+'"]');!n||ht(t);)t=t.parent,n=e.querySelector('[data-nodeid="'+t.id+'"]');return function(e){var t=e.mdNode,n=e.el;for(;(je(Wl,t.type)||"table"===t.type)&&t.firstChild;)t=t.firstChild,n=n.firstElementChild;return{mdNode:t,el:n}}({mdNode:t,el:n})}var eu={};function tu(e){e&&(delete eu[Number(e.getAttribute("data-nodeid"))],rt(e.children).forEach((function(e){tu(e)})))}function nu(e,t,n){var r,o=eu[r=n]&&eu[r].height,i=function(e){return eu[e]&&eu[e].offsetTop}(n),a=o||e.clientHeight,s=i||Kl(e,t)||e.offsetTop;return o||function(e,t){eu[e]=eu[e]||{},eu[e].height=t}(n,a),i||function(e,t){eu[e]=eu[e]||{},eu[e].offsetTop=t}(n,s),{nodeHeight:a,offsetTop:s}}var ru=tn("md-preview-highlight");var ou=function(){function e(e,t){var n=document.createElement("div");this.el=n,this.eventEmitter=e,this.isViewer=!!t.isViewer,this.el.className=tn("md-preview");var r=t.linkAttributes,o=t.customHTMLRenderer,i=t.sanitizer,a=t.highlight,s=void 0!==a&&a;this.renderer=new js({gfm:!0,nodeId:!0,convertors:$l(r,o)}),this.cursorNodeId=null,this.sanitizer=i,this.initEvent(s),this.initContentSection(),this.isViewer&&(this.previewContent.style.overflowWrap="break-word")}return e.prototype.initContentSection=function(){this.previewContent=sn('<div class="'+tn("contents")+'"></div>'),this.isViewer||this.el.appendChild(this.previewContent)},e.prototype.toggleActive=function(e){an(this.el,"active",e)},e.prototype.initEvent=function(e){var t=this;this.eventEmitter.listen("updatePreview",this.update.bind(this)),this.isViewer||(e&&(this.eventEmitter.listen("changeToolbarState",(function(e){var n=e.mdNode,r=e.cursorPos;t.updateCursorNode(n,r)})),this.eventEmitter.listen("blur",(function(){t.removeHighlight()}))),To(this.el,"scroll",(function(e){t.eventEmitter.emit("scroll","preview",function(e,t){for(var n=t,r=null;n;){var o=n.firstElementChild;if(!o)break;r=n,n=Yl(o,e,Kl(n,t))}var i=n||r;return i===t?null:i}(e.target.scrollTop,t.previewContent))})),this.eventEmitter.listen("changePreviewTabPreview",(function(){return t.toggleActive(!0)})),this.eventEmitter.listen("changePreviewTabWrite",(function(){return t.toggleActive(!1)})))},e.prototype.removeHighlight=function(){if(this.cursorNodeId){var e=this.getElementByNodeId(this.cursorNodeId);e&&we(e,ru)}},e.prototype.updateCursorNode=function(e,t){e&&("tableRow"===(e=bt(e,(function(e){return!function(e){switch(e.type){case"code":case"text":case"emph":case"strong":case"strike":case"link":case"image":case"htmlInline":case"linebreak":case"softbreak":case"customInline":return!0;default:return!1}}(e)}))).type?e=function(e,t){for(var n=e.firstChild;n&&n.next&&!(pt(n.next)>t+1);)n=n.next;return n}(e,t[1]):"tableBody"===e.type&&(e=null));var n=e?e.id:null;if(this.cursorNodeId!==n){var r=this.getElementByNodeId(this.cursorNodeId),o=this.getElementByNodeId(n);r&&we(r,ru),o&&me(o,ru),this.cursorNodeId=n}},e.prototype.getElementByNodeId=function(e){return e?this.previewContent.querySelector('[data-nodeid="'+e+'"]'):null},e.prototype.update=function(e){var t=this;e.forEach((function(e){return t.replaceRangeNodes(e)})),this.eventEmitter.emit("afterPreviewRender",this)},e.prototype.replaceRangeNodes=function(e){var t=this,n=e.nodes,r=e.removedNodeRange,o=this.previewContent,i=this.eventEmitter.emitReduce("beforePreviewRender",this.sanitizer(n.map((function(e){return t.renderer.render(e)})).join("")));if(r){var a=r.id,s=a[0],l=a[1],u=this.getElementByNodeId(s),c=this.getElementByNodeId(l);if(u){u.insertAdjacentHTML("beforebegin",i);for(var d=u;d&&d!==c;){var p=d.nextElementSibling;on(d),tu(d),d=p}(null==d?void 0:d.parentNode)&&(on(d),tu(d))}}else o.insertAdjacentHTML("afterbegin",i)},e.prototype.getRenderer=function(){return this.renderer},e.prototype.destroy=function(){bo(this.el,"scroll"),this.el=null},e.prototype.getElement=function(){return this.el},e.prototype.getHTML=function(){return pn(this.previewContent.innerHTML)},e.prototype.setHTML=function(e){this.previewContent.innerHTML=e},e.prototype.setHeight=function(e){ne(this.el,{height:e+"px"})},e.prototype.setMinHeight=function(e){ne(this.el,{minHeight:e+"px"})},e}();function iu(e,t){for(var n=e.depth;n;){var r=e.node(n);if(t(r,n))return{node:r,depth:n,offset:n>0?e.before(n):0};n-=1}return null}function au(e){return!!iu(e,(function(e){var t=e.type;return"listItem"===t.name||"bulletList"===t.name||"orderedList"===t.name}))}function su(e){return!!iu(e,(function(e){var t=e.type;return"tableHeadCell"===t.name||"tableBodyCell"===t.name}))}function lu(e){return iu(e,(function(e){return"listItem"===e.type.name}))}function uu(e){return{tag:e,getAttrs:function(e){var t=e.getAttribute("data-raw-html");return z({},t&&{rawHTML:t})}}}function cu(e){return Object.keys(e).reduce((function(t,n){return"rawHTML"!==n&&e[n]&&(t[n="className"===n?"class":n]=e[n]),t}),{})}function du(e){return{tag:e,getAttrs:function(e){return["rawHTML","colspan","rowspan","extended"].reduce((function(t,n){var r="rawHTML"===n?"data-raw-html":n,o=e.getAttribute(r);return o&&(t[n]=je(["rawHTML","extended"],n)?o:Number(o)),t}),{})}}}function pu(e){var t=e.htmlAttrs,n=e.classNames;return z(z({},t),{class:n?n.join(" "):null})}function fu(e,r,i,a){var s=r.$from,l=r.$to,u=r.depth,p=r,f=!1;if(u>=2&&s.node(u-1).type.compatibleContent(i)&&0===r.startIndex&&s.index(u-1)){var h=e.doc.resolve(r.start-2);p=new o(h,h,u),r.endIndex<r.parent.childCount&&(r=new o(s,e.doc.resolve(l.end(u)),u)),f=!0}var m=function(e,t,n,r){var o=function(e,t){var n=e.parent,r=e.startIndex,o=e.endIndex,i=n.contentMatchAt(r).findWrapping(t);if(i){var a=i.length?i[0]:t;return n.canReplaceWith(r,o,a)?i:null}return null}(e,n),i=function(e,t){var n=e.parent,r=e.startIndex,o=e.endIndex,i=n.child(r),a=t.contentMatch.findWrapping(i.type);if(a){for(var s=(a.length?a[a.length-1]:t).contentMatch,l=r;s&&l<o;l+=1)s=s.matchType(n.child(l).type);if(s&&s.validEnd)return a}return null}(t,n);if(o&&i){var a=o.map((function(e){return{type:e}})),s=i.map((function(e){return{type:e,attrs:r}}));return a.concat({type:n}).concat(s)}return null}(p,r,i,a);return m?function(e,r,o,i,a){for(var s=r.start,l=r.end,u=r.startIndex,p=r.endIndex,f=r.parent,h=t.empty,m=o.length-1;m>=0;m-=1)h=t.from(o[m].type.create(o[m].attrs,h));e.step(new c(s-(i?2:0),l,s,l,new n(h,0,0),o.length,!0));var v=0;for(m=0;m<o.length;m+=1)if(o[m].type===a){v=m+1;break}for(var g=o.length-v,y=s+o.length-(i?2:0),b=(m=u,p);m<b;m+=1)!(m===u)&&d(e.doc,y,g)&&(e.split(y,g),y+=2*g),y+=f.child(m).nodeSize;return e}(e,r,m,f,i):e}function hu(e,t){for(var n=e.resolve(t);"paragraph"!==n.node().type.name;)t-=2,n=e.resolve(t);return lu(n)}function mu(e){return function(t,n){var r=t.selection,o=t.tr,i=r.$from,a=r.$to,s=i.blockRange(a);if(s){var l=au(i)?function(e,t,n){var r=t.$from,o=t.$to,i=lu(r),a=lu(o);if(i&&a)for(;a;){var s=a.offset,l=a.node,u=a.depth;l.attrs.task&&e.setNodeMarkup(s,null,{task:!1,checked:!1});var c=e.doc.resolve(s);if(c.parent.type!==n){var d=c.before(u-1);e.setNodeMarkup(d,n)}if(s===i.offset)break;a=hu(e.doc,s)}return e}(o,s,e):fu(o,s,e);return n(l),!0}return!1}}function vu(){return function(e,t){var n=e.selection,r=e.tr,o=e.schema,i=n.$from,a=n.$to,s=i.blockRange(a);if(s){var l=au(i)?function(e,t){var n=t.$from,r=t.$to,o=lu(n),i=lu(r);if(o&&i)for(;i;){var a=i.offset,s={task:!i.node.attrs.task,checked:!1};if(e.setNodeMarkup(a,null,s),a===o.offset)break;i=hu(e.doc,a)}return e}(r,s):fu(r,s,o.nodes.bulletList,{task:!0});return t(l),!0}return!1}}function gu(e){return function(r,i){var a=r.tr,s=r.selection,l=s.$from,u=s.$to,d=l.blockRange(u,(function(t){var n=t.childCount,r=t.firstChild;return!!n&&r.type===e}));if(d){var p=l.node(d.depth-1).type===e?function(e,r,i){var a=r.$from,s=r.$to,l=r.end,u=r.depth,d=r.parent,p=s.end(u);return l<p&&(e.step(new c(l-1,p,l,p,new n(t.from(i.create(null,d.copy())),1,0),1,!0)),r=new o(e.doc.resolve(a.pos),e.doc.resolve(p),u)),e.lift(r,f(r)),e}(a,d,e):function(e,r){for(var o=r.parent,i=r.end,a=r.endIndex-1,s=r.startIndex;a>s;a-=1)i-=o.child(a).nodeSize,e.delete(i-1,i+1);var l=e.doc.resolve(r.start),u=l.nodeAfter,d=0===r.startIndex,p=r.endIndex===o.childCount,f=l.node(-1),h=l.index(-1),m=f.canReplace(h+(d?0:1),h+1,null==u?void 0:u.content.append(p?t.empty:t.from(o)));if(u&&m){var v=l.pos,g=v+u.nodeSize;e.step(new c(v-(d?1:0),g+(p?1:0),v+1,g-1,new n((d?t.empty:t.from(o.copy(t.empty))).append(p?t.empty:t.from(o.copy(t.empty))),d?0:1,p?0:1),d?0:1))}return e}(a,d);return i(p),!0}return!1}}function yu(){return function(){return function(e,r){var o=e.selection,i=e.schema,a=o.$from,s=o.$to;return!(!a.blockRange(s)||!au(a))&&function(e){return function(r,o){var i=r.tr,a=r.selection,s=a.$from,l=a.$to,u=s.blockRange(l,(function(t){var n=t.childCount,r=t.firstChild;return!!n&&r.type===e}));if(u&&u.startIndex>0){var d=u.parent,p=d.child(u.startIndex-1);if(p.type!==e)return!1;var f=p.lastChild&&p.lastChild.type===d.type,h=f?t.from(e.create()):null,m=new n(t.from(e.create(null,t.from(d.type.create(null,h)))),f?3:1,0),v=u.start,g=u.end;return i.step(new c(v-(f?3:1),g,v,g,m,1,!0)),o(i),!0}return!1}}(i.nodes.listItem)(e,r)}}}function bu(){return{indent:yu(),outdent:function(){return function(e,t){var n=e.selection,r=e.schema,o=n.$from,i=n.$to;return!(!o.blockRange(i)||!au(o))&&gu(r.nodes.listItem)(e,t)}}}}var wu=new Map,ku=function(){function e(e,t,n,r){this.table=e,this.tableRows=t,this.tableStartPos=n,this.rowInfo=r}return e.create=function(t){var n=iu(t,(function(e){return"table"===e.type.name}));if(n){var r=n.node,o=n.depth,i=n.offset,a=wu.get(r);if((null==a?void 0:a.tableStartPos)===i+1)return a;var s=[],l=t.start(o),u=r.child(0),c=r.child(1),d=Cu(u,l),p=Cu(c,l+u.nodeSize);u.forEach((function(e){return s.push(e)})),c.forEach((function(e){return s.push(e)}));var f=new e(r,s,l,d.concat(p));return wu.set(r,f),f}return null},Object.defineProperty(e.prototype,"totalRowCount",{get:function(){return this.rowInfo.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"totalColumnCount",{get:function(){return this.rowInfo[0].length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tableStartOffset",{get:function(){return this.tableStartPos},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tableEndOffset",{get:function(){return this.tableStartPos+this.table.nodeSize-1},enumerable:!1,configurable:!0}),e.prototype.getCellInfo=function(e,t){return this.rowInfo[e][t]},e.prototype.posAt=function(e,t){for(var n=0,r=this.tableStartPos;;n+=1){var o=r+this.tableRows[n].nodeSize;if(n===e){for(var i=t;i<this.totalColumnCount&&this.rowInfo[n][i].offset<r;)i+=1;return i===this.totalColumnCount?o:this.rowInfo[n][i].offset}r=o}},e.prototype.getNodeAndPos=function(e,t){var n=this.rowInfo[e][t];return{node:this.table.nodeAt(n.offset-this.tableStartOffset),pos:n.offset}},e.prototype.extendedRowspan=function(e,t){return!1},e.prototype.extendedColspan=function(e,t){return!1},e.prototype.getRowspanCount=function(e,t){return 0},e.prototype.getColspanCount=function(e,t){return 0},e.prototype.decreaseColspanCount=function(e,t){return 0},e.prototype.decreaseRowspanCount=function(e,t){return 0},e.prototype.getColspanStartInfo=function(e,t){return null},e.prototype.getRowspanStartInfo=function(e,t){return null},e.prototype.getCellStartOffset=function(e,t){var n=this.rowInfo[e][t].offset;return this.extendedRowspan(e,t)?this.posAt(e,t):n},e.prototype.getCellEndOffset=function(e,t){var n=this.rowInfo[e][t],r=n.offset,o=n.nodeSize;return this.extendedRowspan(e,t)?this.posAt(e,t):r+o},e.prototype.getCellIndex=function(e){for(var t=0;t<this.totalRowCount;t+=1)for(var n=this.rowInfo[t],r=0;r<this.totalColumnCount;r+=1)if(n[r].offset+1>e.pos)return[t,r];return[0,0]},e.prototype.getRectOffsets=function(e,t){var n,r,o;void 0===t&&(t=e),e.pos>t.pos&&(e=(n=[t,e])[0],t=n[1]);var i=this.getCellIndex(e),a=i[0],s=i[1],l=this.getCellIndex(t),u=l[0],c=l[1];return a=(r=tt(a,u))[0],u=r[1],s=(o=tt(s,c))[0],c=o[1],this.getSpannedOffsets({startRowIdx:a,startColIdx:s,endRowIdx:u,endColIdx:c})},e.prototype.getSpannedOffsets=function(e){return e},e}(),Cu=function(e,t){var n=[];return e.forEach((function(e,r){var o={rowspanMap:{},colspanMap:{},length:0};e.forEach((function(e,n){for(var i=e.nodeSize,a=0;o[a];)a+=1;o[a]={offset:t+r+n+2,nodeSize:i},o.length+=1})),n.push(o)})),n};function xu(e,t){return et(ku.prototype,e),Cu=t,ku}var Tu=function(e){function r(t,n){void 0===n&&(n=t);var r=this,o=t.node(0),i=ku.create(t),a=i.getRectOffsets(t,n),s=function(e,t,n){for(var r=n.startRowIdx,o=n.startColIdx,i=n.endRowIdx,a=n.endColIdx,s=[],l=r;l<=i;l+=1)for(var u=o;u<=a;u+=1){var c=t.getCellInfo(l,u),d=c.offset,p=c.nodeSize;s.push(new k(e.resolve(d+1),e.resolve(d+p-1)))}return s}(o,i,a);return(r=e.call(this,s[0].$from,s[0].$to,s)||this).startCell=t,r.endCell=n,r.offsetMap=i,r.isCellSelection=!0,r.visible=!1,r}return _(r,e),r.prototype.map=function(e,t){var n=this.startCell.pos,o=this.endCell.pos,i=e.resolve(t.map(n)),a=e.resolve(t.map(o)),s=ku.create(i);if(this.offsetMap.totalColumnCount>s.totalColumnCount||this.offsetMap.totalRowCount>s.totalRowCount){var l={tableBody:1,tableRow:2,tableCell:3,paragraph:4}[a.parent.type.name],u=a.end(a.depth-l),c=Math.min(u-4,a.pos);return v.create(e,c)}return new r(i,a)},r.prototype.eq=function(e){return e instanceof r&&e.startCell.pos===this.startCell.pos&&e.endCell.pos===this.endCell.pos},r.prototype.content=function(){for(var e=this.startCell.node(-2),r=this.startCell.start(-2),o=e.child(1).firstChild,i=e.child(0).type.create(),a=e.child(1).type.create(),s=ku.create(this.startCell),l=s.getRectOffsets(this.startCell,this.endCell),u=l.startRowIdx,c=l.startColIdx,d=l.endRowIdx,p=l.endColIdx,f=!1,h=u;h<=d;h+=1){for(var m=[],v=c;v<=p;v+=1){var g=s.getCellInfo(h,v).offset,y=e.nodeAt(g-r);y&&(f="tableHeadCell"===y.type.name,s.extendedRowspan(h,v)||s.extendedColspan(h,v)?m.push(y.type.create({extended:!0})):m.push(y.copy(y.content)))}var b=o.copy(t.from(m)),w=f?i:a;w.content=w.content.append(t.from(b))}return new n(function(e,n){var r=[];return e.childCount&&r.push(e),n.childCount&&r.push(n),t.from(r)}(i,a),1,1)},r.prototype.toJSON=function(){return JSON.stringify(this)},r}(b);function Eu(e,t,n,r){for(var o=n.nodes,i=o.tableRow,a=o.tableBodyCell,s=o.paragraph,l=[],u=0;u<e;u+=1){for(var c=[],d=0;d<t;d+=1){var p=r&&r[u*t+d],f=s.create(null,p?n.text(p):[]);c.push(a.create(null,f))}l.push(i.create(null,c))}return l}function Mu(e,t,n,r){void 0===r&&(r=null);for(var o=n.nodes,i=o.tableHeadCell,a=o.tableBodyCell,s=o.paragraph,l=0===t?i:a,u=[],c=0;c<e;c+=1)u.push(l.create(r,s.create()));return u}function Lu(e,t){for(;e&&e!==t;){if("TD"===e.nodeName||"TH"===e.nodeName)return e;e=e.parentNode}return null}function Nu(e){return iu(e,(function(e){var t=e.type;return"tableHeadCell"===t.name||"tableBodyCell"===t.name}))}function Au(e){if(e instanceof v){var t=e.$anchor,n=Nu(t);if(n){var r=t.node(0).resolve(t.before(n.depth));return{anchor:r,head:r}}}var o=e;return{anchor:o.startCell,head:o.endCell}}function Su(e){var t;if(e.size){var n=e.content,r=e.openStart,o=e.openEnd;if(1!==n.childCount)return null;for(;1===n.childCount&&(r>0&&o>0||"table"===(null===(t=n.firstChild)||void 0===t?void 0:t.type.name));)r-=1,o-=1,n=n.firstChild.content;if("tableHead"===n.firstChild.type.name||"tableBody"===n.firstChild.type.name)return n}return null}function Du(e){var t=e.startRowIdx,n=e.startColIdx;return{rowCount:e.endRowIdx-t+1,columnCount:e.endColIdx-n+1}}function Ou(e,t){return z(z({},e.attrs),t)}var Iu=new h("cellSelection"),Ru=function(){function e(e){this.view=e,this.handlers={mousedown:this.handleMousedown.bind(this),mousemove:this.handleMousemove.bind(this),mouseup:this.handleMouseup.bind(this)},this.startCellPos=null,this.init()}return e.prototype.init=function(){this.view.dom.addEventListener("mousedown",this.handlers.mousedown)},e.prototype.handleMousedown=function(e){var t=Lu(e.target,this.view.dom);if(2!==e.button){if(t){var n=this.getCellPos(e);n&&(this.startCellPos=n),this.bindEvent()}}else e.preventDefault()},e.prototype.handleMousemove=function(e){var t,n=Iu.getState(this.view.state),r=this.getCellPos(e),o=this.startCellPos;n?t=this.view.state.doc.resolve(n):o!==r&&(t=o),t&&o&&r&&this.setCellSelection(o,r)},e.prototype.handleMouseup=function(){this.startCellPos=null,this.unbindEvent(),null!==Iu.getState(this.view.state)&&this.view.dispatch(this.view.state.tr.setMeta(Iu,-1))},e.prototype.bindEvent=function(){var e=this.view.dom;e.addEventListener("mousemove",this.handlers.mousemove),e.addEventListener("mouseup",this.handlers.mouseup)},e.prototype.unbindEvent=function(){var e=this.view.dom;e.removeEventListener("mousemove",this.handlers.mousemove),e.removeEventListener("mouseup",this.handlers.mouseup)},e.prototype.getCellPos=function(e){var t=e.clientX,n=e.clientY,r=this.view.posAtCoords({left:t,top:n});if(r){var o=this.view.state.doc,i=o.resolve(r.pos),a=Nu(i);if(a){var s=i.before(a.depth);return o.resolve(s)}}return null},e.prototype.setCellSelection=function(e,t){var n=this.view.state,r=n.selection,o=n.tr,i=null===Iu.getState(this.view.state),a=new Tu(e,t);if(i||!r.eq(a)){var s=o.setSelection(a);i&&s.setMeta(Iu,t.pos),this.view.dispatch(s)}},e.prototype.destroy=function(){this.view.dom.removeEventListener("mousedown",this.handlers.mousedown)},e}(),Pu=tn("cell-selected");function Hu(e){var t=e.selection,n=e.doc;if(t instanceof Tu){var r=[];return t.ranges.forEach((function(e){var t=e.$from,n=e.$to;r.push(l.node(t.pos-1,n.pos+1,{class:Pu}))})),s.create(n,r)}return null}var Bu=function(){function e(){this.keys=[],this.values=[]}return e.prototype.getKeyIndex=function(e){return oe(e,this.keys)},e.prototype.get=function(e){return this.values[this.getKeyIndex(e)]},e.prototype.set=function(e,t){var n=this.getKeyIndex(e);return n>-1?this.values[n]=t:(this.keys.push(e),this.values.push(t)),this},e.prototype.has=function(e){return this.getKeyIndex(e)>-1},e.prototype.delete=function(e){var t=this.getKeyIndex(e);return t>-1&&(this.keys.splice(t,1),this.values.splice(t,1),!0)},e.prototype.forEach=function(e,t){var n=this;void 0===t&&(t=this),this.values.forEach((function(r,o){r&&n.keys[o]&&e.call(t,r,n.keys[o],n)}))},e.prototype.clear=function(){this.keys=[],this.values=[]},e}(),Fu="en-US",ju=function(){function e(){this.code=Fu,this.langs=new Bu}return e.prototype.setCode=function(e){this.code=e||Fu},e.prototype.setLanguage=function(e,t){var n=this;(e=[].concat(e)).forEach((function(e){if(n.langs.has(e)){var r=n.langs.get(e);n.langs.set(e,W(r,t))}else n.langs.set(e,t)}))},e.prototype.get=function(e,t){t||(t=this.code);var n=this.langs.get(t);n||(n=this.langs.get(Fu));var r=n[e];if(!r)throw new Error('There is no text key "'+e+'" in '+t);return r},e}(),qu=new ju,_u=[[{action:"Add row to up",command:"addRowToUp",disableInThead:!0,className:"add-row-up"},{action:"Add row to down",command:"addRowToDown",disableInThead:!0,className:"add-row-down"},{action:"Remove row",command:"removeRow",disableInThead:!0,className:"remove-row"}],[{action:"Add column to left",command:"addColumnToLeft",className:"add-column-left"},{action:"Add column to right",command:"addColumnToRight",className:"add-column-right"},{action:"Remove column",command:"removeColumn",className:"remove-column"}],[{action:"Align column to left",command:"alignColumn",payload:{align:"left"},className:"align-column-left"},{action:"Align column to center",command:"alignColumn",payload:{align:"center"},className:"align-column-center"},{action:"Align column to right",command:"alignColumn",payload:{align:"right"},className:"align-column-right"}],[{action:"Remove table",command:"removeTable",className:"remove-table"}]];function zu(e,t){return _u.map((function(n){return n.map((function(n){var r=n.action,o=n.command,i=n.payload,a=n.disableInThead,s=n.className;return{label:qu.get(r),onClick:function(){e.emit("command",o,i)},disabled:t&&!!a,className:s}}))})).concat()}var Uu=["image","link","customBlock","frontMatter"],Vu=["strong","strike","emph","code"],$u=["bulletList","orderedList","taskList"];function Wu(e,t,n){var r=e.$from,o=e.$to,i=e.from,a=e.to,s={indent:{active:!1,disabled:!0},outdent:{active:!1,disabled:!0}};return t.nodesBetween(i,a,(function(e,t,i){var a=function(e,t){var n=e.type.name;return"listItem"===n?e.attrs.task?"taskList":t.type.name:-1!==n.indexOf("table")?"table":n}(e,i);je(Uu,a)||(je($u,a)?(!function(e,t){t[e]={active:!0},$u.filter((function(t){return t!==e})).forEach((function(e){t[e]&&delete t[e]}))}(a,s),s.indent.disabled=!1,s.outdent.disabled=!1):"paragraph"===a||"text"===a?function(e,t,n,r){Vu.forEach((function(o){var i=n.marks[o],a=e.marksAcross(t)||[];i.isInSet(a)&&(r[o]={active:!0})}))}(r,o,n,s):s[a]={active:!0})})),s}function Gu(e){return new g({view:function(){return{update:function(t){var n=t.state,r=n.selection,o=n.doc,i=n.schema;e.emit("changeToolbarState",{toolbarState:Wu(r,o,i)})}}}})}var Xu=function(){function e(e,t,n,r){var o=this;this.openEditor=function(){if(o.innerEditorView)throw new Error("The editor is already opened.");o.dom.draggable=!1,o.wrapper.style.display="none",o.innerViewContainer.style.display="block",o.innerEditorView=new u(o.innerViewContainer,{state:m.create({doc:o.node,plugins:[C({"Mod-z":function(){return B(o.innerEditorView.state,o.innerEditorView.dispatch)},"Shift-Mod-z":function(){return F(o.innerEditorView.state,o.innerEditorView.dispatch)},Tab:function(e,t){return t(e.tr.insertText("\t")),!0},Enter:O,Escape:function(){return o.cancelEditing(),!0},"Ctrl-Enter":function(){return o.saveAndFinishEditing(),!0}}),H()]}),dispatchTransaction:function(e){return o.dispatchInner(e)},handleDOMEvents:{mousedown:function(){return o.editorView.hasFocus()&&o.innerEditorView.focus(),!0},blur:function(){return o.saveAndFinishEditing(),!0}}}),o.innerEditorView.focus()},this.node=e,this.editorView=t,this.getPos=n,this.toDOMAdaptor=r,this.innerEditorView=null,this.canceled=!1,this.dom=document.createElement("div"),this.dom.className=tn("custom-block"),this.wrapper=document.createElement("div"),this.wrapper.className=tn("custom-block-view"),this.createInnerViewContainer(),this.renderCustomBlock(),this.dom.appendChild(this.innerViewContainer),this.dom.appendChild(this.wrapper)}return e.prototype.renderToolArea=function(){var e=this,t=document.createElement("div"),n=document.createElement("span"),r=document.createElement("button");t.className="tool",n.textContent=this.node.attrs.info,n.className="info",r.type="button",r.addEventListener("click",(function(){return e.openEditor()})),t.appendChild(n),t.appendChild(r),this.wrapper.appendChild(t)},e.prototype.renderCustomBlock=function(){var e=this.toDOMAdaptor.getToDOMNode(this.node.attrs.info);if(e){for(var t=e(this.node);this.wrapper.hasChildNodes();)this.wrapper.removeChild(this.wrapper.lastChild);t&&this.wrapper.appendChild(t),this.renderToolArea()}},e.prototype.createInnerViewContainer=function(){this.innerViewContainer=document.createElement("div"),this.innerViewContainer.className=tn("custom-block-editor"),this.innerViewContainer.style.display="none"},e.prototype.closeEditor=function(){this.innerEditorView&&(this.innerEditorView.destroy(),this.innerEditorView=null,this.innerViewContainer.style.display="none"),this.wrapper.style.display="block"},e.prototype.saveAndFinishEditing=function(){var e=this.editorView.state.selection.to,t=this.editorView.state;this.editorView.dispatch(t.tr.setSelection(at(t.tr,e))),this.editorView.focus(),this.renderCustomBlock(),this.closeEditor()},e.prototype.cancelEditing=function(){var e=j(this.innerEditorView.state);for(this.canceled=!0;e--;)B(this.innerEditorView.state,this.innerEditorView.dispatch),B(this.editorView.state,this.editorView.dispatch);this.canceled=!1;var t=this.editorView.state.selection.to,n=this.editorView.state;this.editorView.dispatch(n.tr.setSelection(v.create(n.doc,t))),this.editorView.focus(),this.closeEditor()},e.prototype.dispatchInner=function(e){var t=this.innerEditorView.state.applyTransaction(e),n=t.state,r=t.transactions;if(this.innerEditorView.updateState(n),!this.canceled&&xn(this.getPos)){for(var o=this.editorView.state.tr,i=p.offset(this.getPos()+1),a=0;a<r.length;a+=1)for(var s=r[a].steps,l=0;l<s.length;l+=1)o.step(s[l].map(i));o.docChanged&&this.editorView.dispatch(o)}},e.prototype.update=function(e){return!!e.sameMarkup(this.node)&&(this.node=e,this.innerEditorView||this.renderCustomBlock(),!0)},e.prototype.stopEvent=function(e){return!!this.innerEditorView&&!!e.target&&this.innerEditorView.dom.contains(e.target)},e.prototype.ignoreMutation=function(){return!0},e.prototype.destroy=function(){this.dom.removeEventListener("dblclick",this.openEditor),this.closeEditor()},e}(),Zu="image-link",Qu=function(){function e(e,t,n,r){var o,i=this;this.handleMousedown=function(e){e.preventDefault();var t=e.target,n=e.offsetX,r=e.offsetY;if(i.imageLink&&xn(i.getPos)&&jt(t,Zu)){var o=getComputedStyle(t,":before");if(e.stopPropagation(),Jt(o,n,r)){var a=i.view.state.tr,s=i.getPos();a.setSelection(at(a,s,s+1)),i.view.dispatch(a),i.eventEmitter.emit("openPopup","link",i.imageLink.attrs)}}},this.node=e,this.view=t,this.getPos=n,this.eventEmitter=r,this.imageLink=null!==(o=e.marks.filter((function(e){return"link"===e.type.name}))[0])&&void 0!==o?o:null,this.dom=this.createElement(),this.bindEvent()}return e.prototype.createElement=function(){var e=this.createImageElement(this.node);if(this.imageLink){var t=document.createElement("span");return t.className=Zu,t.appendChild(e),t}return e},e.prototype.createImageElement=function(e){var t=document.createElement("img"),n=e.attrs,r=n.imageUrl,o=n.altText,i=pu(e.attrs);return t.src=r,o&&(t.alt=o),dn(i,t),t},e.prototype.bindEvent=function(){this.imageLink&&this.dom.addEventListener("mousedown",this.handleMousedown)},e.prototype.stopEvent=function(){return!0},e.prototype.destroy=function(){this.imageLink&&this.dom.removeEventListener("mousedown",this.handleMousedown)},e}(),Ku=function(){function e(e,t,n,r){var o=this;this.contentDOM=null,this.input=null,this.timer=null,this.handleMousedown=function(e){var t=e.target;if("none"!==getComputedStyle(t,":after").backgroundImage&&xn(o.getPos)){var n=o.view.coordsAtPos(o.getPos()),r=n.top,i=n.right;o.createLanguageEditor({top:r,right:i})}},this.handleKeydown=function(e){"Enter"===e.key&&o.input&&(e.preventDefault(),o.changeLanguage())},this.node=e,this.view=t,this.getPos=n,this.eventEmitter=r,this.createElement(),this.bindDOMEvent(),this.bindEvent()}return e.prototype.createElement=function(){var e=this.node.attrs.language,t=document.createElement("div");t.setAttribute("data-language",e||"text"),t.className="toastui-editor-ww-code-block";var n=this.createCodeBlockElement(),r=n.firstChild;t.appendChild(n),this.dom=t,this.contentDOM=r},e.prototype.createCodeBlockElement=function(){var e=document.createElement("pre"),t=document.createElement("code"),n=this.node.attrs.language,r=pu(this.node.attrs);return n&&t.setAttribute("data-language",n),dn(r,e),e.appendChild(t),e},e.prototype.createLanguageEditor=function(e){var t=this,n=e.top,r=e.right,o=document.createElement("span");o.className="toastui-editor-ww-code-block-language";var i=document.createElement("input");i.type="text",i.value=this.node.attrs.language,o.appendChild(i),this.view.dom.parentElement.appendChild(o);var a=o.clientWidth;ne(o,{top:n+10+"px",left:r-a-10+"px",width:a+"px"}),this.input=i,this.input.addEventListener("blur",(function(){return t.changeLanguage()})),this.input.addEventListener("keydown",this.handleKeydown),this.clearTimer(),this.timer=setTimeout((function(){t.input.focus()}))},e.prototype.bindDOMEvent=function(){this.dom&&this.dom.addEventListener("click",this.handleMousedown)},e.prototype.bindEvent=function(){var e=this;this.eventEmitter.listen("scroll",(function(){e.input&&e.reset()}))},e.prototype.changeLanguage=function(){if(this.input&&xn(this.getPos)){var e=this.input.value;this.reset();var t=this.getPos(),n=this.view.state.tr;n.setNodeMarkup(t,null,{language:e}),this.view.dispatch(n)}},e.prototype.reset=function(){var e;if(null===(e=this.input)||void 0===e?void 0:e.parentElement){var t=this.input.parentElement;this.input=null,on(t)}},e.prototype.clearTimer=function(){this.timer&&(clearTimeout(this.timer),this.timer=null)},e.prototype.stopEvent=function(){return!0},e.prototype.update=function(e){return!!e.sameMarkup(this.node)&&(this.node=e,!0)},e.prototype.destroy=function(){this.reset(),this.clearTimer(),this.dom&&this.dom.removeEventListener("click",this.handleMousedown)},e}(),Yu=/MsoListParagraph/,Ju=/style=(.|\n)*mso-/,ec=/mso-list:(.*)/,tc=/O:P/,nc=/^(n|u|l)/,rc="p.MsoListParagraph";function oc(e){for(var t=[],n=document.createTreeWalker(e,1,null,!1);n.nextNode();){var r=n.currentNode;if(rn(r)){var o=r,i=o.outerHTML,a=o.textContent,s=Ju.test(i),l=ec.test(i);s&&!l&&a?t.push([r,!0]):(tc.test(r.nodeName)||s&&!a||l)&&t.push([r,!1])}}return t.forEach((function(e){var t=e[0];e[1]?function(e){for(var t=[];e.firstChild;)t.push(e.firstChild),e.parentNode&&e.parentNode.insertBefore(e.firstChild,e);on(e)}(t):on(t)})),e.innerHTML.trim()}function ic(e){var t=[];return e.forEach((function(e,n){var r=t[n-1],o=function(e,t){var n=e.getAttribute("style");if(n){var r=n.match(ec)[1].trim().split(" ")[1];return{id:t,level:parseInt(r.replace("level",""),10),prev:null,parent:null,children:[],unordered:nc.test(e.textContent||""),contents:oc(e)}}return null}(e,n);o&&(r&&function(e,t){if(t.level<e.level)t.children.push(e),e.parent=t;else{for(;t&&t.level!==e.level;)t=t.parent;t&&(e.prev=t,e.parent=t.parent,e.parent&&e.parent.children.push(e))}}(o,r),t.push(o))})),t}function ac(e){var t=e[0].unordered?"ul":"ol",n=document.createElement(t);return e.forEach((function(e){var t=e.children,r=e.contents,o=document.createElement("li");o.innerHTML=r,n.appendChild(o),t.length&&n.appendChild(ac(t))})),n}function sc(e){return ac(ic(e).filter((function(e){return!e.parent})))}function lc(e){var t=document.createElement("div");t.innerHTML=e;var n,r,o=[],i=(n=rc,(r=rt(t.querySelectorAll(n))).length?r:[]);return i.forEach((function(e){var n,r,i=function(e){for(;e&&!rn(e);)e=e.nextSibling;return!e||!Yu.test(e.className)}(e.nextSibling);if(o.push(e),i){var a=sc(o),s=e.nextSibling;s?(n=a,(r=s).parentNode&&r.parentNode.insertBefore(n,r)):function(e,t){(t=X(t)?rt(t):[t]).forEach((function(t){e.appendChild(t)}))}(t,a),o=[]}on(e)})),""+(i.length?"<p></p>":"")+t.innerHTML}var uc="\x3c!--StartFragment--\x3e",cc="\x3c!--EndFragment--\x3e";function dc(e){return function(e){return Ju.test(e)}(e=function(e){return/<\/td>((?!<\/tr>)[\s\S])*$/i.test(e)&&(e="<tr>"+e+"</tr>"),/<\/tr>((?!<\/table>)[\s\S])*$/i.test(e)&&(e="<table>"+e+"</table>"),e}(e=function(e){var t=e.indexOf(uc),n=e.lastIndexOf(cc);return t>-1&&n>-1&&(e=e.slice(t+uc.length,n)),e.replace(/<br[^>]*>/g,Yt)}(e)))&&(e=lc(e)),e}function pc(e,t,n){for(var r=[],o=e.childCount,i=0;i<o;i+=1)if(!e.child(i).attrs.extended){var a=i<o?n.create(e.child(i).attrs,e.child(i).content):n.createAndFill();r.push(a)}return r}function fc(e,t,n){var r=n.nodes,o=r.tableRow,i=pc(e,0,r.tableHeadCell);return o.create(null,i)}function hc(e,t,n){var r=n.nodes,o=r.tableRow,i=pc(e,0,r.tableBodyCell);return o.create(null,i)}function mc(e){var t=[],n=[];"tableHead"===e.firstChild.type.name&&e.firstChild.forEach((function(e){return t.push(e)}));"tableBody"===e.lastChild.type.name&&e.lastChild.forEach((function(e){return n.push(e)}));return U(U([],t),n)}function vc(e,t,n){var r=fc(e,0,n);return n.nodes.tableHead.create(null,r)}function gc(e,t,n){var r=e.map((function(e){return hc(e,0,n)}));if(!e.length){var o=function(e,t){for(var n=t.nodes,r=n.tableRow,o=n.tableBodyCell,i=[],a=0;a<e;a+=1){var s=o.createAndFill();i.push(s)}return r.create({dummyRowForPasting:!0},i)}(t,n);r.push(o)}return n.nodes.tableBody.create(null,r)}function yc(e,r,o){var i=[],a=e.content,s=e.openStart,l=e.openEnd;return a.forEach((function(e){if("table"===e.type.name){var a=Su(new n(t.from(e),0,0));if(a){var s=mc(a),l="tableBody"===a.firstChild.type.name,u=function(e,t,n,r){var o=function(e){return e.reduce((function(e,t){return e.childCount>t.childCount?e:t})).childCount}(e);if(n&&r)return t.nodes.table.create(null,[gc(e,o,t)]);var i=e[0],a=e.slice(1),s=[vc(i,0,t)];return a.length&&s.push(gc(a,o,t)),t.nodes.table.create(null,s)}(s,r,l,o);i.push(u)}}else i.push(e)})),new n(t.from(i),s,l)}var bc=4,wc=2;function kc(e){return e*bc}function Cc(e,t){var r=e.state,o=r.selection,i=r.schema,a=r.tr,s=Au(o),l=s.anchor,u=s.head;if(l&&u){var c=Su(t);if(!c)return!1;var d=ku.create(l),p=d.getRectOffsets(l,u),f=function(e,t,n){var r=[],o=mc(e),i=(o[0].childCount,o.length),a=0===t.startRowIdx,s=o.slice(0,i);if(a){var l=s.shift();if(l){var u=fc(l,0,n).content;r.push(u)}}return s.forEach((function(e){if(!e.attrs.dummyRowForPasting){var t=hc(e,0,n).content;r.push(t)}})),r}(c,p,i),h=function(e,t,n){for(var r=t.startRowIdx,o=t.startColIdx,i=n.length,a=0,s=function(e){var t=n[e].childCount;n[e].forEach((function(e){var n=e.attrs.colspan;n>1&&(t+=n-1)})),a=Math.max(a,t)},l=0;l<i;l+=1)s(l);var u=r+i-1,c=o+a-1;return{startRowIdx:r,startColIdx:o,endRowIdx:u,endColIdx:c,addedRowCount:Math.max(u+1-e.totalRowCount,0),addedColumnCount:Math.max(c+1-e.totalColumnCount,0)}}(d,p,f),m=[];return function(e,t){var n=e.getSpannedOffsets(t),r=Du(n),o=r.rowCount,i=r.columnCount,a=Du(t),s=a.rowCount,l=a.columnCount;return o===s&&i===l}(d,h)&&(function(e,t){for(var n=e.startRowIdx,r=e.startColIdx,o=e.endRowIdx,i=e.endColIdx,a=e.addedRowCount,s=e.addedColumnCount,l=n;l<=o-a;l+=1)t.push({rowIdx:l,startColIdx:r,endColIdx:i-s})}(h,m),h.addedColumnCount&&function(e,t,n,r,o){for(var i=r.startRowIdx,a=r.startColIdx,s=r.endRowIdx,l=r.endColIdx,u=r.addedRowCount,c=r.addedColumnCount,d=n.totalRowCount,p=0,f=0;f<d;f+=1){var h=n.getCellInfo(f,l-c),m=h.offset,v=h.nodeSize,g=e.mapping.map(m+v),y=Mu(c,f,t);if(e.insert(g,y),f>=i&&f<=s-u){var b=n.getCellInfo(f,l-c),w=e.mapping.map(b.offset),k=g+kc(c);o[p]={rowIdx:f,startColIdx:a,endColIdx:l,dummyOffsets:[w,k]},p+=1}}}(a,i,d,h,m),h.addedRowCount&&function(e,t,n,r,o){var i=r.addedRowCount,a=r.addedColumnCount,s=r.startColIdx,l=r.endColIdx,u=e.mapping.maps.length,c=n.tableEndOffset-2,d=Eu(i,n.totalColumnCount+a,t),p=c;e.insert(e.mapping.slice(u).map(p),d);for(var f=0;f<i;f+=1){var h=p+kc(s)+1,m=p+kc(l+1)+1,v=p+kc(n.totalColumnCount+a)+wc;o.push({rowIdx:f+n.totalRowCount,startColIdx:s,endColIdx:l,dummyOffsets:[h,m]}),p=v}}(a,i,d,h,m),function(e,t,r,o){var i=e.mapping.maps.length;r.forEach((function(r,a){var s=r.rowIdx,l=r.startColIdx,u=r.endColIdx,c=r.dummyOffsets,d=e.mapping.slice(i),p=new n(t[a],0,0),f=c?c[0]:o.getCellStartOffset(s,l),h=c?c[1]:o.getCellEndOffset(s,u);e.replace(d.map(f),d.map(h),p)}))}(a,f,m,d),e.dispatch(a),function(e,t,n){var r=e.state,o=r.tr,i=r.doc,a=ku.create(i.resolve(n)),s=t[0],l=s.rowIdx,u=s.startColIdx,c=Ze(t),d=c.rowIdx,p=c.endColIdx,f=a.getCellInfo(l,u).offset,h=a.getCellInfo(d,p).offset;e.dispatch(o.setSelection(new Tu(i.resolve(f),i.resolve(h))))}(e,m,d.getCellInfo(0,0).offset)),!0}return!1}var xc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"doc"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"schema",{get:function(){return{content:"block+"}},enumerable:!1,configurable:!0}),t}(yn),Tc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"paragraph"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"schema",{get:function(){return{content:"inline*",group:"block",attrs:z({},{htmlAttrs:{default:null},classNames:{default:null}}),parseDOM:[{tag:"p"}],toDOM:function(e){return["p",pu(e.attrs),0]}}},enumerable:!1,configurable:!0}),t}(yn),Ec=/\s{1,4}$/,Mc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"text"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"schema",{get:function(){return{group:"inline"}},enumerable:!1,configurable:!0}),t.prototype.addSpaces=function(){return function(e,t){var n=e.selection,r=e.tr,o=n.$from,i=n.$to;return!(!o.blockRange(i)||au(o)||su(o))&&(t(r.insertText(" ",o.pos,i.pos)),!0)}},t.prototype.removeSpaces=function(){return function(e,t){var n=e.selection,r=e.tr,o=n.$from,i=n.$to,a=n.from;if(o.blockRange(i)&&!au(o)&&!su(o)){var s=o.nodeBefore;if(s&&s.isText){var l=s.text,u=l.replace(Ec,""),c=l.length-u.length;return t(r.delete(a-c,a)),!0}}return!1}},t.prototype.keymaps=function(){return{Tab:this.addSpaces(),"Shift-Tab":this.removeSpaces()}},t}(yn),Lc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"heading"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"levels",{get:function(){return[1,2,3,4,5,6]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"schema",{get:function(){var e=this.levels.map((function(e){return{tag:"h"+e,getAttrs:function(t){var n=t.getAttribute("data-raw-html");return z({level:e},n&&{rawHTML:n})}}}));return{attrs:z({level:{default:1},headingType:{default:"atx"},rawHTML:{default:null}},{htmlAttrs:{default:null},classNames:{default:null}}),content:"inline*",group:"block",defining:!0,parseDOM:e,toDOM:function(e){var t=e.attrs;return["h"+t.level,pu(t),0]}}},enumerable:!1,configurable:!0}),t.prototype.commands=function(){return function(e){return function(t,n){var r=t.schema.nodes[e.level?"heading":"paragraph"];return E(r,e)(t,n)}}},t}(yn),Nc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"codeBlock"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"schema",{get:function(){return{content:"text*",group:"block",attrs:z({language:{default:null},rawHTML:{default:null}},{htmlAttrs:{default:null},classNames:{default:null}}),code:!0,defining:!0,marks:"",parseDOM:[{tag:"pre",preserveWhitespace:"full",getAttrs:function(e){var t=e.getAttribute("data-raw-html"),n=e.firstElementChild;return z({language:(null==n?void 0:n.getAttribute("data-language"))||null},t&&{rawHTML:t})}}],toDOM:function(e){var t=e.attrs;return[t.rawHTML||"pre",["code",z({"data-language":t.language},pu(t)),0]]}}},enumerable:!1,configurable:!0}),t.prototype.commands=function(){return function(){return function(e,t){return E(e.schema.nodes.codeBlock)(e,t)}}},t.prototype.moveCursor=function(e){var t=this;return function(n,r){var o,i,a=n.tr,s=n.doc,l=n.schema,u=n.selection.$from;if(t.context.view.endOfTextblock(e)&&"codeBlock"===u.node().type.name){var c=u.parent.textContent.split("\n"),d="up"===e?u.start():u.end(),p="up"===e?[d,c[0].length+d]:[d-Ze(c).length,d],f=s.resolve("up"===e?u.before():u.after()),h="up"===e?f.nodeBefore:f.nodeAfter;if(o=u.pos,i=p[1],o>=p[0]&&o<=i&&!h){var m=st(a,f,l);if(m)return r(m),!0}}return!1}},t.prototype.keymaps=function(){var e=this.commands()();return{"Shift-Mod-p":e,"Shift-Mod-P":e,ArrowUp:this.moveCursor("up"),ArrowDown:this.moveCursor("down")}},t}(yn),Ac=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"bulletList"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"schema",{get:function(){return{content:"listItem+",group:"block",attrs:z({rawHTML:{default:null}},{htmlAttrs:{default:null},classNames:{default:null}}),parseDOM:[uu("ul")],toDOM:function(e){return["ul",pu(e.attrs),0]}}},enumerable:!1,configurable:!0}),t.prototype.changeList=function(){return function(e,t){return mu(e.schema.nodes.bulletList)(e,t)}},t.prototype.commands=function(){return{bulletList:this.changeList,taskList:vu}},t.prototype.keymaps=function(){var e=this.changeList(),t=bu(),n=t.indent,r=t.outdent;return{"Mod-u":e,"Mod-U":e,Tab:n(),"Shift-Tab":r()}},t}(yn),Sc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"orderedList"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"schema",{get:function(){return{content:"listItem+",group:"block",attrs:z({order:{default:1},rawHTML:{default:null}},{htmlAttrs:{default:null},classNames:{default:null}}),parseDOM:[{tag:"ol",getAttrs:function(e){var t=e.getAttribute("start"),n=e.getAttribute("data-raw-html");return z({order:e.hasAttribute("start")?Number(t):1},n&&{rawHTML:n})}}],toDOM:function(e){var t=e.attrs;return[t.rawHTML||"ol",z({start:1===t.order?null:t.order},pu(t)),0]}}},enumerable:!1,configurable:!0}),t.prototype.commands=function(){return function(){return function(e,t){return mu(e.schema.nodes.orderedList)(e,t)}}},t.prototype.keymaps=function(){var e=this.commands()(),t=bu(),n=t.indent,r=t.outdent;return{"Mod-o":e,"Mod-O":e,Tab:n(),"Shift-Tab":r()}},t}(yn),Dc=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return _(r,e),Object.defineProperty(r.prototype,"name",{get:function(){return"listItem"},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"schema",{get:function(){return{content:"paragraph block*",selectable:!1,attrs:{task:{default:!1},checked:{default:!1},rawHTML:{default:null}},defining:!0,parseDOM:[{tag:"li",getAttrs:function(e){var t=e.getAttribute("data-raw-html");return z({task:e.hasAttribute("data-task"),checked:e.hasAttribute("data-task-checked")},t&&{rawHTML:t})}}],toDOM:function(e){var t=e.attrs,n=t.task,r=t.checked;if(!n)return[t.rawHTML||"li",0];var o=["task-list-item"];return r&&o.push("checked"),[t.rawHTML||"li",z({class:o.join(" "),"data-task":n},r&&{"data-task-checked":r}),0]}}},enumerable:!1,configurable:!0}),r.prototype.liftToPrevListItem=function(){return function(e,t){var n=e.selection,r=e.tr,o=e.schema,i=n.$from,a=n.empty,s=o.nodes.listItem,l=i.parent,u=i.node(-1);if(a&&!l.childCount&&u.type===s){if(i.index(-2)>=1)return r.delete(i.start(-1)-1,i.end(-1)),t(r),!0;if(i.node(-3).type===s)return r.delete(i.start(-2)-1,i.end(-1)),t(r),!0}return!1}},r.prototype.keymaps=function(){return{Backspace:this.liftToPrevListItem(),Enter:function(e,r){return function(e){return function(r,o){var i=r.tr,a=r.selection,s=a.$from,l=a.$to;if(s.depth<2||!s.sameParent(l))return!1;var u=s.node(-1);if(u.type!==e)return!1;if(0===s.parent.content.size&&s.node(-1).childCount===s.indexAfter(-1)){if(2===s.depth||s.node(-3).type!==e||s.index(-2)!==s.node(-2).childCount-1)return!1;for(var c=s.index(-1)>0,p=t.empty,f=s.depth-(c?1:2);f>=s.depth-3;f-=1)p=t.from(s.node(f).copy(p));return p=p.append(t.from(e.createAndFill())),i.replace(c?s.before():s.before(-1),s.after(-3),new n(p,c?3:2,2)),i.setSelection(b.near(i.doc.resolve(s.pos+(c?3:2)))),o(i),!0}var h=l.pos===s.end()?u.contentMatchAt(0).defaultType:null,m=h&&[null,{type:h}];return i.delete(s.pos,l.pos),!!d(i.doc,s.pos,2,m)&&(i.split(s.pos,2,m),o(i),!0)}}(e.schema.nodes.listItem)(e,r)}}},r}(yn),Oc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"blockQuote"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"schema",{get:function(){return{attrs:z({rawHTML:{default:null}},{htmlAttrs:{default:null},classNames:{default:null}}),content:"block+",group:"block",parseDOM:[uu("blockquote")],toDOM:function(e){return["blockquote",pu(e.attrs),0]}}},enumerable:!1,configurable:!0}),t.prototype.commands=function(){return function(){return function(e,t){return M(e.schema.nodes.blockQuote)(e,t)}}},t.prototype.keymaps=function(){var e=this.commands()();return{"Alt-q":e,"Alt-Q":e}},t}(yn),Ic={left:function(e,t){var n=e[0],r=e[1],o=t.totalColumnCount,i=0===r;if(0!==n||!i){r-=1,i&&(n-=1,r=o-1);var a=t.getCellInfo(n,r);return a.offset+a.nodeSize-2}return null},right:function(e,t){var n=e[0],r=e[1],o=t.totalRowCount,i=t.totalColumnCount,a=r===i-1;if(n!==o-1||!a){var s=r+1,l=t.getColspanStartInfo(n,r);return(null==l?void 0:l.count)>1&&(s+=l.count-1),(a||s===i)&&(n+=1,s=0),t.getCellInfo(n,s).offset+2}return null},up:function(e,t){var n=e[0],r=e[1];if(n>0){var o=t.getCellInfo(n-1,r);return o.offset+o.nodeSize-2}return null},down:function(e,t){var n=e[0],r=e[1],o=t.totalRowCount;if(n<o-1){var i=n+1,a=t.getRowspanStartInfo(n,r);return(null==a?void 0:a.count)>1&&(i+=a.count-1),t.getCellInfo(i,r).offset+2}return null}};function Rc(e,t,n){var r=n[0],o=n[1],i=t.getRowspanStartInfo(r,o),a="up"===e&&0===r,s="down"===e&&((null==i?void 0:i.count)>1?r+i.count-1:r)===t.totalRowCount-1;return a||s}function Pc(e,t,n,r){void 0===r&&(r=!1);var o=e.doc.resolve(t.tableEndOffset);return r||!o.nodeAfter?st(e,o,n):e.setSelection(b.near(o,1))}function Hc(e,t,n,r){var o=(0,Ic[e])(n,r);if(o){var i="right"===e||"down"===e?1:-1;return t.setSelection(b.near(t.doc.resolve(o),i))}return null}function Bc(e,t,n){var r=e.getCellInfo(t,0).offset,o=e.getCellInfo(t,n-1);return{from:r,to:o.offset+o.nodeSize}}var Fc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"table"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"schema",{get:function(){return{content:"tableHead{1} tableBody{1}",group:"block",attrs:z({rawHTML:{default:null}},{htmlAttrs:{default:null},classNames:{default:null}}),parseDOM:[uu("table")],toDOM:function(e){return["table",pu(e.attrs),0]}}},enumerable:!1,configurable:!0}),t.prototype.addTable=function(){return function(e){return void 0===e&&(e={rowCount:2,columnCount:1,data:[]}),function(t,n){var r=e.rowCount,o=e.columnCount,i=e.data,a=t.schema,s=t.selection,l=t.tr,u=s.from,c=s.to,d=s.$from;if(u===c&&!su(d)){var p=a.nodes,f=p.tableHead,h=p.tableBody,m=null==i?void 0:i.slice(0,o),v=null==i?void 0:i.slice(o,i.length),g=function(e,t,n){for(var r=t.nodes,o=r.tableRow,i=r.tableHeadCell,a=r.paragraph,s=[],l=0;l<e;l+=1){var u=n&&n[l],c=a.create(null,u?t.text(u):[]);s.push(i.create(null,c))}return[o.create(null,s)]}(o,a,m),y=Eu(r-1,o,a,v),b=a.nodes.table.create(null,[f.create(null,g),h.create(null,y)]);return n(l.replaceSelectionWith(b)),!0}return!1}}},t.prototype.removeTable=function(){return function(){return function(e,t){var n=e.selection,r=e.tr,o=ku.create(n.$anchor);if(o){var i=o.tableStartOffset,a=o.tableEndOffset,s=i-1,l=at(r.delete(s,a),s);return t(r.setSelection(l)),!0}return!1}}},t.prototype.addColumn=function(e){return function(){return function(t,n){var r=t.selection,o=t.tr,i=t.schema,a=Au(r),s=a.anchor,l=a.head;if(s&&l){for(var u=ku.create(s),c=u.getRectOffsets(s,l),d="left"===e?c.startColIdx:c.endColIdx+1,p=Du(c).columnCount,f=u.totalRowCount,h=0;h<f;h+=1){var m=Mu(p,h,i);o.insert(o.mapping.map(u.posAt(h,d)),m)}return n(o),!0}return!1}}},t.prototype.removeColumn=function(){return function(){return function(e,t){var n=e.selection,r=e.tr,o=Au(n),i=o.anchor,a=o.head;if(i&&a){var s=ku.create(i),l=s.getRectOffsets(i,a),u=s.totalColumnCount,c=s.totalRowCount;if(Du(l).columnCount===u)return!1;for(var d=l.startColIdx,p=l.endColIdx,f=r.mapping.maps.length,h=0;h<c;h+=1)for(var m=p;m>=d;m-=1){var v=s.getCellInfo(h,m),g=v.offset,y=v.nodeSize,b=r.mapping.slice(f).map(g),w=b+y;r.delete(b,w)}return t(r),!0}return!1}}},t.prototype.addRow=function(e){return function(){return function(t,n){var r=t.selection,o=t.schema,i=t.tr,a=Au(r),s=a.anchor,l=a.head;if(s&&l){var u=ku.create(s),c=u.totalColumnCount,d=u.getRectOffsets(s,l),p=Du(d).rowCount,f=function(e,t,n){var r,o,i;return"up"===e?(r=n.startRowIdx,o=0,i=-1):(r=n.endRowIdx,o=t.totalColumnCount-1,i=t.getCellInfo(r,o).nodeSize+1),{targetRowIdx:r,insertColIdx:o,nodeSize:i}}(e,u,d),h=f.targetRowIdx,m=f.insertColIdx,v=f.nodeSize;if(!(0===h)){for(var g=[],y=i.mapping.map(u.posAt(h,m))+v,b=[],w=0;w<c;w+=1)b=b.concat(Mu(1,h,o));for(var k=0;k<p;k+=1)g.push(o.nodes.tableRow.create(null,b));return n(i.insert(y,g)),!0}}return!1}}},t.prototype.removeRow=function(){return function(){return function(e,t){var n=e.selection,r=e.tr,o=Au(n),i=o.anchor,a=o.head;if(i&&a){var s=ku.create(i),l=s.totalRowCount,u=s.totalColumnCount,c=s.getRectOffsets(i,a),d=Du(c).rowCount,p=c.startRowIdx,f=c.endRowIdx;if(d===l-1||0===p)return!1;for(var h=f;h>=p;h-=1){var m=Bc(s,h,u),v=m.from,g=m.to;r.delete(v-1,g+1)}return t(r),!0}return!1}}},t.prototype.alignColumn=function(){return function(e){return void 0===e&&(e={align:"center"}),function(t,n){var r=e.align,o=t.selection,i=t.tr,a=Au(o),s=a.anchor,l=a.head;if(s&&l){for(var u=ku.create(s),c=u.totalRowCount,d=u.getRectOffsets(s,l),p=d.startColIdx,f=d.endColIdx,h=0;h<c;h+=1)for(var m=p;m<=f;m+=1)if(!u.extendedRowspan(h,m)&&!u.extendedColspan(h,m)){var v=u.getNodeAndPos(h,m),g=v.node,y=v.pos,b=Ou(g,{align:r});i.setNodeMarkup(y,null,b)}return n(i),!0}return!1}}},t.prototype.moveToCell=function(e){return function(t,n){var r=t.selection,o=t.tr,i=t.schema,a=Au(r),s=a.anchor,l=a.head;if(s&&l){var u=ku.create(s),c=u.getCellIndex(s),d=void 0;if(d=Rc(e,u,c)?Pc(o,u,i):Hc(e,o,c,u))return n(d),!0}return!1}},t.prototype.moveInCell=function(e){var t=this;return function(n,r){var o=n.selection,i=n.tr,a=n.doc,s=n.schema,l=o.$from;if(!t.context.view.endOfTextblock(e))return!1;var u=iu(l,(function(e){var t=e.type;return"tableHeadCell"===t.name||"tableBodyCell"===t.name}));if(u){var c=iu(l,(function(e){return"paragraph"===e.type.name})),d=u.depth;if(c&&function(e,t,n,r){var o=t[0],i=t[1],a=o+3,s=i>=a,l=s?o+1:i,u=function(e,t,n,r,o){var i=t[0],a=t[1],s=t[2];if("left"===e||"up"===e){if(o&&!function(e,t,n){var r=n[0],o=n[1],i=t.resolve(e.before(r-1));return o===r&&!i.nodeBefore}(n,r,[i,a]))return!1;var l=n.before(s);if(r.resolve(l).nodeBefore)return!1}return!0}(e,[i,a,l],n,r,s),c=function(e,t,n,r,o){if("right"===e||"down"===e){if(o&&!function(e){for(var t,n,r=e.depth;r&&"tableBodyCell"!==(n=e.node(r)).type.name;){if("listItem"===n.type.name){var o=e.node(r-1).lastChild===n,i="paragraph"!==(null===(t=n.lastChild)||void 0===t?void 0:t.type.name);return!!o&&!i}r-=1}return!1}(n))return!1;var i=n.after(t);if(r.resolve(i).nodeAfter)return!1}return!0}(e,l,n,r,s);return u&&c}(e,[d,c.depth],l,a)){var p=Au(o).anchor,f=ku.create(p),h=f.getCellIndex(p),m=void 0;if(!function(e,t,n){var r=n[0],o=n[1];if("up"===e||"down"===e)return!1;var i=t.tableStartOffset,a=t.tableEndOffset,s=t.getCellInfo(r,o),l=s.offset,u=s.nodeSize;return("left"===e?i:a)===("left"===e?l-2:l+u+3)}(e,f,h)?Rc(e,f,h)?"up"===e?m=function(e,t,n){var r=e.doc.resolve(t.tableStartOffset-1);return r.nodeBefore?e.setSelection(b.near(r,-1)):st(e,r,n)}(i,f,s):"down"===e&&(m=Pc(i,f,s)):m=Hc(e,i,h,f):m=function(e,t,n){var r=e.doc.resolve(t.before(n-3));return e.setSelection(new w(r))}(i,l,d),m)return r(m),!0}}return!1}},t.prototype.deleteCells=function(){return function(e,t){var n=e.schema,r=e.selection,o=e.tr,i=Au(r),a=i.anchor,s=i.head;if(a&&s&&!(r instanceof v)){for(var l=ku.create(a),u=l.getRectOffsets(a,s),c=u.startRowIdx,d=u.startColIdx,p=u.endRowIdx,f=u.endColIdx,h=c;h<=p;h+=1)for(var m=d;m<=f;m+=1)if(!l.extendedRowspan(h,m)&&!l.extendedColspan(h,m)){var g=l.getNodeAndPos(h,m),y=g.node,b=g.pos,w=Mu(1,h,n,y.attrs);o.replaceWith(o.mapping.map(b),o.mapping.map(b+y.nodeSize),w)}return t(o),!0}return!1}},t.prototype.exitTable=function(){return function(e,t){var n=e.selection,r=e.tr,o=e.schema,i=n.$from;if(iu(i,(function(e){var t=e.type;return"tableHeadCell"===t.name||"tableBodyCell"===t.name}))&&iu(i,(function(e){return"paragraph"===e.type.name}))){var a=Au(n).anchor;return t(Pc(r,ku.create(a),o,!0)),!0}return!1}},t.prototype.commands=function(){return{addTable:this.addTable(),removeTable:this.removeTable(),addColumnToLeft:this.addColumn("left"),addColumnToRight:this.addColumn("right"),removeColumn:this.removeColumn(),addRowToUp:this.addRow("up"),addRowToDown:this.addRow("down"),removeRow:this.removeRow(),alignColumn:this.alignColumn()}},t.prototype.keymaps=function(){var e=this.deleteCells();return{Tab:this.moveToCell("right"),"Shift-Tab":this.moveToCell("left"),ArrowUp:this.moveInCell("up"),ArrowDown:this.moveInCell("down"),ArrowLeft:this.moveInCell("left"),ArrowRight:this.moveInCell("right"),Backspace:e,"Mod-Backspace":e,Delete:e,"Mod-Delete":e,"Mod-Enter":this.exitTable()}},t}(yn),jc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"tableHead"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"schema",{get:function(){return{content:"tableRow{1}",attrs:z({rawHTML:{default:null}},{htmlAttrs:{default:null},classNames:{default:null}}),parseDOM:[uu("thead")],toDOM:function(e){return["thead",pu(e.attrs),0]}}},enumerable:!1,configurable:!0}),t}(yn),qc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"tableBody"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"schema",{get:function(){return{content:"tableRow+",attrs:z({rawHTML:{default:null}},{htmlAttrs:{default:null},classNames:{default:null}}),parseDOM:[{tag:"tbody",getAttrs:function(e){var t=e.querySelectorAll("tr")[0].children.length,n=e.getAttribute("data-raw-html");return!!t&&z({},n&&{rawHTML:n})}}],toDOM:function(e){return["tbody",pu(e.attrs),0]}}},enumerable:!1,configurable:!0}),t}(yn),_c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"tableRow"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"schema",{get:function(){return{content:"(tableHeadCell | tableBodyCell)*",attrs:z({rawHTML:{default:null}},{htmlAttrs:{default:null},classNames:{default:null}}),parseDOM:[{tag:"tr",getAttrs:function(e){var t=e.children.length,n=e.getAttribute("data-raw-html");return!!t&&z({},n&&{rawHTML:n})}}],toDOM:function(e){return["tr",pu(e.attrs),0]}}},enumerable:!1,configurable:!0}),t}(yn),zc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"tableHeadCell"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"schema",{get:function(){return{content:"paragraph+",attrs:z({align:{default:null},className:{default:null},rawHTML:{default:null},colspan:{default:null},extended:{default:null}},{htmlAttrs:{default:null},classNames:{default:null}}),isolating:!0,parseDOM:[du("th")],toDOM:function(e){var t=e.attrs,n=cu(t);return["th",z(z({},n),pu(t)),0]}}},enumerable:!1,configurable:!0}),t}(yn),Uc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"tableBodyCell"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"schema",{get:function(){return{content:"(paragraph | bulletList | orderedList)+",attrs:{align:{default:null},className:{default:null},rawHTML:{default:null},colspan:{default:null},rowspan:{default:null},extended:{default:null}},isolating:!0,parseDOM:[du("td")],toDOM:function(e){return["td",cu(e.attrs),0]}}},enumerable:!1,configurable:!0}),t}(yn),Vc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"image"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"schema",{get:function(){return{inline:!0,attrs:z({imageUrl:{default:""},altText:{default:null},rawHTML:{default:null}},{htmlAttrs:{default:null},classNames:{default:null}}),group:"inline",selectable:!1,parseDOM:[{tag:"img[src]",getAttrs:function(e){var t=Bl(e,{RETURN_DOM_FRAGMENT:!0}).firstChild,n=t.getAttribute("src")||"",r=t.getAttribute("data-raw-html"),o=t.getAttribute("alt");return z({imageUrl:n,altText:o},r&&{rawHTML:r})}}],toDOM:function(e){var t=e.attrs;return[t.rawHTML||"img",z(z({src:Fe(t.imageUrl)},t.altText&&{alt:t.altText}),pu(t))]}}},enumerable:!1,configurable:!0}),t.prototype.addImage=function(){return function(e){return function(t,n){var r=t.schema,o=t.tr,i=e,a=i.imageUrl,s=i.altText;if(!a)return!1;var l=r.nodes.image.createAndFill(z({imageUrl:a},s&&{altText:s}));return n(o.replaceSelectionWith(l).scrollIntoView()),!0}}},t.prototype.commands=function(){return{addImage:this.addImage()}},t}(yn),$c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"thematicBreak"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"schema",{get:function(){return{attrs:z({rawHTML:{default:null}},{htmlAttrs:{default:null},classNames:{default:null}}),group:"block",parseDOM:[{tag:"hr"}],selectable:!1,toDOM:function(e){var t=e.attrs;return["div",pu(t),[t.rawHTML||"hr"]]}}},enumerable:!1,configurable:!0}),t.prototype.hr=function(){var e=this;return function(){return function(t,n){var r,o=t.selection,i=o.$from;if(i===o.$to){var a=t.doc,s=t.schema.nodes,l=s.thematicBreak,u=s.paragraph,c=[l.create()],d=i.node(1),p=a.child(a.childCount-1)===d,f=a.resolve(i.after(1)),h=(null===(r=i.nodeAfter)||void 0===r?void 0:r.type.name)===e.name;return(p||h)&&c.push(u.create()),n(t.tr.insert(f.pos,c).scrollIntoView()),!0}return!1}}},t.prototype.commands=function(){return{hr:this.hr()}},t.prototype.keymaps=function(){var e=this.hr()();return{"Mod-l":e,"Mod-L":e}},t}(yn),Wc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"strong"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"schema",{get:function(){var e=["b","strong"].map((function(e){return{tag:e,getAttrs:function(e){var t=e.getAttribute("data-raw-html");return z({},t&&{rawHTML:t})}}}));return{attrs:z({rawHTML:{default:null}},{htmlAttrs:{default:null},classNames:{default:null}}),parseDOM:e,toDOM:function(e){var t=e.attrs;return[t.rawHTML||"strong",pu(t)]}}},enumerable:!1,configurable:!0}),t.prototype.bold=function(){return function(){return function(e,t){return L(e.schema.marks.strong)(e,t)}}},t.prototype.commands=function(){return{bold:this.bold()}},t.prototype.keymaps=function(){var e=this.bold()();return{"Mod-b":e,"Mod-B":e}},t}(or),Gc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"emph"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"schema",{get:function(){var e=["i","em"].map((function(e){return{tag:e,getAttrs:function(e){var t=e.getAttribute("data-raw-html");return z({},t&&{rawHTML:t})}}}));return{attrs:z({rawHTML:{default:null}},{htmlAttrs:{default:null},classNames:{default:null}}),parseDOM:e,toDOM:function(e){var t=e.attrs;return[t.rawHTML||"em",pu(t)]}}},enumerable:!1,configurable:!0}),t.prototype.italic=function(){return function(){return function(e,t){return L(e.schema.marks.emph)(e,t)}}},t.prototype.commands=function(){return{italic:this.italic()}},t.prototype.keymaps=function(){var e=this.italic()();return{"Mod-i":e,"Mod-I":e}},t}(or),Xc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"strike"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"schema",{get:function(){var e=["s","del"].map((function(e){return{tag:e,getAttrs:function(e){var t=e.getAttribute("data-raw-html");return z({},t&&{rawHTML:t})}}}));return{attrs:z({rawHTML:{default:null}},{htmlAttrs:{default:null},classNames:{default:null}}),parseDOM:e,toDOM:function(e){var t=e.attrs;return[t.rawHTML||"del",pu(t)]}}},enumerable:!1,configurable:!0}),t.prototype.commands=function(){return function(){return function(e,t){return L(e.schema.marks.strike)(e,t)}}},t.prototype.keymaps=function(){var e=this.commands()();return{"Mod-s":e,"Mod-S":e}},t}(or),Zc=function(e){function t(t){var n=e.call(this)||this;return n.linkAttributes=t,n}return _(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"link"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"schema",{get:function(){var e=this;return{attrs:z({linkUrl:{default:""},title:{default:null},rawHTML:{default:null}},{htmlAttrs:{default:null},classNames:{default:null}}),inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs:function(e){var t=Bl(e,{RETURN_DOM_FRAGMENT:!0}).firstChild,n=t.getAttribute("href")||"",r=t.getAttribute("title")||"",o=t.getAttribute("data-raw-html");return z({linkUrl:n,title:r},o&&{rawHTML:o})}}],toDOM:function(t){var n=t.attrs;return[n.rawHTML||"a",z(z({href:Fe(n.linkUrl)},e.linkAttributes),pu(n))]}}},enumerable:!1,configurable:!0}),t.prototype.addLink=function(){return function(e){return function(t,n){var r=e,o=r.linkUrl,i=r.linkText,a=void 0===i?"":i,s=t.schema,l=t.tr,u=t.selection,c=u.empty,d=u.from,p=u.to;if(d&&p&&o){var f={linkUrl:o},h=s.mark("link",f);if(c&&a){var m=it(s,a,h);l.replaceRangeWith(d,p,m)}else l.addMark(d,p,h);return n(l.scrollIntoView()),!0}return!1}}},t.prototype.toggleLink=function(){return function(e){return function(t,n){return L(t.schema.marks.link,e)(t,n)}}},t.prototype.commands=function(){return{addLink:this.addLink(),toggleLink:this.toggleLink()}},t}(or),Qc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"code"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"schema",{get:function(){return{attrs:z({rawHTML:{default:null}},{htmlAttrs:{default:null},classNames:{default:null}}),parseDOM:[{tag:"code",getAttrs:function(e){var t=e.getAttribute("data-raw-html");return z({},t&&{rawHTML:t})}}],toDOM:function(e){var t=e.attrs;return[t.rawHTML||"code",pu(t)]}}},enumerable:!1,configurable:!0}),t.prototype.commands=function(){return function(){return function(e,t){return L(e.schema.marks.code)(e,t)}}},t.prototype.keymaps=function(){var e=this.commands()();return{"Shift-Mod-c":e,"Shift-Mod-C":e}},t}(or),Kc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"customBlock"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"schema",{get:function(){return{content:"text*",group:"block",attrs:{info:{default:null}},atom:!0,code:!0,defining:!0,parseDOM:[{tag:"div[data-custom-info]",getAttrs:function(e){return{info:e.getAttribute("data-custom-info")}}}],toDOM:function(e){return["div",{"data-custom-info":e.attrs.info||null},0]}}},enumerable:!1,configurable:!0}),t.prototype.commands=function(){return function(e){return function(t,n){return!!(null==e?void 0:e.info)&&E(t.schema.nodes.customBlock,e)(t,n)}}},t}(yn),Yc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"frontMatter"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"schema",{get:function(){return{content:"text*",group:"block",code:!0,defining:!0,parseDOM:[{preserveWhitespace:"full",tag:"div[data-front-matter]"}],toDOM:function(){return["div",{"data-front-matter":"true"},0]}}},enumerable:!1,configurable:!0}),t.prototype.commands=function(){return function(){return function(e,t,n){var r=e.selection.$from;return!(!n.endOfTextblock("down")||"frontMatter"!==r.node().type.name)&&N(e,t)}}},t.prototype.keymaps=function(){return{Enter:this.commands()()}},t}(yn),Jc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"htmlComment"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"schema",{get:function(){return{content:"text*",group:"block",code:!0,defining:!0,parseDOM:[{preserveWhitespace:"full",tag:"div[data-html-comment]"}],toDOM:function(){return["div",{"data-html-comment":"true"},0]}}},enumerable:!1,configurable:!0}),t.prototype.commands=function(){return function(){return function(e,t,n){var r=e.selection.$from;return!(!n.endOfTextblock("down")||"htmlComment"!==r.node().type.name)&&N(e,t)}}},t.prototype.keymaps=function(){return{Enter:this.commands()()}},t}(yn);var ed=tn("contents"),td=function(r){function o(e,t){var n=r.call(this,e)||this,o=t.toDOMAdaptor,i=t.htmlSchemaMap,a=void 0===i?{}:i,s=t.linkAttributes,l=void 0===s?{}:s,u=t.useCommandShortcut,c=void 0===u||u,d=t.wwPlugins,p=void 0===d?[]:d,f=t.wwNodeViews,h=void 0===f?{}:f;return n.editorType="wysiwyg",n.el.classList.add("ww-mode"),n.toDOMAdaptor=o,n.linkAttributes=l,n.extraPlugins=p,n.pluginNodeViews=h,n.specs=n.createSpecs(),n.schema=n.createSchema(a),n.context=n.createContext(),n.keymaps=n.createKeymaps(c),n.view=n.createView(),n.commands=n.createCommands(),n.specs.setContext(z(z({},n.context),{view:n.view})),n.initEvent(),n}return _(o,r),o.prototype.createSpecs=function(){return e=this.linkAttributes,new Mn([new xc,new Tc,new Mc,new Lc,new Nc,new Ac,new Sc,new Dc,new Oc,new Fc,new jc,new qc,new _c,new zc,new Uc,new Vc,new $c,new Wc,new Gc,new Xc,new Zc(e),new Qc,new Kc,new Yc,new kn,new Jc]);var e},o.prototype.createContext=function(){return{schema:this.schema,eventEmitter:this.eventEmitter}},o.prototype.createSchema=function(t){return new e({nodes:z(z({},this.specs.nodes),t.nodes),marks:z(z({},this.specs.marks),t.marks)})},o.prototype.createPlugins=function(){return U([new g({key:Iu,state:{init:function(){return null},apply:function(e,t){var n=e.getMeta(Iu);if(n)return-1===n?null:n;if(Ce(t)||!e.docChanged)return t;var r=e.mapping.mapResult(t),o=r.deleted,i=r.pos;return o?null:i}},props:{decorations:Hu,createSelectionBetween:function(e){var t=e.state;return Ce(Iu.getState(t))?null:t.selection}},view:function(e){return new Ru(e)}}),(e=this.eventEmitter,new g({props:{handleDOMEvents:{contextmenu:function(t,n){var r=Lu(n.target,t.dom);if(r){n.preventDefault();var o=n,i=o.clientX,a=o.clientY,s=t.dom.parentNode.getBoundingClientRect(),l=s.left,u=s.top,c="TH"===r.nodeName;return e.emit("contextmenu",{pos:{left:i-l+10+"px",top:a-u+30+"px"},menuGroups:zu(e,c),tableCell:r}),!0}return!1}}}})),new g({props:{handleDOMEvents:{mousedown:function(e,t){var n=t,r=n.clientX,o=n.clientY,i=e.posAtCoords({left:r,top:o});if(i){var a=e.state,s=a.doc,l=a.tr,u=s.resolve(i.pos),c=lu(u),d=t.target,p=getComputedStyle(d,":before"),f=t,h=f.offsetX,m=f.offsetY;if(!c||!Jt(p,h,m))return!1;t.preventDefault();var v=u.before(c.depth),g=c.node.attrs;return l.setNodeMarkup(v,null,z(z({},g),{checked:!g.checked})),e.dispatch(l),!0}return!1}}}}),Gu(this.eventEmitter)],this.createPluginProps()).concat(this.defaultPlugins);var e},o.prototype.createPluginNodeViews=function(){var e=this.eventEmitter,t=this.pluginNodeViews,n={};return t&&Object.keys(t).forEach((function(r){n[r]=function(n,o,i){return t[r](n,o,i,e)}})),n},o.prototype.createView=function(){var e=this,t=this.toDOMAdaptor,n=this.eventEmitter;return new u(this.el,{state:this.createState(),attributes:{class:ed},nodeViews:z({customBlock:function(e,n,r){return new Xu(e,n,r,t)},image:function(e,t,r){return new Qu(e,t,r,n)},codeBlock:function(e,t,r){return new Ku(e,t,r,n)},widget:bn},this.createPluginNodeViews()),dispatchTransaction:function(t){var n=e.view.state.applyTransaction(t).state;e.view.updateState(n),e.emitChangeEvent(t.scrollIntoView()),e.eventEmitter.emit("setFocusedNode",n.selection.$from.node(1))},transformPastedHTML:dc,transformPasted:function(t){return yc(t,e.schema,su(e.view.state.selection.$from))},handlePaste:function(e,t,n){return Cc(e,n)},handleKeyDown:function(t,n){return e.eventEmitter.emit("keydown",e.editorType,n),!1},handleDOMEvents:{paste:function(t,n){var r=n.clipboardData||window.clipboardData,o=null==r?void 0:r.items;if(o){var i=rt(o).some((function(e){return"string"===e.kind&&"text/rtf"===e.type}));if(!i){var a=vn(o);a&&(n.preventDefault(),mn(e.eventEmitter,a,n.type))}}return!1},keyup:function(t,n){return e.eventEmitter.emit("keyup",e.editorType,n),!1},scroll:function(){return e.eventEmitter.emit("scroll","editor"),!0}}})},o.prototype.createCommands=function(){return this.specs.commands(this.view,bu())},o.prototype.getHTML=function(){return pn(this.view.dom.innerHTML)},o.prototype.getModel=function(){return this.view.state.doc},o.prototype.getSelection=function(){var e=this.view.state.selection;return[e.from,e.to]},o.prototype.getSchema=function(){return this.view.state.schema},o.prototype.replaceSelection=function(e,r,o){var i=this.view.state,a=i.schema,s=i.tr,l=e.split("\n").map((function(e){return ot(a,Rt(e,a))})),u=new n(t.from(l),1,1),c=ke(r)&&ke(o)?s.replaceRange(r,o,u):s.replaceSelection(u);this.view.dispatch(c),this.focus()},o.prototype.deleteSelection=function(e,t){var n=this.view.state.tr,r=ke(e)&&ke(t)?n.deleteRange(e,t):n.deleteSelection();this.view.dispatch(r.scrollIntoView())},o.prototype.getSelectedText=function(e,t){var n=this.view.state,r=n.doc,o=n.selection,i=o.from,a=o.to;return ke(e)&&ke(t)&&(i=e,a=t),r.textBetween(i,a,"\n")},o.prototype.setModel=function(e,t){void 0===t&&(t=!1);var n=this.view.state,r=n.tr,o=n.doc;this.view.dispatch(r.replaceWith(0,o.content.size,e)),t&&this.moveCursorToEnd(!0)},o.prototype.setSelection=function(e,t){void 0===t&&(t=e);var n=this.view.state.tr,r=at(n,e,t);this.view.dispatch(n.setSelection(r).scrollIntoView())},o.prototype.addWidget=function(e,t,n){var r=this.view,o=r.dispatch,i=r.state;o(i.tr.setMeta("widget",{pos:null!=n?n:i.selection.to,node:e,style:t}))},o.prototype.replaceWithWidget=function(e,t,n){var r=this.view.state,o=r.tr,i=Rt(n,r.schema);this.view.dispatch(o.replaceWith(e,t,i))},o.prototype.getRangeInfoOfNode=function(e){var t=this.view.state,n=t.doc,r=t.selection,o=e?n.resolve(e):r.$from,i=o.marks(),a=o.node(),s=o.start(),l=o.end(),u=a.type.name;if(i.length||"paragraph"===u){var c=i[i.length-1];u=c?c.type.name:"text",a.forEach((function(e,t){var n=e.isText,r=e.nodeSize,i=e.marks,a=o.pos-s;n&&t<=a&&t+r>=a&&function(e){return!e.length||je(e,c)}(i)&&(l=(s+=t)+r)}))}return{range:[s,l],type:u}},o}(Cn),nd=ie,rd=Ce;var od=function(e){return!nd(e)&&!rd(e)};var id=function(e){return od(e)&&!1!==e};var ad=function(e){return!id(e)},sd=["afterPreviewRender","updatePreview","changeMode","needChangeMode","command","changePreviewStyle","changePreviewTabPreview","changePreviewTabWrite","scroll","contextmenu","show","hide","changeLanguage","changeToolbarState","toggleScrollSync","mixinTableOffsetMapPrototype","setFocusedNode","removePopupWidget","query","openPopup","closePopup","addImageBlobHook","beforePreviewRender","beforeConvertWysiwygToMarkdown","load","loadUI","change","caretChange","destroy","focus","blur","keydown","keyup"],ld=function(){function e(){var e=this;this.events=new Bu,this.eventTypes=sd.reduce((function(e,t){return z(z({},e),{type:t})}),{}),this.hold=!1,sd.forEach((function(t){e.addEventType(t)}))}return e.prototype.listen=function(e,t){var n=this.getTypeInfo(e),r=this.events.get(n.type)||[];if(!this.hasEventType(n.type))throw new Error("There is no event type "+n.type);n.namespace&&(t.namespace=n.namespace),r.push(t),this.events.set(n.type,r)},e.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=this.getTypeInfo(e),o=this.events.get(r.type),i=[];return!this.hold&&o&&o.forEach((function(e){var n=e.apply(void 0,t);ie(n)||i.push(n)})),i},e.prototype.emitReduce=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var o=this.events.get(e);return!this.hold&&o&&o.forEach((function(e){var r=e.apply(void 0,U([t],n));ad(r)||(t=r)})),t},e.prototype.getTypeInfo=function(e){var t=e.split(".");return{type:t[0],namespace:t[1]}},e.prototype.hasEventType=function(e){return!ie(this.eventTypes[this.getTypeInfo(e).type])},e.prototype.addEventType=function(e){if(this.hasEventType(e))throw new Error("There is already have event type "+e);this.eventTypes[e]=e},e.prototype.removeEventHandler=function(e,t){var n=this,r=this.getTypeInfo(e),o=r.type,i=r.namespace;o&&t?this.removeEventHandlerWithHandler(o,t):o&&!i?this.events.delete(o):!o&&i?this.events.forEach((function(e,t){n.removeEventHandlerWithTypeInfo(t,i)})):o&&i&&this.removeEventHandlerWithTypeInfo(o,i)},e.prototype.removeEventHandlerWithHandler=function(e,t){var n=this.events.get(e);if(n){var r=n.indexOf(t);n.indexOf(t)>=0&&n.splice(r,1)}},e.prototype.removeEventHandlerWithTypeInfo=function(e,t){var n=[],r=this.events.get(e);r&&(r.map((function(e){return e.namespace!==t&&n.push(e),null})),this.events.set(e,n))},e.prototype.getEvents=function(){return this.events},e.prototype.holdEventInvoke=function(e){this.hold=!0,e(),this.hold=!1},e}(),ud=function(){function e(e,t,n,r){this.eventEmitter=e,this.mdCommands=t,this.wwCommands=n,this.getEditorType=r,this.initEvent()}return e.prototype.initEvent=function(){var e=this;this.eventEmitter.listen("command",(function(t,n){e.exec(t,n)}))},e.prototype.addCommand=function(e,t,n){"markdown"===e?this.mdCommands[t]=n:this.wwCommands[t]=n},e.prototype.deleteCommand=function(e,t){"markdown"===e?delete this.mdCommands[t]:delete this.wwCommands[t]},e.prototype.exec=function(e,t){"markdown"===this.getEditorType()?this.mdCommands[e](t):this.wwCommands[e](t)},e}();function cd(e){return"\n"===e[e.length-1]?e.slice(0,e.length-1):e}function dd(e,t){var n=e.schema,r=t.literal.match(Zt);if(r){var o=r[1],i=r[3],a=(o||i).toLowerCase();return"htmlInline"===t.type&&!(!n.marks[a]&&!n.nodes[a])}return!1}function pd(e){return je(["text","strong","emph","strike","image","link","code"],e.type)}function fd(e){return"softbreak"===(null==e?void 0:e.type)}function hd(e){var t=e.type,n=e.literal,r="htmlInline"===t&&n.match(Zt);if(r){var o=r[1],i=r[3],a=o||i;if(a)return je(["ul","ol","li"],a.toLowerCase())}return!1}function md(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=document.createElement("div");r.innerHTML=Bl(e);var o=r.firstChild;return t.map((function(e){return o.getAttribute(e)||""}))}var vd={"b, strong":function(e,t,n){var r=e.schema.marks.strong;n?e.openMark(r.create({rawHTML:n})):e.closeMark(r)},"i, em":function(e,t,n){var r=e.schema.marks.emph;n?e.openMark(r.create({rawHTML:n})):e.closeMark(r)},"s, del":function(e,t,n){var r=e.schema.marks.strike;n?e.openMark(r.create({rawHTML:n})):e.closeMark(r)},code:function(e,t,n){var r=e.schema.marks.code;n?e.openMark(r.create({rawHTML:n})):e.closeMark(r)},a:function(e,t,n){var r=t.literal,o=e.schema.marks.link;if(n){var i=md(r,"href")[0];e.openMark(o.create({linkUrl:i,rawHTML:n}))}else e.closeMark(o)},img:function(e,t,n){var r=t.literal;if(n){var o=md(r,"src","alt"),i=o[0],a=o[1],s=e.schema.nodes.image;e.addNode(s,z({rawHTML:n,imageUrl:i},a&&{altText:a}))}},hr:function(e,t,n){e.addNode(e.schema.nodes.thematicBreak,{rawHTML:n})},br:function(e,t){var n=e.schema.nodes.paragraph,r=t.parent,o=t.prev,i=t.next;"paragraph"===(null==r?void 0:r.type)?(fd(o)&&e.openNode(n),fd(i)?e.closeNode():i&&(e.closeNode(),e.openNode(n))):"tableCell"===(null==r?void 0:r.type)&&(o&&(pd(o)||dd(e,o))&&e.closeNode(),i&&(pd(i)||dd(e,i))&&e.openNode(n))},pre:function(e,t,n){var r,o,i=document.createElement("div");i.innerHTML=t.literal;var a=null===(o=null===(r=i.firstChild)||void 0===r?void 0:r.firstChild)||void 0===o?void 0:o.textContent;e.openNode(e.schema.nodes.codeBlock,{rawHTML:n}),e.addText(cd(a)),e.closeNode()},"ul, ol":function(e,t,n){if("tableCell"===t.parent.type){var r=e.schema.nodes,o=r.bulletList,i=r.orderedList,a=r.paragraph,s="ul"===n?o:i;n?(t.prev&&!hd(t.prev)&&e.closeNode(),e.openNode(s,{rawHTML:n})):(e.closeNode(),t.next&&!hd(t.next)&&e.openNode(a))}},li:function(e,t,n){var r;if("tableCell"===(null===(r=t.parent)||void 0===r?void 0:r.type)){var o=e.schema.nodes,i=o.listItem,a=o.paragraph;if(n){var s=function(e){var t=e.literal;return{task:/data-task/.test(t),checked:/data-task-checked/.test(t)}}(t);t.prev&&!hd(t.prev)&&e.closeNode(),e.openNode(i,z({rawHTML:n},s)),t.next&&!hd(t.next)&&e.openNode(a)}else t.prev&&!hd(t.prev)&&e.closeNode(),e.closeNode()}}},gd=function(e){var t={};return Object.keys(e).forEach((function(n){n.split(", ").forEach((function(r){var o=r.toLowerCase();t[o]=e[n]}))})),t}(vd);function yd(e){return"htmlInline"===e.type&&Qt.test(e.literal)}function bd(e){rt(e.childNodes).forEach((function(e){if(rn(e)){var t=e.nodeName.toLowerCase();e.setAttribute("data-raw-html",t),e.childNodes&&bd(e)}}))}var wd={text:function(e,t){e.addText(t.literal||"")},paragraph:function(e,t,n,r){var o;if(n.entering){var i=e.schema.nodes.paragraph;"paragraph"===(null===(o=t.prev)||void 0===o?void 0:o.type)&&(e.openNode(i,r),e.closeNode()),e.openNode(i,r)}else e.closeNode()},heading:function(e,t,n,r){if(n.entering){var o=t,i=o.level,a=o.headingType;e.openNode(e.schema.nodes.heading,z({level:i,headingType:a},r))}else e.closeNode()},codeBlock:function(e,t,n){var r=e.schema.nodes.codeBlock,o=t,i=o.info,a=o.literal;e.openNode(r,z({language:i},n)),e.addText(cd(a||"")),e.closeNode()},list:function(e,t,n,r){if(n.entering){var o=e.schema.nodes,i=o.bulletList,a=o.orderedList,s=t.listData,l=s.type,u=s.start;"bullet"===l?e.openNode(i,r):e.openNode(a,z({order:u},r))}else e.closeNode()},item:function(e,t,n,r){var o=n.entering,i=e.schema.nodes.listItem,a=t.listData,s=a.task,l=a.checked;if(o){var u=z(z(z({},s&&{task:s}),l&&{checked:l}),r);e.openNode(i,u)}else e.closeNode()},blockQuote:function(e,t,n,r){n.entering?e.openNode(e.schema.nodes.blockQuote,r):e.closeNode()},image:function(e,t,n,r){var o=n.entering,i=n.skipChildren,a=e.schema.nodes.image,s=t,l=s.destination,u=s.firstChild;o&&i&&i(),e.addNode(a,z(z({imageUrl:l},u&&{altText:u.literal}),r))},thematicBreak:function(e,t,n,r){e.addNode(e.schema.nodes.thematicBreak,r)},strong:function(e,t,n,r){var o=n.entering,i=e.schema.marks.strong;o?e.openMark(i.create(r)):e.closeMark(i)},emph:function(e,t,n,r){var o=n.entering,i=e.schema.marks.emph;o?e.openMark(i.create(r)):e.closeMark(i)},link:function(e,t,n,r){var o=n.entering,i=e.schema.marks.link,a=t,s=a.destination,l=a.title;if(o){var u=z({linkUrl:s,title:l},r);e.openMark(i.create(u))}else e.closeMark(i)},softbreak:function(e,t){if("paragraph"===t.parent.type){var n=t.prev,r=t.next;n&&!yd(n)&&e.closeNode(),r&&!yd(r)&&e.openNode(e.schema.nodes.paragraph)}},table:function(e,t,n,r){n.entering?e.openNode(e.schema.nodes.table,r):e.closeNode()},tableHead:function(e,t,n,r){n.entering?e.openNode(e.schema.nodes.tableHead,r):e.closeNode()},tableBody:function(e,t,n,r){n.entering?e.openNode(e.schema.nodes.tableBody,r):e.closeNode()},tableRow:function(e,t,n,r){n.entering?e.openNode(e.schema.nodes.tableRow,r):e.closeNode()},tableCell:function(e,t,n){var r=n.entering;if(!t.ignored){var o=function(t){return t&&(pd(t)||dd(e,t))};if(r){var i=e.schema.nodes,a=i.tableHeadCell,s=i.tableBodyCell,l=i.paragraph,u=t.parent.parent,c="tableHead"===u.type?a:s,d=(u.parent.columns[t.startIdx]||{}).align,p=z({},t.attrs);d&&(p.align=d),e.openNode(c,p),o(t.firstChild)&&e.openNode(l)}else o(t.lastChild)&&e.closeNode(),e.closeNode()}},strike:function(e,t,n,r){var o=n.entering,i=e.schema.marks.strike;o?e.openMark(i.create(r)):e.closeMark(i)},code:function(e,t,n,r){var o=e.schema.marks.code;e.openMark(o.create(r)),e.addText(cd(t.literal||"")),e.closeMark(o)},customBlock:function(e,t){var n=e.schema.nodes,r=n.customBlock,o=n.paragraph,i=t,a=i.info,s=i.literal;e.openNode(r,{info:a}),e.addText(cd(s||"")),e.closeNode(),t.next||(e.openNode(o),e.closeNode())},frontMatter:function(e,t){e.openNode(e.schema.nodes.frontMatter),e.addText(t.literal),e.closeNode()},htmlInline:function(e,t){var n=t.literal,r=n.match(Zt),o=r[1],i=r[3],a=(o||i).toLowerCase(),s=e.schema.marks[a],l=Bl(n);if(null==s?void 0:s.spec.attrs.htmlInline)if(o){var u=jl(l);e.openMark(s.create({htmlAttrs:u}))}else e.closeMark(s);else{var c=gd[a];c&&c(e,t,o)}},htmlBlock:function(e,t){var n=t.literal,r=document.createElement("div");if(Kt.test(n))e.openNode(e.schema.nodes.htmlComment),e.addText(t.literal),e.closeNode();else{var o=n.match(Zt),i=o[1],a=o[3],s=(i||a).toLowerCase(),l=e.schema.nodes[s],u=Bl(n);if(null==l?void 0:l.spec.attrs.htmlBlock){var c=jl(u),d=Fl(t,s);e.addNode(l,{htmlAttrs:c,childrenHTML:d})}else r.innerHTML=u,bd(r),e.convertByDOMParser(r)}},customInline:function(e,t,n){var r=n.entering,o=n.skipChildren,i=t,a=i.info,s=i.firstChild,l=e.schema;if(-1!==a.indexOf("widget")&&r){var u=Pt(t);o(),e.addNode(l.nodes.widget,{info:a},[l.text(At(a,u))])}else{var c="$$";r&&(c+=s?a+" ":a),e.addText(c)}}};var kd=function(){function e(e,t){this.schema=e,this.convertors=t,this.stack=[{type:this.schema.topNodeType,attrs:null,content:[]}],this.marks=a.none}return e.prototype.top=function(){return Ze(this.stack)},e.prototype.push=function(e){this.stack.length&&this.top().content.push(e)},e.prototype.addText=function(e){if(e){var t=this.top().content,n=Ze(t),r=this.schema.text(e,this.marks),o=n&&(s=r,!!((i=n).isText&&s.isText&&a.sameSet(i.marks,s.marks))&&i.withText(i.text+s.text));o?t[t.length-1]=o:t.push(r)}var i,s},e.prototype.openMark=function(e){this.marks=e.addToSet(this.marks)},e.prototype.closeMark=function(e){this.marks=e.removeFromSet(this.marks)},e.prototype.addNode=function(e,t,n){var r=e.createAndFill(t,n,this.marks);return r?(this.push(r),r):null},e.prototype.openNode=function(e,t){this.stack.push({type:e,attrs:t,content:[]})},e.prototype.closeNode=function(){this.marks.length&&(this.marks=a.none);var e=this.stack.pop(),t=e.type,n=e.attrs,r=e.content;return this.addNode(t,n,r)},e.prototype.convertByDOMParser=function(e){var t=this;r.fromSchema(this.schema).parse(e).content.forEach((function(e){return t.push(e)}))},e.prototype.closeUnmatchedHTMLInline=function(e,t){var n;if(!t&&"htmlInline"!==e.type)for(var r=this.stack.length-1;r>=0;r-=1){var o=this.stack[r];if(!(null===(n=o.attrs)||void 0===n?void 0:n.rawHTML))break;o.content.length?this.closeNode():this.stack.pop()}},e.prototype.convert=function(e,t){for(var n=e.walker(),r=n.next(),o=function(){var e=r.node,o=r.entering,a=i.convertors[e.type],s=!1;if(a){var l={entering:o,leaf:!xt(e),getChildrenText:Tt,options:{gfm:!0,nodeId:!1,tagFilter:!1,softbreak:"\n"},skipChildren:function(){s=!0}};if(i.closeUnmatchedHTMLInline(e,o),a(i,e,l),(null==t?void 0:t.node)===e){var u=i.stack.reduce((function(e,t){return e+t.content.reduce((function(e,t){return e+t.nodeSize}),0)}),0)+1;t.setMappedPos(u)}}s&&(n.resumeAt(e,!1),n.next()),r=n.next()},i=this;r;)o()},e.prototype.convertNode=function(e,t){return this.convert(e,t),this.stack.length?this.closeNode():null},e}();var Cd={text:function(e,t){var n,r=t.node,o=null!==(n=r.text)&&void 0!==n?n:"";(r.marks||[]).some((function(e){return"link"===e.type.name}))?e.text(Ve(o),!1):e.text(o)},paragraph:function(e,t){var n=t.node,r=t.parent,o=t.index,i=void 0===o?0:o;if(e.stopNewline)e.convertInline(n);else{var a=0===i,s=!a&&r.child(i-1),l=s&&0===s.childCount,u=i<r.childCount-1&&r.child(i+1),c=u&&"paragraph"===u.type.name,d=0===n.childCount;if(d&&l)e.write("<br>\n");else if(!d||l||a)e.convertInline(n),c?e.write("\n"):e.closeBlock(n);else{if("listItem"===(null==r?void 0:r.type.name)){var p=e.getDelim();e.setDelim(""),e.write("<br>"),e.setDelim(p)}e.write("\n")}}},heading:function(e,t,n){var r=t.node,o=n.delim;"atx"===r.attrs.headingType?(e.write(o+" "),e.convertInline(r),e.closeBlock(r)):(e.convertInline(r),e.ensureNewLine(),e.write(o),e.closeBlock(r))},codeBlock:function(e,t,n){var r=t.node,o=n.delim,i=n.text,a=o,s=a[0],l=a[1];e.write(s),e.ensureNewLine(),e.text(i,!1),e.ensureNewLine(),e.write(l),e.closeBlock(r)},blockQuote:function(e,t,n){var r=t.node,o=t.parent,i=n.delim;(null==o?void 0:o.type.name)===r.type.name&&e.flushClose(1),e.wrapBlock(i,null,r,(function(){return e.convertNode(r)}))},bulletList:function(e,t,n){var r=t.node,o=n.delim;e.convertList(r,Ue(" ",4),(function(){return o+" "}))},orderedList:function(e,t){var n=t.node,r=n.attrs.order||1;e.convertList(n,Ue(" ",4),(function(e){return String(r+e)+". "}))},listItem:function(e,t){var n=t.node,r=n.attrs,o=r.task,i=r.checked;o&&e.write("["+(i?"x":" ")+"] "),e.convertNode(n)},image:function(e,t,n){var r=n.attrs;e.write("!["+(null==r?void 0:r.altText)+"]("+(null==r?void 0:r.imageUrl)+")")},thematicBreak:function(e,t,n){var r=t.node,o=n.delim;e.write(o),e.closeBlock(r)},table:function(e,t){var n=t.node;e.convertNode(n),e.closeBlock(n)},tableHead:function(e,t,n){var r=t.node,o=n.delim,i=r.firstChild;e.convertNode(r);var a=null!=o?o:"";!o&&i&&i.forEach((function(e){var t=function(e,t){var n=e.length,r="",o="";return"left"===t?(r=":",n-=1):"right"===t?(o=":",n-=1):"center"===t&&(r=":",o=":",n-=2),""+r+Ue("-",Math.max(n,3))+o}(e.textContent,e.attrs.align);a+="| "+t+" "})),e.write(a+"|"),e.ensureNewLine()},tableBody:function(e,t){var n=t.node;e.convertNode(n)},tableRow:function(e,t){var n=t.node;e.convertNode(n),e.write("|"),e.ensureNewLine()},tableHeadCell:function(e,t,n){var r=t.node,o=n.delim,i=void 0===o?"| ":o;e.write(i),e.convertTableCell(r),e.write(" ")},tableBodyCell:function(e,t,n){var r=t.node,o=n.delim,i=void 0===o?"| ":o;e.write(i),e.convertTableCell(r),e.write(" ")},customBlock:function(e,t,n){var r=t.node,o=n.delim,i=n.text,a=o,s=a[0],l=a[1];e.write(s),e.ensureNewLine(),e.text(i,!1),e.ensureNewLine(),e.write(l),e.closeBlock(r)},frontMatter:function(e,t,n){var r=t.node,o=n.text;e.text(o,!1),e.closeBlock(r)},widget:function(e,t,n){var r=n.text;e.write(r)},html:function(e,t,n){var r=t.node,o=n.text;e.write(o),r.attrs.htmlBlock&&e.closeBlock(r)},htmlComment:function(e,t,n){var r=t.node,o=n.text;e.write(o),e.closeBlock(r)}};function xd(e,t){var n=e.text,r=/`+/g,o=0;if(e.isText&&n)for(var i=r.exec(n);i;)o=Math.max(o,i[0].length),i=r.exec(n);for(var a=o>0&&t>0?" `":"`",s=0;s<o;s+=1)a+="`";return o>0&&t<0&&(a+=" "),a}function Td(e){return e?["<"+e+">","</"+e+">"]:null}function Ed(e){return e?"<"+e+">":null}function Md(e){return e?"</"+e+">":null}var Ld={heading:function(e){var t=e.node.attrs,n=t.level,r=Ue("#",n);return"setext"===t.headingType&&(r=1===n?"===":"---"),{delim:r,rawHTML:Td(t.rawHTML)}},codeBlock:function(e){var t=e.node,n=t.attrs,r=t.textContent;return{delim:["```"+(n.language||""),"```"],rawHTML:Td(n.rawHTML),text:r}},blockQuote:function(e){return{delim:"> ",rawHTML:Td(e.node.attrs.rawHTML)}},bulletList:function(e,t){var n=e.node,r=t.inTable,o=n.attrs.rawHTML;return r&&(o=o||"ul"),{delim:"*",rawHTML:Td(o)}},orderedList:function(e,t){var n=e.node,r=t.inTable,o=n.attrs.rawHTML;return r&&(o=o||"ol"),{rawHTML:Td(o)}},listItem:function(e,t){var n=e.node,r=t.inTable,o=n.attrs,i=o.task,a=o.checked,s=n.attrs.rawHTML;return r&&(s=s||"li"),{rawHTML:s?["<"+s+(i?' class="task-list-item'+(a?" checked":"")+'"':"")+(i?" data-task"+(a?" data-task-checked":""):"")+">","</"+s+">"]:null}},table:function(e){return{rawHTML:Td(e.node.attrs.rawHTML)}},tableHead:function(e){return{rawHTML:Td(e.node.attrs.rawHTML)}},tableBody:function(e){return{rawHTML:Td(e.node.attrs.rawHTML)}},tableRow:function(e){return{rawHTML:Td(e.node.attrs.rawHTML)}},tableHeadCell:function(e){return{rawHTML:Td(e.node.attrs.rawHTML)}},tableBodyCell:function(e){return{rawHTML:Td(e.node.attrs.rawHTML)}},image:function(e){var t=e.node.attrs,n=t.rawHTML,r=t.altText,o=t.imageUrl.replace(/&/g,"&"),i=r?' alt="'+Fe(r)+'"':"";return{rawHTML:n?"<"+n+' src="'+Fe(o)+'"'+i+">":null,attrs:{altText:Ve(r||""),imageUrl:o}}},thematicBreak:function(e){return{delim:"***",rawHTML:Ed(e.node.attrs.rawHTML)}},customBlock:function(e){var t=e.node,n=t.attrs,r=t.textContent;return{delim:["$$"+n.info,"$$"],text:r}},frontMatter:function(e){return{text:e.node.textContent}},widget:function(e){return{text:e.node.textContent}},strong:function(e,t){var n=e.node,r=t.entering,o=n.attrs.rawHTML;return{delim:"**",rawHTML:r?Ed(o):Md(o)}},emph:function(e,t){var n=e.node,r=t.entering,o=n.attrs.rawHTML;return{delim:"*",rawHTML:r?Ed(o):Md(o)}},strike:function(e,t){var n=e.node,r=t.entering,o=n.attrs.rawHTML;return{delim:"~~",rawHTML:r?Ed(o):Md(o)}},link:function(e,t){var n=e.node,r=t.entering,o=n.attrs,i=o.title,a=o.rawHTML,s=o.linkUrl.replace(/&/g,"&"),l=i?' title="'+Fe(i)+'"':"";return r?{delim:"[",rawHTML:a?"<"+a+' href="'+Fe(s)+'"'+l+">":null}:{delim:"]("+s+(i?" "+We(Ve(i)):"")+")",rawHTML:Md(a)}},code:function(e,t){var n=e.node,r=e.parent,o=e.index,i=void 0===o?0:o,a=t.entering;return{delim:a?xd(r.child(i),-1):xd(r.child(i-1),1),rawHTML:a?Ed(n.attrs.rawHTML):Md(n.attrs.rawHTML)}},htmlComment:function(e){return{text:e.node.textContent}},html:function(e,t){var n=e.node,r=t.entering,o=n.type.name,i=n.attrs.htmlAttrs,a="<"+o,s="</"+o+">";return Object.keys(i).forEach((function(e){a+=" "+e+'="'+i[e].replace(/"/g,"'")+'"'})),a+=">",n.attrs.htmlInline?{rawHTML:r?a:s}:{text:""+a+n.attrs.childrenHTML+s}}},Nd={strong:{mixable:!0,removedEnclosingWhitespace:!0},emph:{mixable:!0,removedEnclosingWhitespace:!0},strike:{mixable:!0,removedEnclosingWhitespace:!0},code:{escape:!1},link:null,html:null};function Ad(e){var t={};return Object.keys(Cd).forEach((function(n){t[n]=function(t,r){if(Cd[n]){var o=e[n],i=o?o(r,{inTable:t.inTable}):{};!function(e,t){var n=t.state,r=t.nodeInfo,o=t.params,i=o.rawHTML;i?oe(e,["heading","codeBlock"])>-1?function(e,t,n){var r=n[0],o=n[1];e.write(r),e.convertInline(t),e.write(o)}(n,r.node,i):oe(e,["image","thematicBreak"])>-1?n.write(i):function(e,t,n){var r=t.node,o=t.parent,i=n[0],a=n[1];e.stopNewline=!0,e.write(i),e.convertNode(r),e.write(a),"doc"===(null==o?void 0:o.type.name)&&(e.closeBlock(r),e.stopNewline=!1)}(n,r,i):Cd[e](n,r,o)}(n,{state:t,nodeInfo:r,params:i})}}})),t}function Sd(e){Object.keys(e).forEach((function(t){var n=Ld[t],r=e[t];Ld[t]=n?function(e,t){return t.origin=function(){return n(e,t)},r(e,t)}:r,delete e[t]}));var t=Ad(Ld),n=function(e){var t={};return Object.keys(Nd).forEach((function(n){t[n]=function(t,r){var o=Nd[n],i=e[n],a=i&&t&&!ie(r)?i(t,{entering:r}):{};return z(z({},a),o)}})),t}(Ld);return{nodeTypeConvertors:t,markTypeConvertors:n}}var Dd=function(){function e(e){var t=e.nodeTypeConvertors,n=e.markTypeConvertors;this.nodeTypeConvertors=t,this.markTypeConvertors=n,this.delim="",this.result="",this.closed=!1,this.tightList=!1,this.stopNewline=!1,this.inTable=!1}return e.prototype.getMarkConvertor=function(e){var t=e.attrs.htmlInline?"html":e.type.name;return this.markTypeConvertors[t]},e.prototype.isInBlank=function(){return/(^|\n)$/.test(this.result)},e.prototype.markText=function(e,t,n,r){var o=this.getMarkConvertor(e);if(o){var i=o({node:e,parent:n,index:r},t),a=i.delim;return i.rawHTML||a}return""},e.prototype.setDelim=function(e){this.delim=e},e.prototype.getDelim=function(){return this.delim},e.prototype.flushClose=function(e){if(!this.stopNewline&&this.closed){if(this.isInBlank()||(this.result+="\n"),e||(e=2),e>1){var t=this.delim,n=/\s+$/.exec(t);n&&(t=t.slice(0,t.length-n[0].length));for(var r=1;r<e;r+=1)this.result+=t+"\n"}this.closed=!1}},e.prototype.wrapBlock=function(e,t,n,r){var o=this.getDelim();this.write(t||e),this.setDelim(this.getDelim()+e),r(),this.setDelim(o),this.closeBlock(n)},e.prototype.ensureNewLine=function(){this.isInBlank()||(this.result+="\n")},e.prototype.write=function(e){void 0===e&&(e=""),this.flushClose(),this.delim&&this.isInBlank()&&(this.result+=this.delim),e&&(this.result+=e)},e.prototype.closeBlock=function(e){this.closed=e},e.prototype.text=function(e,t){void 0===t&&(t=!0);for(var n=e.split("\n"),r=0;r<n.length;r+=1)this.write(),this.result+=t?$e(n[r]):n[r],r!==n.length-1&&(this.result+="\n")},e.prototype.convertBlock=function(e,t,n){var r=e.type.name,o=this.nodeTypeConvertors[r],i={node:e,parent:t,index:n};e.attrs.htmlBlock?this.nodeTypeConvertors.html(this,i):o&&o(this,i)},e.prototype.convertInline=function(e){var t=this,n=[],r="",o=function(o,i,a){var s=o?o.marks:[],l=r;r="";var u=o&&o.isText&&s.some((function(e){var n=t.getMarkConvertor(e),r=n&&n();return r&&r.removedEnclosingWhitespace}));if(u&&o&&o.text){var c=/^(\s*)(.*?)(\s*)$/m.exec(o.text),d=c[1],p=c[2],f=c[3];l+=d,r=f,(d||f)&&((o=p?o.withText(p):null)||(s=n))}for(var h=s.length&&Ze(s),m=h&&t.getMarkConvertor(h),v=m&&m(),g=v&&!1===v.escape,y=s.length-(g?1:0),b=0;b<y;b+=1){p=s[b];if(v&&!v.mixable)break;for(var w=0;w<n.length;w+=1){var k=n[w];if(v&&!v.mixable)break;if(p.eq(k)){b>w?s=s.slice(0,w).concat(p).concat(s.slice(w,b)).concat(s.slice(b+1,y)):w>b&&(s=s.slice(0,b).concat(s.slice(b+1,w)).concat(p).concat(s.slice(w,y)));break}}}for(var C=0;C<Math.min(n.length,y)&&s[C].eq(n[C]);)C+=1;for(;C<n.length;){var x=n.pop();x&&t.text(t.markText(x,!1,e,a),!1)}if(l&&t.text(l),o){for(;n.length<y;){p=s[n.length];n.push(p),t.text(t.markText(p,!0,e,a),!1)}g&&o.isText?t.text(t.markText(h,!0,e,a)+o.text+t.markText(h,!1,e,a+1),!1):t.convertBlock(o,e,a)}};e.forEach(o),o(null,0,e.childCount)},e.prototype.convertList=function(e,t,n){var r,o=this;this.closed&&this.closed.type===e.type?this.flushClose(3):this.tightList&&this.flushClose(1);var i=null===(r=e.attrs.tight)||void 0===r||r,a=this.tightList;this.tightList=i,e.forEach((function(r,a,s){s&&i&&o.flushClose(1),o.wrapBlock(t,n(s),e,(function(){return o.convertBlock(r,e,s)}))})),this.tightList=a},e.prototype.convertTableCell=function(e){var t=this;this.stopNewline=!0,this.inTable=!0,e.forEach((function(n,r,o){je(["bulletList","orderedList"],n.type.name)?(t.convertBlock(n,e,o),t.closed=!1):(t.convertInline(n),o<e.childCount-1&&"paragraph"===e.child(o+1).type.name&&t.write("<br>"))})),this.stopNewline=!1,this.inTable=!1},e.prototype.convertNode=function(e,t){var n=this;return e.forEach((function(r,o,i){if(n.convertBlock(r,e,i),(null==t?void 0:t.node)===r){var a=n.result.split("\n");t.setMappedPos([a.length,Ze(a).length+1])}})),this.result},e}(),Od=function(){function e(e,t,n,r){var o=this;this.setMappedPos=function(e){o.mappedPosWhenConverting=e},this.schema=e,this.eventEmitter=r,this.focusedNode=null,this.mappedPosWhenConverting=null,this.toWwConvertors=function(e){var t=Object.keys(e),n=z({},wd),r=new js({gfm:!0,nodeId:!0,convertors:e}).getConvertors();return t.forEach((function(t){var o=wd[t];o&&!je(["htmlBlock","htmlInline"],t)&&(n[t]=function(n,i,a){a.origin=function(){return r[t](i,a,r)};var s,l=e[t](i,a);if(l){var u=Array.isArray(l)?l[0]:l;s={htmlAttrs:u.attributes,classNames:u.classNames}}o(n,i,a,s)})})),n}(n),this.toMdConvertors=Sd(t||{}),this.eventEmitter.listen("setFocusedNode",(function(e){return o.focusedNode=e}))}return e.prototype.getMappedPos=function(){return this.mappedPosWhenConverting},e.prototype.getInfoForPosSync=function(){return{node:this.focusedNode,setMappedPos:this.setMappedPos}},e.prototype.toWysiwygModel=function(e){return new kd(this.schema,this.toWwConvertors).convertNode(e,this.getInfoForPosSync())},e.prototype.toMarkdownText=function(e){var t=new Dd(this.toMdConvertors).convertNode(e,this.getInfoForPosSync());return t=this.eventEmitter.emitReduce("beforeConvertWysiwygToMarkdown",t)},e}();function Id(e){var n=e.plugins,r=e.eventEmitter,o=e.usageStatistics,i=e.instance;return r.listen("mixinTableOffsetMapPrototype",xu),(null!=n?n:[]).reduce((function(e,n){var a=function(e){var n=e.plugin,r={eventEmitter:e.eventEmitter,usageStatistics:e.usageStatistics,instance:e.instance,pmState:{Plugin:g,PluginKey:h,Selection:b,TextSelection:v},pmView:{Decoration:l,DecorationSet:s},pmModel:{Fragment:t},pmRules:{InputRule:I,inputRules:R,undoInputRule:P},pmKeymap:{keymap:C},i18n:qu};if(X(n)){var o=n[0],i=n[1];return o(r,void 0===i?{}:i)}return n(r)}({plugin:n,eventEmitter:r,usageStatistics:o,instance:i});if(!a)throw new Error("The return value of the executed plugin is empty.");var u=a.markdownParsers,c=a.toHTMLRenderers,d=a.toMarkdownRenderers,p=a.markdownPlugins,f=a.wysiwygPlugins,m=a.wysiwygNodeViews,y=a.markdownCommands,w=a.wysiwygCommands,k=a.toolbarItems;return c&&(e.toHTMLRenderers=Ke(e.toHTMLRenderers,c)),d&&(e.toMarkdownRenderers=Ke(e.toMarkdownRenderers,d)),p&&(e.mdPlugins=e.mdPlugins.concat(p)),f&&(e.wwPlugins=e.wwPlugins.concat(f)),m&&(e.wwNodeViews=z(z({},e.wwNodeViews),m)),y&&(e.mdCommands=z(z({},e.mdCommands),y)),w&&(e.wwCommands=z(z({},e.wwCommands),w)),k&&(e.toolbarItems=e.toolbarItems.concat(k)),u&&(e.markdownParsers=z(z({},e.markdownParsers),u)),e}),{toHTMLRenderers:{},toMarkdownRenderers:{},mdPlugins:[],wwPlugins:[],wwNodeViews:{},mdCommands:{},wwCommands:{},toolbarItems:[],markdownParsers:{}})}var Rd=function(){function e(e){var t=this;this.options=W({linkAttributes:null,extendedAutolinks:!1,customHTMLRenderer:null,referenceDefinition:!1,customHTMLSanitizer:null,frontMatter:!1,usageStatistics:!0,theme:"light"},e),this.eventEmitter=new ld;var n,r=ze(this.options.linkAttributes),o=Id({plugins:this.options.plugins,eventEmitter:this.eventEmitter,usageStatistics:this.options.usageStatistics,instance:this})||{},i=o.toHTMLRenderers,a=o.markdownParsers,s=this.options,l=s.customHTMLRenderer,u=s.extendedAutolinks,c=s.referenceDefinition,d=s.frontMatter,p=s.customHTMLSanitizer,f={linkAttributes:r,customHTMLRenderer:z(z({},i),l),extendedAutolinks:u,referenceDefinition:c,frontMatter:d,sanitizer:p||Bl};n=f.customHTMLRenderer,["htmlBlock","htmlInline"].forEach((function(e){n[e]&&Object.keys(n[e]).forEach((function(e){return Hl(e)}))})),this.options.events&&$(this.options.events,(function(e,n){t.on(n,e)}));var h=this.options,m=h.el,v=h.initialValue,g=h.theme,y=m.innerHTML;"light"!==g&&m.classList.add(tn(g)),m.innerHTML="",this.toastMark=new Os("",{disallowedHtmlBlockTags:["br","img"],extendedAutolinks:u,referenceDefinition:c,disallowDeepHeading:!0,frontMatter:d,customParser:a}),this.preview=new ou(this.eventEmitter,z(z({},f),{isViewer:!0})),To(this.preview.previewContent,"mousedown",this.toggleTask.bind(this)),v?this.setMarkdown(v):y&&this.preview.setHTML(y),m.appendChild(this.preview.previewContent),this.eventEmitter.emit("load",this)}return e.prototype.toggleTask=function(e){var t=e.target,n=getComputedStyle(t,":before");!t.hasAttribute("data-task-disabled")&&t.hasAttribute("data-task")&&Jt(n,e.offsetX,e.offsetY)&&(an(t,"checked"),this.eventEmitter.emit("change",{source:"viewer",date:e}))},e.prototype.setMarkdown=function(e){var t=this.toastMark.getLineTexts(),n=[t.length,Ze(t).length+1],r=this.toastMark.editMarkdown([1,1],n,e||"");this.eventEmitter.emit("updatePreview",r)},e.prototype.on=function(e,t){this.eventEmitter.listen(e,t)},e.prototype.off=function(e){this.eventEmitter.removeEventHandler(e)},e.prototype.addHook=function(e,t){this.eventEmitter.removeEventHandler(e),this.eventEmitter.listen(e,t)},e.prototype.destroy=function(){bo(this.preview.el,"mousedown",this.toggleTask.bind(this)),this.preview.destroy(),this.eventEmitter.emit("destroy")},e.prototype.isViewer=function(){return!0},e.prototype.isMarkdownMode=function(){return!1},e.prototype.isWysiwygMode=function(){return!1},e}();function Pd(e){return e instanceof i}function Hd(e){return je(["document","blockQuote","bulletList","orderedList","listItem","paragraph","heading","emph","strong","strike","link","image","table","tableHead","tableBody","tableRow","tableHeadCell","tableBodyCell"],e)}var Bd={openTag:function(e,t){var n=e,r=n.tagName,o=n.classNames,i=n.attributes,a=document.createElement(r),s={};o&&(a.className=o.join(" ")),i&&(s=z(z({},s),i)),dn(s,a),t.push(a)},closeTag:function(e,t){if(t.length>1){var n=t.pop();Ze(t).appendChild(n)}},html:function(e,t){Ze(t).insertAdjacentHTML("beforeend",e.content)},text:function(e,t){var n=document.createTextNode(e.content);Ze(t).appendChild(n)}},Fd=function(){function e(e,t){var n=$l(e,t),r=z(z({},t.htmlBlock),t.htmlInline);this.customConvertorKeys=Object.keys(t).concat(Object.keys(r)),this.renderer=new js({gfm:!0,convertors:z(z({},n),r)}),this.convertors=this.renderer.getConvertors()}return e.prototype.generateTokens=function(e){var t=function(e){var t=e.attrs,n=e.type.name,r={type:n,wysiwygNode:!0,literal:!Hd(n)&&Pd(e)?e.textContent:null},o={heading:{level:t.level},link:{destination:t.linkUrl,title:t.title},image:{destination:t.imageUrl},codeBlock:{info:t.language},bulletList:{type:"list",listData:{type:"bullet"}},orderedList:{type:"list",listData:{type:"ordered",start:t.order}},listItem:{type:"item",listData:{task:t.task,checked:t.checked}},tableHeadCell:{type:"tableCell",cellType:"head",align:t.align},tableBodyCell:{type:"tableCell",cellType:"body",align:t.align},customBlock:{info:t.info}}[n],i=z(z({},r),o),a=e.attrs,s=a.htmlAttrs,l=a.childrenHTML;return s?z(z({},i),{attrs:s,childrenHTML:l}):i}(e),n={entering:!0,leaf:!!Pd(e)&&e.isLeaf,options:this.renderer.getOptions(),getChildrenText:function(){return Pd(e)?e.textContent:""},skipChildren:function(){return!1}},r=this.convertors[e.type.name],o=r(t,n,this.convertors),i=X(o)?o:[o];return(Hd(e.type.name)||e.attrs.htmlInline)&&(n.entering=!1,i.push({type:"text",content:Pd(e)?e.textContent:""}),i=i.concat(r(t,n,this.convertors))),i},e.prototype.toDOMNode=function(e){var t=this.generateTokens(e),n=[];return t.forEach((function(e){return Bd[e.type](e,n)})),n[0]},e.prototype.getToDOMNode=function(e){return je(this.customConvertorKeys,e)?this.toDOMNode.bind(this):null},e}(),jd=15,qd=null,_d=null;function zd(e,t){var n=t.syncScrollTop,r=t.releaseEventBlock;_d&&clearTimeout(_d),n(e),_d=setTimeout((function(){r()}),jd)}var Ud=function(){function e(e,t,n){this.latestEditorScrollTop=null,this.latestPreviewScrollTop=null,this.blockedScroll=null,this.active=!0,this.timer=null;var r=t.previewContent,o=t.el;this.previewRoot=r,this.previewEl=o,this.mdEditor=e,this.editorView=e.view,this.toastMark=e.getToastMark(),this.eventEmitter=n,this.addScrollSyncEvent()}return e.prototype.addScrollSyncEvent=function(){var e=this;this.eventEmitter.listen("afterPreviewRender",(function(){e.clearTimer(),e.timer=setTimeout((function(){e.syncPreviewScrollTop(!0)}),200)})),this.eventEmitter.listen("scroll",(function(t,n){e.active&&("editor"===t&&"editor"!==e.blockedScroll?e.syncPreviewScrollTop():"preview"===t&&"preview"!==e.blockedScroll&&e.syncEditorScrollTop(n))})),this.eventEmitter.listen("toggleScrollSync",(function(t){e.active=t}))},e.prototype.getMdNodeAtPos=function(e,t){var n=e.content.findIndex(t.pos).index;return this.toastMark.findFirstNodeAtLine(n+1)},e.prototype.getScrollTopByCaretPos=function(){var e=this.mdEditor.getSelection(),t=this.toastMark.findFirstNodeAtLine(e[0][0]),n=this.previewEl.clientHeight,r=Jl(this.previewRoot,t).el,o=(Kl(r,this.previewRoot)||r.offsetTop)+r.clientHeight-.5*n;return this.latestEditorScrollTop=null,r.getBoundingClientRect().top-this.previewEl.getBoundingClientRect().top<n?null:o},e.prototype.syncPreviewScrollTop=function(e){void 0===e&&(e=!1);var t=this,n=t.editorView,r=t.previewEl,o=t.previewRoot,i=n.dom.getBoundingClientRect(),a=i.left,s=i.top,l=n.posAtCoords({left:a,top:s}),u=n.state.doc,c=this.getMdNodeAtPos(u,l);if(c&&!function(e){var t=e.type;return"htmlBlock"===t||"htmlInline"===t}(c)){var d=r.scrollTop,p=n.dom,f=p.scrollTop,h=p.scrollHeight,m=p.clientHeight,v=p.children,g=h-f<=m+18,y=g?r.scrollHeight:0;if(f&&!g){if(e){var b=this.getScrollTopByCaretPos();if(!b)return;y=b}else{var w=Jl(this.previewRoot,c),k=w.el,C=Zl(u,w.mdNode,v),x=C.height,T=C.rect;y=(Kl(k,o)||k.offsetTop)+k.clientHeight*(s>T.top?Math.min((s-T.top)/x,1):0)}y=this.getResolvedScrollTop("editor",f,y,d),this.latestEditorScrollTop=f}y!==d&&this.run("editor",y,d)}},e.prototype.syncEditorScrollTop=function(e){var t=this,n=t.toastMark,r=t.editorView,o=t.previewRoot,i=t.previewEl,a=r.dom,s=r.state,l=i.scrollTop,u=i.clientHeight,c=i.scrollHeight-l<=u,d=a.scrollTop,p=c?a.scrollHeight:0;if(l&&e&&!c){if(e=function(e,t){for(;!e.getAttribute("data-nodeid")&&e.parentElement!==t;)e=e.parentElement;return e}(e,o),!e.getAttribute("data-nodeid"))return;var f=a.children,h=Number(e.getAttribute("data-nodeid")),m=Jl(this.previewRoot,n.findNodeById(h)),v=m.mdNode,g=m.el;p=f[ct(v)-1].offsetTop;var y=Zl(s.doc,v,f).height,b=nu(g,o,h),w=b.nodeHeight;p+=function(e,t,n,r){return Math.min((e-t)/n,1)*r}(l,b.offsetTop,w,y),p=this.getResolvedScrollTop("preview",l,p,d),this.latestPreviewScrollTop=l}p!==d&&this.run("preview",p,d)},e.prototype.getResolvedScrollTop=function(e,t,n,r){var o="editor"===e?this.latestEditorScrollTop:this.latestPreviewScrollTop;return null===o?n:o<t?Math.max(n,r):Math.min(n,r)},e.prototype.run=function(e,t,n){var r,o=this;"editor"===e?(r=this.previewEl,this.blockedScroll="preview"):(r=this.editorView.dom,this.blockedScroll="editor"),function(e,t,n){var r=t-e,o=Date.now(),i=function(){var a,s=(Date.now()-o)/100;qd&&clearTimeout(qd),s<1?(a=e+r*Math.cos((1-s)*Math.PI/2),zd(Math.ceil(a),n),qd=setTimeout(i,1)):(zd(t,n),qd=null)};i()}(n,t,{syncScrollTop:function(e){return r.scrollTop=e},releaseEventBlock:function(){return o.blockedScroll=null}})},e.prototype.clearTimer=function(){this.timer&&(clearTimeout(this.timer),this.timer=null)},e.prototype.destroy=function(){this.clearTimer(),this.eventEmitter.removeEventHandler("scroll"),this.eventEmitter.removeEventHandler("afterPreviewRender")},e}(),Vd={getPopupInitialValues:function(e,t){return"link"===t.popupName?{linkText:e.getSelectedText()}:{}}};var $d=function(){function e(e){var t=this;this.initialHTML=e.el.innerHTML,e.el.innerHTML="",this.options=W({previewStyle:"tab",previewHighlight:!0,initialEditType:"markdown",height:"300px",minHeight:"200px",language:"en-US",useCommandShortcut:!0,usageStatistics:!0,toolbarItems:[["heading","bold","italic","strike"],["hr","quote"],["ul","ol","task","indent","outdent"],["table","image","link"],["code","codeblock"],["scrollSync"]],hideModeSwitch:!1,linkAttributes:null,extendedAutolinks:!1,customHTMLRenderer:null,customMarkdownRenderer:null,referenceDefinition:!1,customHTMLSanitizer:null,frontMatter:!1,widgetRules:[],theme:"light",autofocus:!0},e);var n=this.options,r=n.customHTMLRenderer,o=n.extendedAutolinks,i=n.referenceDefinition,a=n.frontMatter,s=n.customMarkdownRenderer,l=n.useCommandShortcut,u=n.initialEditType,c=n.widgetRules,d=n.customHTMLSanitizer;this.mode=u||"markdown",this.mdPreviewStyle=this.options.previewStyle,this.i18n=qu,this.i18n.setCode(this.options.language),this.eventEmitter=new ld,Ot(c);var p=ze(this.options.linkAttributes);this.pluginInfo=Id({plugins:this.options.plugins,eventEmitter:this.eventEmitter,usageStatistics:this.options.usageStatistics,instance:this});var f,h=this.pluginInfo,m=h.toHTMLRenderers,v=h.toMarkdownRenderers,g=h.mdPlugins,y=h.wwPlugins,b=h.wwNodeViews,w=h.mdCommands,k=h.wwCommands,C=h.markdownParsers,x={linkAttributes:p,customHTMLRenderer:Ke(m,r),extendedAutolinks:o,referenceDefinition:i,frontMatter:a,sanitizer:d||Bl},T=new Fd(p,x.customHTMLRenderer),E=function(e,t,n){var r={nodes:{},marks:{}};return["htmlBlock","htmlInline"].forEach((function(o){e[o]&&Object.keys(e[o]).forEach((function(e){var i="htmlBlock"===o?"nodes":"marks";Hl(e),r[i][e]=zl[o](e,t,n)}))})),r}(x.customHTMLRenderer,x.sanitizer,T);this.toastMark=new Os("",{disallowedHtmlBlockTags:["br","img"],extendedAutolinks:o,referenceDefinition:i,disallowDeepHeading:!0,frontMatter:a,customParser:C}),this.mdEditor=new co(this.eventEmitter,{toastMark:this.toastMark,useCommandShortcut:l,mdPlugins:g}),this.preview=new ou(this.eventEmitter,z(z({},x),{isViewer:!1,highlight:this.options.previewHighlight})),this.wwEditor=new td(this.eventEmitter,{toDOMAdaptor:T,useCommandShortcut:l,htmlSchemaMap:E,linkAttributes:p,wwPlugins:y,wwNodeViews:b}),this.convertor=new Od(this.wwEditor.getSchema(),z(z({},v),s),$l(p,x.customHTMLRenderer),this.eventEmitter),this.setMinHeight(this.options.minHeight),this.setHeight(this.options.height),this.setMarkdown(this.options.initialValue,!1),this.options.placeholder&&this.setPlaceholder(this.options.placeholder),this.options.initialValue||this.setHTML(this.initialHTML,!1),this.commandManager=new ud(this.eventEmitter,this.mdEditor.commands,this.wwEditor.commands,(function(){return t.mode})),this.options.usageStatistics&&Le("editor","UA-129966929-1"),this.scrollSync=new Ud(this.mdEditor,this.preview,this.eventEmitter),this.addInitEvent(),this.addInitCommand(w,k),(f=this).eventEmitter.listen("query",(function(e,t){return Vd[e](f,t)})),this.options.hooks&&$(this.options.hooks,(function(e,n){return t.addHook(n,e)})),this.options.events&&$(this.options.events,(function(e,n){return t.on(n,e)})),this.eventEmitter.emit("load",this),this.moveCursorToStart(this.options.autofocus)}return e.prototype.addInitEvent=function(){var e=this;this.on("needChangeMode",this.changeMode.bind(this)),this.on("loadUI",(function(){if("auto"!==e.height){var t=Math.min(parseInt(e.minHeight,10),parseInt(e.height,10)-75)+"px";e.setMinHeight(t)}})),this.eventEmitter.listen("addImageBlobHook",(function(e,t){var n=new FileReader;n.onload=function(e){var n=e.target;return t(n.result)},n.readAsDataURL(e)}))},e.prototype.addInitCommand=function(e,t){var n=this,r=function(e,t){Object.keys(t).forEach((function(r){n.addCommand(e,r,t[r])}))};this.addCommand("markdown","toggleScrollSync",(function(e){return n.eventEmitter.emit("toggleScrollSync",e.active),!0})),r("markdown",e),r("wysiwyg",t)},e.prototype.getCurrentModeEditor=function(){return this.isMarkdownMode()?this.mdEditor:this.wwEditor},e.factory=function(t){return t.viewer?new Rd(t):new e(t)},e.setLanguage=function(e,t){qu.setLanguage(e,t)},e.prototype.changePreviewStyle=function(e){this.mdPreviewStyle!==e&&(this.mdPreviewStyle=e,this.eventEmitter.emit("changePreviewStyle",e))},e.prototype.exec=function(e,t){this.commandManager.exec(e,t)},e.prototype.addCommand=function(e,t,n){var r=this;this.commandManager.addCommand(e,t,(function(t){void 0===t&&(t={});var o=("markdown"===e?r.mdEditor:r.wwEditor).view;n(t,o.state,o.dispatch,o)}))},e.prototype.on=function(e,t){this.eventEmitter.listen(e,t)},e.prototype.off=function(e){this.eventEmitter.removeEventHandler(e)},e.prototype.addHook=function(e,t){this.eventEmitter.removeEventHandler(e),this.eventEmitter.listen(e,t)},e.prototype.removeHook=function(e){this.eventEmitter.removeEventHandler(e)},e.prototype.focus=function(){this.getCurrentModeEditor().focus()},e.prototype.blur=function(){this.getCurrentModeEditor().blur()},e.prototype.moveCursorToEnd=function(e){void 0===e&&(e=!0),this.getCurrentModeEditor().moveCursorToEnd(e)},e.prototype.moveCursorToStart=function(e){void 0===e&&(e=!0),this.getCurrentModeEditor().moveCursorToStart(e)},e.prototype.setMarkdown=function(e,t){if(void 0===e&&(e=""),void 0===t&&(t=!0),this.mdEditor.setMarkdown(e,t),this.isWysiwygMode()){var n=this.toastMark.getRootNode(),r=this.convertor.toWysiwygModel(n);this.wwEditor.setModel(r,t)}},e.prototype.setHTML=function(e,t){void 0===e&&(e=""),void 0===t&&(t=!0);var n=document.createElement("div");n.innerHTML=function(e){var t=e.replace(/<p><br\s*\/*><\/p>/gi,"<p></p>"),n=new RegExp(Xt,"ig"),r=t.match(n);return null==r||r.forEach((function(e,n){if(Qt.test(e)){var o=Yt;if(n){var i=r[n-1].match(Gt);if(i&&!/br/i.test(i[1])){var a=i[1];o="</"+a+"><"+a+">"}}t=t.replace(Qt,o)}})),t}(e);var o=r.fromSchema(this.wwEditor.schema).parse(n);this.isMarkdownMode()?this.mdEditor.setMarkdown(this.convertor.toMarkdownText(o),t):this.wwEditor.setModel(o,t)},e.prototype.getMarkdown=function(){return this.isMarkdownMode()?this.mdEditor.getMarkdown():this.convertor.toMarkdownText(this.wwEditor.getModel())},e.prototype.getHTML=function(){var e=this;this.eventEmitter.holdEventInvoke((function(){if(e.isMarkdownMode()){var t=e.toastMark.getRootNode(),n=e.convertor.toWysiwygModel(t);e.wwEditor.setModel(n)}}));var t=pn(this.wwEditor.view.dom.innerHTML);if(this.placeholder){var n=new RegExp('<span class="placeholder[^>]+>'+this.placeholder+"</span>","i");return t.replace(n,"")}return t},e.prototype.insertText=function(e){this.getCurrentModeEditor().replaceSelection(e)},e.prototype.setSelection=function(e,t){this.getCurrentModeEditor().setSelection(e,t)},e.prototype.replaceSelection=function(e,t,n){this.getCurrentModeEditor().replaceSelection(e,t,n)},e.prototype.deleteSelection=function(e,t){this.getCurrentModeEditor().deleteSelection(e,t)},e.prototype.getSelectedText=function(e,t){return this.getCurrentModeEditor().getSelectedText(e,t)},e.prototype.getRangeInfoOfNode=function(e){return this.getCurrentModeEditor().getRangeInfoOfNode(e)},e.prototype.addWidget=function(e,t,n){this.getCurrentModeEditor().addWidget(e,t,n)},e.prototype.replaceWithWidget=function(e,t,n){this.getCurrentModeEditor().replaceWithWidget(e,t,n)},e.prototype.setHeight=function(e){var t=this.options.el;G(e)&&("auto"===e?me(t,"auto-height"):we(t,"auto-height"),this.setMinHeight(this.getMinHeight())),ne(t,{height:e}),this.height=e},e.prototype.getHeight=function(){return this.height},e.prototype.setMinHeight=function(e){if(e!==this.minHeight){var t=this.height||this.options.height;"auto"!==t&&this.options.el.querySelector("."+tn("main"))&&(e=Math.min(parseInt(e,10),parseInt(t,10)-75)+"px");var n=parseInt(e,10);this.minHeight=e,this.wwEditor.setMinHeight(n),this.mdEditor.setMinHeight(n),this.preview.setMinHeight(n)}},e.prototype.getMinHeight=function(){return this.minHeight},e.prototype.isMarkdownMode=function(){return"markdown"===this.mode},e.prototype.isWysiwygMode=function(){return"wysiwyg"===this.mode},e.prototype.isViewer=function(){return!1},e.prototype.getCurrentPreviewStyle=function(){return this.mdPreviewStyle},e.prototype.changeMode=function(e,t){if(this.mode!==e){if(this.mode=e,this.isWysiwygMode()){var n=this.toastMark.getRootNode(),r=this.convertor.toWysiwygModel(n);this.wwEditor.setModel(r)}else{r=this.wwEditor.getModel();this.mdEditor.setMarkdown(this.convertor.toMarkdownText(r),!t)}if(this.eventEmitter.emit("removePopupWidget"),this.eventEmitter.emit("changeMode",e),!t){var o=this.convertor.getMappedPos();this.focus(),this.isWysiwygMode()&&ke(o)?this.wwEditor.setSelection(o):Array.isArray(o)&&this.mdEditor.setSelection(o)}}},e.prototype.destroy=function(){var e=this;this.wwEditor.destroy(),this.mdEditor.destroy(),this.preview.destroy(),this.scrollSync.destroy(),this.eventEmitter.emit("destroy"),this.eventEmitter.getEvents().forEach((function(t,n){return e.off(n)}))},e.prototype.hide=function(){this.eventEmitter.emit("hide")},e.prototype.show=function(){this.eventEmitter.emit("show")},e.prototype.setScrollTop=function(e){this.getCurrentModeEditor().setScrollTop(e)},e.prototype.getScrollTop=function(){return this.getCurrentModeEditor().getScrollTop()},e.prototype.reset=function(){this.wwEditor.setModel([]),this.mdEditor.setMarkdown("")},e.prototype.getSelection=function(){return this.getCurrentModeEditor().getSelection()},e.prototype.setPlaceholder=function(e){this.placeholder=e,this.mdEditor.setPlaceholder(e),this.wwEditor.setPlaceholder(e)},e.prototype.getEditorElements=function(){return{mdEditor:this.mdEditor.getElement(),mdPreview:this.preview.getElement(),wwEditor:this.wwEditor.getElement()}},e.prototype.convertPosToMatchEditorMode=function(e,t,n){var r,o;void 0===t&&(t=e),void 0===n&&(n=this.mode);var i=this.mdEditor.view.state.doc,a=Array.isArray(e),s=Array.isArray(t),l=e,u=t;if(a!==s)throw new Error("Types of arguments must be same");return"markdown"!==n||a||s?"wysiwyg"===n&&a&&s&&(l=(o=On(i,e,t))[0],u=o[1]):(l=(r=Sn(i,e,t))[0],u=r[1]),[l,u]},e}();var Wd=function(e){return"boolean"==typeof e||e instanceof Boolean},Gd=function(){function e(e){this.current=e,this.root=e,this.entering=!0}return e.prototype.walk=function(){var e=this.entering,t=this.current;return t?(e?t.firstChild?(this.current=t.firstChild,this.entering=!0):this.entering=!1:t===this.root?this.current=null:t.next?(this.current=t.next,this.entering=!0):(this.current=t.parent,this.entering=!1),{vnode:t,entering:e}):null},e}(),Xd=function(){function e(e,t,n){this.parent=null,this.old=null,this.firstChild=null,this.next=null,this.skip=!1,this.type=e,this.props=t,this.children=n,this.props.children=n,t.ref&&(this.ref=t.ref,delete t.ref),t.key&&(this.key=t.key,delete t.key)}return e.prototype.walker=function(){return new Gd(this)},e.removalNodes=[],e}();function Zd(e,t){var n=e;Wd(e)||null==e?n=null:(G(e)||ke(e))&&(n=function(e){return new Xd("TEXT_NODE",{nodeValue:e},[])}(String(e))),n&&t.push(n)}var Qd=function(e){for(var t,n,r=arguments,o=1,i="",a="",s=[0],l=function(e){1===o&&(e||(i=i.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?s.push(e?r[e]:i):3===o&&(e||i)?(s[1]=e?r[e]:i,o=2):2===o&&"..."===i&&e?s[2]=et(s[2]||{},r[e]):2===o&&i&&!e?(s[2]=s[2]||{})[i]=!0:o>=5&&(5===o?((s[2]=s[2]||{})[n]=e?i?i+r[e]:r[e]:i,o=6):(e||i)&&(s[2][n]+=e?i+r[e]:i)),i=""},u=0;u<e.length;u++){u&&(1===o&&l(),l(u));for(let r=0;r<e[u].length;r++)t=e[u][r],1===o?"<"===t?(l(),s=[s,"",null],o=3):i+=t:4===o?"--"===i&&">"===t?(o=1,i=""):i=t+i[0]:a?t===a?a="":i+=t:'"'===t||"'"===t?a=t:">"===t?(l(),o=1):o&&("="===t?(o=5,n=i,i=""):"/"===t&&(o<5||">"===e[u][r+1])?(l(),3===o&&(s=s[0]),o=s,(s=s[0]).push(this.apply(null,o.slice(1))),o=0):" "===t||"\t"===t||"\n"===t||"\r"===t?(l(),o=2):i+=t),3===o&&"!--"===i&&(o=4,s=s[0])}return l(),s.length>2?s.slice(1):s[1]}.bind((function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var o=[];return n.forEach((function(e){Array.isArray(e)?e.forEach((function(e){Zd(e,o)})):Zd(e,o)})),new Xd(e,t||{},o)}));var Kd=function(e){return e===Object(e)};function Yd(e){var t;return"TEXT_NODE"===e.type?t=document.createTextNode(e.props.nodeValue):np(t=document.createElement(e.type),{},e.props),t}function Jd(e,t){e.node?t.removeChild(e.node):Jd(e.firstChild,t)}function ep(e,t,n){Object.keys(t).forEach((function(r){if(/^on/.test(r)){if(!n[r]||t[r]!==n[r]){var o=r.slice(2).toLowerCase();e.removeEventListener(o,t[r])}}else"children"===r||n[r]||function(e){return(null==e?void 0:e.nodeType)===Node.TEXT_NODE}(e)||e.removeAttribute(r)})),np(e,t,n,(function(e){return!Xe(t[e],n[e])}))}var tp=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i;function np(e,t,n,r){Object.keys(n).forEach((function(o){if(!r||r(o))if(/^on/.test(o)){var i=o.slice(2).toLowerCase();e.addEventListener(i,n[o])}else"nodeValue"===o?e[o]=n[o]:"style"===o&&Kd(n[o])?function(e,t,n){t&&Object.keys(t).forEach((function(t){e.style[t]=""}));Object.keys(n).forEach((function(t){var r=n[t];e.style[t]=ke(r)&&!tp.test(t)?r+"px":r}))}(e,t[o],n[o]):"children"!==o&&(!1===n[o]?e.removeAttribute(o):e.setAttribute(o,n[o]))}))}function rp(e){if(Xd.removalNodes.forEach((function(e){return ip(e)})),e)for(var t=void 0,n=e.walker();t=n.walk();)if(e=t.vnode,t.entering)ip(e);else if(xn(e.type)){var r=e.component;if(!e.old&&r.mounted&&r.mounted(),e.old&&r.updated){var o=r.prevProps||{};r.updated(o)}}}function op(e){for(var t=e.parent;!t.node;)t=t.parent;return t.node}function ip(e){if(e&&e.parent){if(e.node){var t=op(e);"A"===e.effect?t.appendChild(e.node):"U"===e.effect&&ep(e.node,e.old.props,e.props)}if("D"===e.effect)for(var n=void 0,r=e.walker();n=r.walk();)if(e=n.vnode,!n.entering)if(xn(e.type)){var o=e.component;o.beforeDestroy&&o.beforeDestroy()}else{Jd(e,t=op(e))}e.ref&&(e.component?e.ref(e.component):e.node&&e.ref(e.node))}}function ap(e,t){var n=t.props,r=t.component;return r?(r.prevProps=r.props,r.props=t.props,r):new e(n)}function sp(e){for(var t=e;e&&!e.skip;){if(xn(e.type)){var n=ap(e.type,e);n.vnode=e,e.component=n,e.props.children=e.children=[n.render()],lp(e)}else e.node||(e.node=Yd(e)),lp(e);if(e.firstChild)e=e.firstChild;else{for(;e&&e.parent&&!e.next&&(e=e.parent)!==t;);e=e.next}}}function lp(e){var t=e.children,n=e.old?e.old.firstChild:null,r=null;t.forEach((function(t,o){var i=function(e,t){return e&&t&&t.type===e.type&&(!t.key||t.key===e.key)}(n,t);i&&(t.old=n,t.parent=e,t.node=n.node,t.component=n.component,t.effect="U"),t&&!i&&(t.old=null,t.parent=e,t.node=null,t.effect="A"),n&&!i&&(Xd.removalNodes.push(n),n.effect="D"),n&&(n=n.next),0===o?e.firstChild=t:t&&(r.next=t),r=t}));var o=Ze(t);if(!t.length)for(;n;)Xd.removalNodes.push(n),n.effect="D",n=n.next;for(;n&&o;)n&&o.old!==n&&(Xd.removalNodes.push(n),n.effect="D",n=n.next)}function up(e,t){var n=new Xd(e.tagName.toLowerCase(),{},[t]);return n.node=e,Xd.removalNodes=[],sp(n),rp(n),function(){return function(e){e.effect="D",Xd.removalNodes=[e],rp(),Xd.removalNodes=[]}(n.firstChild)}}var cp,dp=function(){function e(e){this.props=e,this.state={},this.refs={}}return e.prototype.setState=function(e){var t=z(z({},this.state),e);Xe(this.state,t)||(this.state=t,function(e){var t=e.vnode;t.effect="U",t.old=t,t.next&&(t.next.skip=!0),Xd.removalNodes=[],sp(t),rp(t),t.next&&(t.next.skip=!1)}(this))},e}(),pp=function(e){function t(t){var n=e.call(this,t)||this;return n.state={hide:!1},n}return _(t,e),t.prototype.show=function(){this.setState({hide:!1})},t.prototype.hide=function(){this.setState({hide:!0})},t.prototype.render=function(){var e=this.props,t=e.editorType,n=e.eventEmitter;return Qd(cp||(cp=V(['\n <div class="','" style="display: ','">\n <div\n class="tab-item','"\n onClick=',"\n >\n ",'\n </div>\n <div\n class="tab-item','"\n onClick=',"\n >\n ","\n </div>\n </div>\n "],['\n <div class="','" style="display: ','">\n <div\n class="tab-item','"\n onClick=',"\n >\n ",'\n </div>\n <div\n class="tab-item','"\n onClick=',"\n >\n ","\n </div>\n </div>\n "])),tn("mode-switch"),this.state.hide?"none":"block","markdown"===t?" active":"",(function(){n.emit("needChangeMode","markdown")}),qu.get("Markdown"),"wysiwyg"===t?" active":"",(function(){n.emit("needChangeMode","wysiwyg")}),qu.get("WYSIWYG"))},t}(dp);var fp=function(e,t){var n,r;return t=t||0,function(){r=Array.prototype.slice.call(arguments),window.clearTimeout(n),n=window.setTimeout((function(){e.apply(null,r)}),t)}};var hp=function(e,t){var n,r,o,i,a=!0,s=function(t){e.apply(null,t),n=null};function l(){if(i=Array.prototype.slice.call(arguments),a)return s(i),void(a=!1);o=Number(new Date),n=n||o,r(i),o-n>=t&&s(i)}return r=fp(s,t=t||0),l.reset=function(){a=!0,n=null},l},mp=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,r){return e[0]===t&&(n=r,!0)})),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var o=r[n];e.call(t,o[1],o[0])}},t}()}(),vp="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,gp="undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),yp="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(gp):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)};var bp=["top","right","bottom","left","width","height","size","weight"],wp="undefined"!=typeof MutationObserver,kp=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,r=!1,o=0;function i(){n&&(n=!1,e()),r&&s()}function a(){yp(i)}function s(){var e=Date.now();if(n){if(e-o<2)return;r=!0}else n=!0,r=!1,setTimeout(a,t);o=e}return s}(this.refresh.bind(this),20)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){vp&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),wp?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){vp&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;bp.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),Cp=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var o=r[n];Object.defineProperty(e,o,{value:t[o],enumerable:!1,writable:!1,configurable:!0})}return e},xp=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||gp},Tp=Sp(0,0,0,0);function Ep(e){return parseFloat(e)||0}function Mp(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(t,n){return t+Ep(e["border-"+n+"-width"])}),0)}function Lp(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return Tp;var r=xp(e).getComputedStyle(e),o=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var o=r[n],i=e["padding-"+o];t[o]=Ep(i)}return t}(r),i=o.left+o.right,a=o.top+o.bottom,s=Ep(r.width),l=Ep(r.height);if("border-box"===r.boxSizing&&(Math.round(s+i)!==t&&(s-=Mp(r,"left","right")+i),Math.round(l+a)!==n&&(l-=Mp(r,"top","bottom")+a)),!function(e){return e===xp(e).document.documentElement}(e)){var u=Math.round(s+i)-t,c=Math.round(l+a)-n;1!==Math.abs(u)&&(s-=u),1!==Math.abs(c)&&(l-=c)}return Sp(o.left,o.top,s,l)}var Np="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof xp(e).SVGGraphicsElement}:function(e){return e instanceof xp(e).SVGElement&&"function"==typeof e.getBBox};function Ap(e){return vp?Np(e)?function(e){var t=e.getBBox();return Sp(0,0,t.width,t.height)}(e):Lp(e):Tp}function Sp(e,t,n,r){return{x:e,y:t,width:n,height:r}}var Dp=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Sp(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=Ap(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),Op=function(e,t){var n=function(e){var t=e.x,n=e.y,r=e.width,o=e.height,i="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,a=Object.create(i.prototype);return Cp(a,{x:t,y:n,width:r,height:o,top:n,right:t+r,bottom:o+n,left:t}),a}(t);Cp(this,{target:e,contentRect:n})},Ip=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new mp,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof xp(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new Dp(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof xp(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new Op(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),Rp="undefined"!=typeof WeakMap?new WeakMap:new mp,Pp=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=kp.getInstance(),r=new Ip(t,n,this);Rp.set(this,r)};["observe","unobserve","disconnect"].forEach((function(e){Pp.prototype[e]=function(){var t;return(t=Rp.get(this))[e].apply(t,arguments)}}));var Hp,Bp,Fp,jp,qp,_p,zp,Up,Vp,$p,Wp,Gp,Xp,Zp,Qp,Kp,Yp=void 0!==gp.ResizeObserver?gp.ResizeObserver:Pp,Jp=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _(t,e),t.prototype.execCommand=function(e){var t=un(e.target,"li");this.props.execCommand("heading",{level:Number(t.getAttribute("data-level"))})},t.prototype.render=function(){var e=this;return Qd(Bp||(Bp=V(["\n <ul\n onClick=",'\n aria-role="menu"\n aria-label="','"\n >\n ','\n <li data-type="Paragraph" aria-role="menuitem">\n <div>',"</div>\n </li>\n </ul>\n "],["\n <ul\n onClick=",'\n aria-role="menu"\n aria-label="','"\n >\n ','\n <li data-type="Paragraph" aria-role="menuitem">\n <div>',"</div>\n </li>\n </ul>\n "])),(function(t){return e.execCommand(t)}),qu.get("Headings"),[1,2,3,4,5,6].map((function(e){return Qd(Hp||(Hp=V(['\n <li data-level="','" data-type="Heading" aria-role="menuitem">\n <',">"," ","</$>\n </li>\n "],['\n <li data-level="','" data-type="Heading" aria-role="menuitem">\n <',">"," ","</$>\n </li>\n "])),e,"h"+e,qu.get("Heading"),e)})),qu.get("Paragraph"))},t}(dp),ef=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _(t,e),t.prototype.toggleTab=function(e,t){this.props.onClick(e,t)},t.prototype.render=function(){var e=this;return Qd(jp||(jp=V(['\n <div class="','" aria-role="tabpanel">\n ',"\n </div>\n "],['\n <div class="','" aria-role="tabpanel">\n ',"\n </div>\n "])),tn("tabs"),this.props.tabs.map((function(t){var n=t.name,r=t.text,o=e.props.activeTab===n;return Qd(Fp||(Fp=V(['\n <div\n class="tab-item','"\n onClick=','\n aria-role="tab"\n aria-label="','"\n aria-selected="','"\n tabindex="','"\n >\n ',"\n </div>\n "],['\n <div\n class="tab-item','"\n onClick=','\n aria-role="tab"\n aria-label="','"\n aria-selected="','"\n tabindex="','"\n >\n ',"\n </div>\n "])),o?" active":"",(function(t){return e.toggleTab(t,n)}),qu.get(r),o?"true":"false",o?"0":"-1",qu.get(r))})))},t}(dp),tf=function(e){function t(t){var n=e.call(this,t)||this;return n.initialize=function(e){void 0===e&&(e="file");var t=n.refs.url;t.value="",n.refs.altText.value="",n.refs.file.value="",we(t,"wrong"),n.setState({activeTab:e,file:null,fileNameElClassName:""})},n.execCommand=function(){"file"===n.state.activeTab?n.emitAddImageBlob():n.emitAddImage()},n.toggleTab=function(e,t){t!==n.state.activeTab&&n.initialize(t)},n.showFileSelectBox=function(){n.refs.file.click()},n.changeFile=function(e){var t=e.target.files;(null==t?void 0:t.length)&&n.setState({file:t[0]})},n.state={activeTab:"file",file:null,fileNameElClassName:""},n.tabs=[{name:"file",text:"File"},{name:"url",text:"URL"}],n}return _(t,e),t.prototype.emitAddImageBlob=function(){var e=this,t=this.refs.file.files,n=this.refs.altText,r=" wrong";if(null==t?void 0:t.length){r="";var o=t.item(0);this.props.eventEmitter.emit("addImageBlobHook",o,(function(t,r){return e.props.execCommand("addImage",{imageUrl:t,altText:r||n.value})}),"ui")}this.setState({fileNameElClassName:r})},t.prototype.emitAddImage=function(){var e=this.refs.url,t=this.refs.altText,n=e.value,r=t.value||"image";we(e,"wrong"),n.length?n&&this.props.execCommand("addImage",{imageUrl:n,altText:r}):me(e,"wrong")},t.prototype.preventSelectStart=function(e){e.preventDefault()},t.prototype.updated=function(){this.props.show||this.initialize()},t.prototype.render=function(){var e=this,t=this.state,n=t.activeTab,r=t.file,o=t.fileNameElClassName;return Qd(qp||(qp=V(['\n <div aria-label="','">\n <'," tabs="," activeTab="," onClick=",' />\n <div style="display:','">\n <label for="toastuiImageUrlInput">','</label>\n <input\n id="toastuiImageUrlInput"\n type="text"\n ref=','\n />\n </div>\n <div style="display:',';position: relative;">\n <label for="toastuiImageFileInput">','</label>\n <span\n class="',"",'"\n onClick=',"\n onSelectstart=","\n >\n ",'\n </span>\n <button\n type="button"\n class="','"\n onClick=',"\n >\n ",'\n </button>\n <input\n id="toastuiImageFileInput"\n type="file"\n accept="image/*"\n onChange=',"\n ref=",'\n />\n </div>\n <label for="toastuiAltTextInput">','</label>\n <input\n id="toastuiAltTextInput"\n type="text"\n ref=','\n />\n <div class="','">\n <button type="button" class="','" onClick=',">\n ",'\n </button>\n <button type="button" class="','" onClick=',">\n ","\n </button>\n </div>\n </div>\n "],['\n <div aria-label="','">\n <'," tabs="," activeTab="," onClick=",' />\n <div style="display:','">\n <label for="toastuiImageUrlInput">','</label>\n <input\n id="toastuiImageUrlInput"\n type="text"\n ref=','\n />\n </div>\n <div style="display:',';position: relative;">\n <label for="toastuiImageFileInput">','</label>\n <span\n class="',"",'"\n onClick=',"\n onSelectstart=","\n >\n ",'\n </span>\n <button\n type="button"\n class="','"\n onClick=',"\n >\n ",'\n </button>\n <input\n id="toastuiImageFileInput"\n type="file"\n accept="image/*"\n onChange=',"\n ref=",'\n />\n </div>\n <label for="toastuiAltTextInput">','</label>\n <input\n id="toastuiAltTextInput"\n type="text"\n ref=','\n />\n <div class="','">\n <button type="button" class="','" onClick=',">\n ",'\n </button>\n <button type="button" class="','" onClick=',">\n ","\n </button>\n </div>\n </div>\n "])),qu.get("Insert image"),ef,this.tabs,n,this.toggleTab,"url"===n?"block":"none",qu.get("Image URL"),(function(t){return e.refs.url=t}),"file"===n?"block":"none",qu.get("Select image file"),tn("file-name"),r?" has-file":o,this.showFileSelectBox,this.preventSelectStart,r?r.name:qu.get("No file"),tn("file-select-button"),this.showFileSelectBox,qu.get("Choose a file"),this.changeFile,(function(t){return e.refs.file=t}),qu.get("Description"),(function(t){return e.refs.altText=t}),tn("button-container"),tn("close-button"),this.props.hidePopup,qu.get("Cancel"),tn("ok-button"),this.execCommand,qu.get("OK"))},t}(dp),nf=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.execCommand=function(){var e=t.refs.url,n=t.refs.text;(we(e,"wrong"),we(n,"wrong"),e.value.length<1)?me(e,"wrong"):ie(t.props.initialValues.linkUrl)&&n.value.length<1?me(n,"wrong"):t.props.execCommand("addLink",{linkUrl:e.value,linkText:n.value})},t}return _(t,e),t.prototype.initialize=function(){var e=this.props.initialValues,t=e.linkUrl,n=e.linkText,r=this.refs.url,o=this.refs.text;we(r,"wrong"),we(o,"wrong","disabled"),o.removeAttribute("disabled"),t&&(me(o,"disabled"),o.setAttribute("disabled","disabled")),r.value=t||"",o.value=n||""},t.prototype.mounted=function(){this.initialize()},t.prototype.updated=function(e){!e.show&&this.props.show&&this.initialize()},t.prototype.render=function(){var e=this;return Qd(_p||(_p=V(['\n <div aria-label="','">\n <label for="toastuiLinkUrlInput">','</label>\n <input\n id="toastuiLinkUrlInput"\n type="text"\n ref=','\n />\n <label for="toastuiLinkTextInput">','</label>\n <input\n id="toastuiLinkTextInput"\n type="text"\n ref=','\n />\n <div class="','">\n <button type="button" class="','" onClick=',">\n ",'\n </button>\n <button type="button" class="','" onClick=',">\n ","\n </button>\n </div>\n </div>\n "],['\n <div aria-label="','">\n <label for="toastuiLinkUrlInput">','</label>\n <input\n id="toastuiLinkUrlInput"\n type="text"\n ref=','\n />\n <label for="toastuiLinkTextInput">','</label>\n <input\n id="toastuiLinkTextInput"\n type="text"\n ref=','\n />\n <div class="','">\n <button type="button" class="','" onClick=',">\n ",'\n </button>\n <button type="button" class="','" onClick=',">\n ","\n </button>\n </div>\n </div>\n "])),qu.get("Insert link"),qu.get("URL"),(function(t){return e.refs.url=t}),qu.get("Link text"),(function(t){return e.refs.text=t}),tn("button-container"),tn("close-button"),this.props.hidePopup,qu.get("Cancel"),tn("ok-button"),this.execCommand,qu.get("OK"))},t}(dp),rf=function(e){function t(t){var n=e.call(this,t)||this;return n.extendSelectionRange=function(e){var t=e.pageX,r=e.pageY,o=t-n.offsetRect.left,i=r-n.offsetRect.top,a=n.getSelectionRangeByOffset(o,i);n.setState(z({},a))},n.execCommand=function(){n.props.execCommand("addTable",{rowCount:n.state.rowIdx+1,columnCount:n.state.colIdx+1})},n.state={rowIdx:-1,colIdx:-1},n}return _(t,e),t.prototype.getDescription=function(){return-1===this.state.colIdx?"":this.state.colIdx+1+" x "+(this.state.rowIdx+1)},t.prototype.getBoundByRange=function(e,t){return{width:20*(e+1),height:20*(t+1)}},t.prototype.getRangeByOffset=function(e,t){return{colIdx:Math.floor(e/20),rowIdx:Math.floor(t/20)}},t.prototype.getTableRange=function(){var e=this.state,t=e.colIdx,n=e.rowIdx,r=Math.max(t,5),o=Math.max(n,5);return t>=5&&r<9&&(r+=1),n>=5&&o<14&&(o+=1),{colIdx:r+1,rowIdx:o+1}},t.prototype.getSelectionAreaBound=function(){var e=this.getBoundByRange(this.state.colIdx,this.state.rowIdx),t=e.width,n=e.height;return t||n?{width:t-1,height:n-1,display:"block"}:{display:"none"}},t.prototype.getSelectionRangeByOffset=function(e,t){var n=this.getRangeByOffset(e,t);return n.rowIdx=Math.min(Math.max(n.rowIdx,1),14),n.colIdx=Math.min(Math.max(n.colIdx,1),9),n},t.prototype.updated=function(){if(this.props.show){if(-1===this.state.colIdx&&-1===this.state.rowIdx){var e=this.refs.tableEl.getBoundingClientRect(),t=e.left,n=e.top;this.offsetRect={left:window.pageXOffset+t,top:window.pageYOffset+n}}}else this.setState({colIdx:-1,rowIdx:-1})},t.prototype.createTableArea=function(e){for(var t=e.colIdx,n=e.rowIdx,r=[],o=0;o<n;o+=1){for(var i=[],a=0;a<t;a+=1){var s=tn("table-cell")+(o>0?"":" header");i.push(Qd(zp||(zp=V(['<div class="','"></div>'],['<div class="','"></div>'])),s))}r.push(Qd(Up||(Up=V(['<div class="','">',"</div>"],['<div class="','">',"</div>"])),tn("table-row"),i))}return Qd(Vp||(Vp=V(['<div class="','">',"</div>"],['<div class="','">',"</div>"])),tn("table"),r)},t.prototype.render=function(){var e=this,t=this.getTableRange(),n=this.getSelectionAreaBound();return Qd($p||($p=V(['\n <div aria-label="','">\n <div\n class="','"\n ref=',"\n onMousemove=","\n onClick=","\n >\n ",'\n <div class="','" style=','></div>\n </div>\n <p class="','">',"</p>\n </div>\n "],['\n <div aria-label="','">\n <div\n class="','"\n ref=',"\n onMousemove=","\n onClick=","\n >\n ",'\n <div class="','" style=','></div>\n </div>\n <p class="','">',"</p>\n </div>\n "])),qu.get("Insert table"),tn("table-selection"),(function(t){return e.refs.tableEl=t}),this.extendSelectionRange,this.execCommand,this.createTableArea(t),tn("table-selection-layer"),n,tn("table-description"),this.getDescription())},t}(dp),of=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _(t,e),t.prototype.mounted=function(){this.refs.el.appendChild(this.props.body)},t.prototype.updated=function(e){this.refs.el.replaceChild(this.props.body,e.body)},t.prototype.render=function(){var e=this;return Qd(Wp||(Wp=V(["<div ref=","></div>"],["<div ref=","></div>"])),(function(t){return e.refs.el=t}))},t}(dp);function af(e){return G(e)?function(e){var t;switch(e){case"heading":t={name:"heading",className:"heading",tooltip:qu.get("Headings"),state:"heading"};break;case"bold":t={name:"bold",className:"bold",command:"bold",tooltip:qu.get("Bold"),state:"strong"};break;case"italic":t={name:"italic",className:"italic",command:"italic",tooltip:qu.get("Italic"),state:"emph"};break;case"strike":t={name:"strike",className:"strike",command:"strike",tooltip:qu.get("Strike"),state:"strike"};break;case"hr":t={name:"hr",className:"hrline",command:"hr",tooltip:qu.get("Line"),state:"thematicBreak"};break;case"quote":t={name:"quote",className:"quote",command:"blockQuote",tooltip:qu.get("Blockquote"),state:"blockQuote"};break;case"ul":t={name:"ul",className:"bullet-list",command:"bulletList",tooltip:qu.get("Unordered list"),state:"bulletList"};break;case"ol":t={name:"ol",className:"ordered-list",command:"orderedList",tooltip:qu.get("Ordered list"),state:"orderedList"};break;case"task":t={name:"task",className:"task-list",command:"taskList",tooltip:qu.get("Task"),state:"taskList"};break;case"table":t={name:"table",className:"table",tooltip:qu.get("Insert table"),state:"table"};break;case"image":t={name:"image",className:"image",tooltip:qu.get("Insert image")};break;case"link":t={name:"link",className:"link",tooltip:qu.get("Insert link")};break;case"code":t={name:"code",className:"code",command:"code",tooltip:qu.get("Code"),state:"code"};break;case"codeblock":t={name:"codeblock",className:"codeblock",command:"codeBlock",tooltip:qu.get("Insert CodeBlock"),state:"codeBlock"};break;case"indent":t={name:"indent",className:"indent",command:"indent",tooltip:qu.get("Indent"),state:"indent"};break;case"outdent":t={name:"outdent",className:"outdent",command:"outdent",tooltip:qu.get("Outdent"),state:"outdent"};break;case"scrollSync":t=function(){var e=document.createElement("label"),t=document.createElement("input"),n=document.createElement("span");e.className="scroll-sync active",t.type="checkbox",t.checked=!0,n.className="switch";var r=function(n){return t.addEventListener("change",(function(t){var r=t.target.checked;r?me(e,"active"):we(e,"active"),n("toggleScrollSync",{active:r})}))};return e.appendChild(t),e.appendChild(n),{name:"scrollSync",el:e,onMounted:r}}();break;case"more":t={name:"more",className:"more",tooltip:qu.get("More")}}"scrollSync"!==t.name&&(t.className+=" "+tn("toolbar-icons"));return t}(e):e}function sf(e,t){var n=t.el,r=t.pos,o=t.popup,i=t.initialValues;switch(e){case"heading":return{render:function(e){return Qd(Gp||(Gp=V(["<"," ..."," />"],["<"," ..."," />"])),Jp,e)},className:tn("popup-add-heading"),fromEl:n,pos:r};case"link":return{render:function(e){return Qd(Xp||(Xp=V(["<"," ..."," />"],["<"," ..."," />"])),nf,e)},className:tn("popup-add-link"),fromEl:n,pos:r,initialValues:i};case"image":return{render:function(e){return Qd(Zp||(Zp=V(["<"," ..."," />"],["<"," ..."," />"])),tf,e)},className:tn("popup-add-image"),fromEl:n,pos:r};case"table":return{render:function(e){return Qd(Qp||(Qp=V(["<"," ..."," />"],["<"," ..."," />"])),rf,e)},className:tn("popup-add-table"),fromEl:n,pos:r};case"customPopupBody":return o?z({render:function(e){return Qd(Kp||(Kp=V(["<"," ..."," body="," />"],["<"," ..."," body="," />"])),of,e,o.body)},fromEl:n,pos:r},o):null;default:return null}}function lf(e){e.hidden=e.length===e.filter((function(e){return e.hidden})).length}function uf(e,t){return e.reduce((function(e,n){e.push(n.map((function(e){return function(e){return e.hidden="scrollSync"===e.name&&t,e}(af(e))})));var r=e[(e.length||1)-1];return r&&lf(r),e}),[])}var cf,df,pf=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleMousedown=function(e){un(e.target,"."+tn("popup"))||un(e.target,t.props.info.fromEl)||t.props.hidePopup()},t}return _(t,e),t.prototype.mounted=function(){document.addEventListener("mousedown",this.handleMousedown),this.props.eventEmitter.listen("closePopup",this.props.hidePopup)},t.prototype.beforeDestroy=function(){document.removeEventListener("mousedown",this.handleMousedown)},t.prototype.updated=function(e){var t=this.props,n=t.show,r=t.info;if(n&&r.pos&&e.show!==n){var o=z({},r.pos),i=this.refs.el.offsetWidth,a=un(this.refs.el,"."+tn("toolbar")).offsetWidth;o.left+i>=a&&(o.left=a-i-20),Xe(this.state.popupPos,o)||this.setState({popupPos:o})}},t.prototype.render=function(){var e=this,t=this.props,n=t.info,r=t.show,o=t.hidePopup,i=t.eventEmitter,a=t.execCommand,s=n||{},l=s.className,u=void 0===l?"":l,c=s.style,d=s.render,p=s.initialValues,f=void 0===p?{}:p,h=z(z({display:r?"block":"none"},c),this.state.popupPos);return Qd(cf||(cf=V(['\n <div\n class="'," ",'"\n style=',"\n ref=",'\n aria-role="dialog"\n >\n <div class="','">\n ',"\n </div>\n </div>\n "],['\n <div\n class="'," ",'"\n style=',"\n ref=",'\n aria-role="dialog"\n >\n <div class="','">\n ',"\n </div>\n </div>\n "])),tn("popup"),u,h,(function(t){return e.refs.el=t}),tn("popup-body"),d&&d({eventEmitter:i,show:r,hidePopup:o,execCommand:a,initialValues:f}))},t}(dp);function ff(e){return function(t){function n(e){var n=t.call(this,e)||this;return n.showTooltip=function(e){var t=n.props.item.tooltip;if(!n.props.disabled&&t){var r=n.getBound(e),o=r.left+6+"px",i=r.top+6+"px";ne(n.props.tooltipRef.current,{display:"block",left:o,top:i}),n.props.tooltipRef.current.querySelector(".text").textContent=t}},n.hideTooltip=function(){ne(n.props.tooltipRef.current,"display","none")},n.state={active:!1,disabled:e.disabled},n.addEvent(),n}return _(n,t),n.prototype.addEvent=function(){var e=this,t=this.props,n=t.item,r=t.eventEmitter;n.state&&r.listen("changeToolbarState",(function(t){var r,o=null!==(r=t.toolbarState[n.state])&&void 0!==r?r:{},i=o.active,a=o.disabled;e.setState({active:!!i,disabled:null!=a?a:e.props.disabled})}))},n.prototype.getBound=function(e){var t=cn(e,un(e,"."+tn("toolbar"))),n=t.offsetLeft,r=t.offsetTop;return{left:n,top:e.offsetHeight+r}},n.prototype.render=function(){return Qd(df||(df=V(["\n <","\n ...","\n active=","\n showTooltip=","\n hideTooltip=","\n getBound=","\n disabled=","\n />\n "],["\n <","\n ...","\n active=","\n showTooltip=","\n hideTooltip=","\n getBound=","\n disabled=","\n />\n "])),e,this.props,this.state.active,this.showTooltip,this.hideTooltip,this.getBound,this.state.disabled||this.props.disabled)},n}(dp)}var hf,mf,vf,gf,yf,bf,wf,kf,Cf,xf,Tf,Ef,Mf,Lf,Nf=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.showTooltip=function(){t.props.showTooltip(t.refs.el)},t.execCommand=function(){var e=t.props,n=e.item,r=e.execCommand,o=e.setPopupInfo,i=e.getBound,a=e.eventEmitter,s=n.command,l=n.name,u=n.popup;if(s)r(s);else{var c=u?"customPopupBody":l,d=a.emit("query","getPopupInitialValues",{popupName:c})[0],p=sf(c,{el:t.refs.el,pos:i(t.refs.el),popup:u,initialValues:d});p&&o(p)}},t}return _(t,e),t.prototype.mounted=function(){this.setItemWidth()},t.prototype.updated=function(e){e.item.name!==this.props.item.name&&this.setItemWidth()},t.prototype.setItemWidth=function(){var e=this.props,t=e.setItemWidth,n=e.item;t&&t(n.name,ln(this.refs.el)+(n.hidden?80:0))},t.prototype.render=function(){var e=this,t=this.props,n=t.hideTooltip,r=t.disabled,o=t.item,i=t.active,a=z({display:o.hidden?"none":null},o.style),s=(o.className||"")+(i?" active":"");return Qd(hf||(hf=V(["\n <button\n ref=",'\n type="button"\n style=',"\n class=","\n onClick=","\n onMouseover=","\n onMouseout=","\n disabled=","\n aria-label=","\n >\n ","\n </button>\n "],["\n <button\n ref=",'\n type="button"\n style=',"\n class=","\n onClick=","\n onMouseover=","\n onMouseout=","\n disabled=","\n aria-label=","\n >\n ","\n </button>\n "])),(function(t){return e.refs.el=t}),a,s,this.execCommand,this.showTooltip,n,!!r,o.text||o.tooltip||"",o.text||"")},t}(dp),Af=ff(Nf),Sf=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.showTooltip=function(){t.props.showTooltip(t.refs.el)},t.showPopup=function(){var e=sf("customPopupBody",{el:t.refs.el,pos:t.props.getBound(t.refs.el),popup:t.props.item.popup});e&&t.props.setPopupInfo(e)},t}return _(t,e),t.prototype.mounted=function(){var e=this.props,t=e.setItemWidth,n=e.item;this.refs.el.appendChild(n.el),t&&t(n.name,ln(this.refs.el)),n.onMounted&&n.onMounted(this.props.execCommand)},t.prototype.updated=function(e){var t,n=this.props,r=n.item,o=n.active,i=n.disabled;e.active===o&&e.disabled===i||null===(t=r.onUpdated)||void 0===t||t.call(r,{active:o,disabled:i})},t.prototype.render=function(){var e=this,t=this.props,n=t.disabled,r={display:t.item.hidden?"none":"inline-block"},o=function(e){return n?null:e};return Qd(mf||(mf=V(["\n <div\n ref=","\n style=","\n class=","\n onClick=","\n onMouseover=","\n onMouseout=","\n ></div>\n "],["\n <div\n ref=","\n style=","\n class=","\n onClick=","\n onMouseover=","\n onMouseout=","\n ></div>\n "])),(function(t){return e.refs.el=t}),r,tn("toolbar-item-wrapper"),o(this.showPopup),o(this.showTooltip),o(this.props.hideTooltip))},t}(dp),Df=ff(Sf),Of=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.group,r=t.hiddenDivider,o=n.hidden?{display:"none"}:null,i=r?{display:"none"}:null;return Qd(gf||(gf=V(['\n <div class="','" style=',">\n ",'\n <div class="','" style=',"></div>\n </div>\n "],['\n <div class="','" style=',">\n ",'\n <div class="','" style=',"></div>\n </div>\n "])),tn("toolbar-group"),o,n.map((function(t){var n=t.el?Df:Af;return Qd(vf||(vf=V(["<"," key="," ..."," item="," />"],["<"," key="," ..."," item="," />"])),n,t.name,e.props,t)})),tn("toolbar-divider"),i)},t}(dp),If=function(e){function t(t){var n=e.call(this,t)||this;return n.handleClickDocument=function(e){var t=e.target;un(t,"."+tn("dropdown-toolbar"))||un(t,".more")||n.setState({showDropdown:!1,dropdownPos:null})},n.showTooltip=function(){n.props.showTooltip(n.refs.el)},n.state={showDropdown:!1,dropdownPos:null},n}return _(t,e),t.prototype.getBound=function(){var e=this.props.getBound(this.refs.el);return e.top+=4,z(z({},e),{left:null,right:10})},t.prototype.mounted=function(){document.addEventListener("click",this.handleClickDocument)},t.prototype.updated=function(){this.state.showDropdown&&!this.state.dropdownPos&&this.setState({dropdownPos:this.getBound()})},t.prototype.beforeDestroy=function(){document.removeEventListener("click",this.handleClickDocument)},t.prototype.render=function(){var e=this,t=this.state,n=t.showDropdown,r=t.dropdownPos,o=this.props,i=o.disabled,a=o.item,s=o.items,l=o.hideTooltip,u=s.filter((function(e){return!e.hidden})),c=u.length?null:{display:"none"},d=n?null:{display:"none"};return Qd(bf||(bf=V(['\n <div class="','" style=',">\n <button\n ref=",'\n type="button"\n class=',"\n onClick=","\n onMouseover=","\n onMouseout=","\n disabled=",'\n ></button>\n <div\n class="','"\n style=',"\n ref=","\n >\n ","\n </div>\n </div>\n "],['\n <div class="','" style=',">\n <button\n ref=",'\n type="button"\n class=',"\n onClick=","\n onMouseover=","\n onMouseout=","\n disabled=",'\n ></button>\n <div\n class="','"\n style=',"\n ref=","\n >\n ","\n </div>\n </div>\n "])),tn("toolbar-group"),c,(function(t){return e.refs.el=t}),a.className,(function(){return e.setState({showDropdown:!0})}),this.showTooltip,l,i,tn("dropdown-toolbar"),z(z({},d),r),(function(t){return e.refs.dropdownEl=t}),u.length?u.map((function(t,n){var r;return Qd(yf||(yf=V(["\n <","\n group=","\n hiddenDivider=","\n ...","\n />\n "],["\n <","\n group=","\n hiddenDivider=","\n ...","\n />\n "])),Of,t,n===u.length-1||(null===(r=u[n+1])||void 0===r?void 0:r.hidden),e.props)})):null)},t}(dp),Rf=ff(If),Pf=function(e){function t(t){var n=e.call(this,t)||this;return n.toggleTab=function(e,t){var r=n.props.eventEmitter;if(n.state.activeTab!==t){var o="write"===t?"changePreviewTabWrite":"changePreviewTabPreview";r.emit(o),n.setState({activeTab:t})}},n.setItemWidth=function(e,t){n.itemWidthMap[e]=t},n.setPopupInfo=function(e){n.setState({showPopup:!0,popupInfo:e})},n.openPopup=function(e,t){void 0===t&&(t={});var r=n.refs.el.querySelector("."+tn("toolbar-group")+" ."+e);if(r){var o=cn(r,un(r,"."+tn("toolbar"))),i=o.offsetLeft,a=o.offsetTop,s=sf(e,{el:r,pos:{left:i,top:r.offsetHeight+a},initialValues:t});s&&n.setPopupInfo(s)}},n.hidePopup=function(){n.state.showPopup&&n.setState({showPopup:!1})},n.execCommand=function(e,t){n.props.eventEmitter.emit("command",e,t),n.hidePopup()},n.tabs=[{name:"write",text:"Write"},{name:"preview",text:"Preview"}],n.itemWidthMap={},n.initialItems=uf(t.toolbarItems||[],n.hiddenScrollSync()),n.state={items:n.initialItems,dropdownItems:[],showPopup:!1,popupInfo:{},activeTab:"write"},n.tooltipRef={current:null},n.resizeObserver=new Yp((function(){return n.handleResize()})),n.addEvent(),n}return _(t,e),t.prototype.insertToolbarItem=function(e,t){var n=e.groupIndex,r=e.itemIndex,o=this.initialItems[n];t=af(t),o?o.splice(r,0,t):this.initialItems.push([t]),this.setState(this.classifyToolbarItems())},t.prototype.removeToolbarItem=function(e){var t=this;Z(this.initialItems,(function(n){var r=!1;return Z(n,(function(o,i){return o.name!==e||(r=!0,n.splice(i,1),t.setState(t.classifyToolbarItems()),!1)})),!r}))},t.prototype.addEvent=function(){var e=this,t=this.props.eventEmitter;this.handleResize=hp((function(){e.setState({items:e.initialItems,dropdownItems:[]}),e.setState(e.classifyToolbarItems())}),200),t.listen("openPopup",this.openPopup)},t.prototype.appendTooltipToRoot=function(){var e='<div class="'+tn("tooltip")+'" style="display:none">\n <div class="arrow"></div>\n <span class="text"></span>\n </div>';this.tooltipRef.current=sn(e,this.refs.el)},t.prototype.hiddenScrollSync=function(){return"wysiwyg"===this.props.editorType||"tab"===this.props.previewStyle},t.prototype.movePrevItemToDropdownToolbar=function(e,t,n,r){var o=function(e){var t=e.pop();t&&r.push(t)};if(e>1)o(n);else{var i=Ze(t);i&&o(i)}},t.prototype.classifyToolbarItems=function(){var e=this,t=0,n=this.refs.el.clientWidth,r=this.refs.el.querySelector("."+tn("toolbar-divider")),o=r?ln(r):0,i=[],a=[],s=!1;return this.initialItems.forEach((function(r,l){var u=[],c=[];r.forEach((function(r,o){r.hidden||((t+=e.itemWidthMap[r.name])>n-50?(s||(e.movePrevItemToDropdownToolbar(o,i,u,c),s=!0),c.push(r)):u.push(r))})),u.length&&(lf(u),i.push(u)),c.length&&(lf(c),a.push(c)),l<e.state.items.length-1&&(t+=o)})),{items:i,dropdownItems:a}},t.prototype.mounted=function(){"tab"===this.props.previewStyle&&this.props.eventEmitter.emit("changePreviewTabWrite",!0),this.setState(this.classifyToolbarItems()),this.appendTooltipToRoot(),this.resizeObserver.observe(this.refs.el)},t.prototype.updated=function(e){var t,n,r=this.props,o=r.editorType,i=r.previewStyle,a=r.eventEmitter,s=i!==e.previewStyle,l=o!==e.editorType;if(s||l){t=this.initialItems,n=this.hiddenScrollSync(),t.forEach((function(e){e.forEach((function(e){return e.hidden="scrollSync"===e.name&&n})),lf(e)}));var u=this.classifyToolbarItems();(s||"tab"===i&&"markdown"===o)&&(a.emit("changePreviewTabWrite"),u.activeTab="write"),this.setState(u)}},t.prototype.beforeDestroy=function(){window.removeEventListener("resize",this.handleResize),this.resizeObserver.disconnect(),on(this.tooltipRef.current)},t.prototype.render=function(){var e=this,t=this.props,n=t.previewStyle,r=t.eventEmitter,o=t.editorType,i=this.state,a=i.popupInfo,s=i.showPopup,l=i.activeTab,u=i.items,c=i.dropdownItems,d={eventEmitter:r,tooltipRef:this.tooltipRef,disabled:"markdown"===o&&"tab"===n&&"preview"===l,execCommand:this.execCommand,setPopupInfo:this.setPopupInfo},p="tab"===n?{borderTopLeftRadius:0}:null;return Qd(kf||(kf=V(['\n <div class="','">\n <div\n class="','"\n style="display: ','"\n >\n <'," tabs="," activeTab="," onClick=",' />\n </div>\n <div\n class="','"\n ref=',"\n style=","\n >\n ","\n <","\n item=","\n items=","\n ...","\n />\n </div>\n <","\n info=","\n show=","\n eventEmitter=","\n hidePopup=","\n execCommand=","\n />\n </div>\n "],['\n <div class="','">\n <div\n class="','"\n style="display: ','"\n >\n <'," tabs="," activeTab="," onClick=",' />\n </div>\n <div\n class="','"\n ref=',"\n style=","\n >\n ","\n <","\n item=","\n items=","\n ...","\n />\n </div>\n <","\n info=","\n show=","\n eventEmitter=","\n hidePopup=","\n execCommand=","\n />\n </div>\n "])),tn("toolbar"),tn("md-tab-container"),"wysiwyg"===o||"vertical"===n?"none":"block",ef,this.tabs,l,this.toggleTab,tn("defaultUI-toolbar"),(function(t){return e.refs.el=t}),p,u.map((function(t,n){var r;return Qd(wf||(wf=V(["\n <","\n group=","\n hiddenDivider=","\n setItemWidth=","\n ...","\n />\n "],["\n <","\n group=","\n hiddenDivider=","\n setItemWidth=","\n ...","\n />\n "])),Of,t,n===u.length-1||(null===(r=u[n+1])||void 0===r?void 0:r.hidden),e.setItemWidth,d)})),Rf,af("more"),c,d,pf,a,s,r,this.hidePopup,this.execCommand)},t}(dp),Hf=function(e){function t(t){var n=e.call(this,t)||this;return n.handleClickDocument=function(e){un(e.target,"."+tn("context-menu"))||n.setState({pos:null})},n.state={pos:null,menuGroups:[]},n.addEvent(),n}return _(t,e),t.prototype.addEvent=function(){var e=this;this.props.eventEmitter.listen("contextmenu",(function(t){var n=t.pos,r=t.menuGroups;e.setState({pos:n,menuGroups:r})}))},t.prototype.mounted=function(){document.addEventListener("click",this.handleClickDocument)},t.prototype.beforeDestroy=function(){document.removeEventListener("click",this.handleClickDocument)},t.prototype.getMenuGroupElements=function(){var e=this,t=this.state,n=t.pos,r=t.menuGroups;return n?r.reduce((function(t,n){var r=[];return n.forEach((function(t){var n=t.label,o=t.className,i=void 0!==o&&o,a=t.disabled,s=t.onClick;r.push(Qd(Cf||(Cf=V(["\n <li\n onClick=",'\n class="menu-item','"\n aria-role="menuitem"\n >\n <span class="','">',"</span>\n </li>\n "],["\n <li\n onClick=",'\n class="menu-item','"\n aria-role="menuitem"\n >\n <span class="','">',"</span>\n </li>\n "])),(function(){a||(s(),e.setState({pos:null}))}),a?" disabled":"",i,n))})),t.push(Qd(xf||(xf=V(['<ul class="menu-group">\n ',"\n </ul>"],['<ul class="menu-group">\n ',"\n </ul>"])),r)),t}),[]):[]},t.prototype.render=function(){var e=z({display:this.state.pos?"block":"none"},this.state.pos);return Qd(Tf||(Tf=V(['<div class="','" style=',' aria-role="menu">\n ',"\n </div>"],['<div class="','" style=',' aria-role="menu">\n ',"\n </div>"])),tn("context-menu"),e,this.getMenuGroupElements())},t}(dp),Bf=function(e){function t(t){var n=e.call(this,t)||this;n.changeMode=function(e){e!==n.state.editorType&&n.setState({editorType:e})},n.changePreviewStyle=function(e){e!==n.state.previewStyle&&n.setState({previewStyle:e})},n.hide=function(){n.setState({hide:!0})},n.show=function(){n.setState({hide:!1})};var r=t.editorType,o=t.previewStyle;return n.state={editorType:r,previewStyle:o,hide:!1},n.addEvent(),n}return _(t,e),t.prototype.mounted=function(){var e=this.props.slots,t=e.wwEditor,n=e.mdEditor,r=e.mdPreview;this.refs.wwContainer.appendChild(t),this.refs.mdContainer.insertAdjacentElement("afterbegin",n),this.refs.mdContainer.appendChild(r)},t.prototype.insertToolbarItem=function(e,t){this.toolbar.insertToolbarItem(e,t)},t.prototype.removeToolbarItem=function(e){this.toolbar.removeToolbarItem(e)},t.prototype.render=function(){var e=this,t=this.props,n=t.eventEmitter,r=t.hideModeSwitch,o=t.toolbarItems,i=t.theme,a=this.state,s=a.hide,l=a.previewStyle,u=a.editorType,c=s?" hidden":"",d=tn("markdown"===u?"md-mode":"ww-mode"),p=tn("md")+"-"+l+"-style",f=tn(["light"!==i,i+" "]);return Qd(Mf||(Mf=V(['\n <div\n class="',"","",'"\n ref=',"\n >\n <","\n ref=","\n eventEmitter=","\n previewStyle=","\n toolbarItems=","\n editorType=",'\n />\n <div\n class="'," ",'"\n ref=','\n >\n <div class="','">\n <div\n class="'," ",'"\n ref=','\n >\n <div class="','"></div>\n </div>\n <div\n class="','"\n ref=',"\n />\n </div>\n </div>\n ","\n <"," eventEmitter="," />\n </div>\n "],['\n <div\n class="',"","",'"\n ref=',"\n >\n <","\n ref=","\n eventEmitter=","\n previewStyle=","\n toolbarItems=","\n editorType=",'\n />\n <div\n class="'," ",'"\n ref=','\n >\n <div class="','">\n <div\n class="'," ",'"\n ref=','\n >\n <div class="','"></div>\n </div>\n <div\n class="','"\n ref=',"\n />\n </div>\n </div>\n ","\n <"," eventEmitter="," />\n </div>\n "])),f,tn("defaultUI"),c,(function(t){return e.refs.el=t}),Pf,(function(t){return e.toolbar=t}),n,l,o,u,tn("main"),d,(function(t){return e.refs.editorSection=t}),tn("main-container"),tn("md-container"),p,(function(t){return e.refs.mdContainer=t}),tn("md-splitter"),tn("ww-container"),(function(t){return e.refs.wwContainer=t}),!r&&Qd(Ef||(Ef=V(["<"," eventEmitter="," editorType="," />"],["<"," eventEmitter="," editorType="," />"])),pp,n,u),Hf,n)},t.prototype.addEvent=function(){var e=this.props.eventEmitter;e.listen("hide",this.hide),e.listen("show",this.show),e.listen("changeMode",this.changeMode),e.listen("changePreviewStyle",this.changePreviewStyle)},t}(dp),Ff=function(e){function t(t){var n,r,o=e.call(this,t)||this,i=up(o.options.el,Qd(Lf||(Lf=V(["\n <","\n ref=","\n eventEmitter=","\n slots=","\n hideModeSwitch=","\n toolbarItems=","\n previewStyle=","\n editorType=","\n theme=","\n />\n "],["\n <","\n ref=","\n eventEmitter=","\n slots=","\n hideModeSwitch=","\n toolbarItems=","\n previewStyle=","\n editorType=","\n theme=","\n />\n "])),Bf,(function(e){return r=e}),o.eventEmitter,o.getEditorElements(),o.options.hideModeSwitch,o.options.toolbarItems,o.options.previewStyle,o.options.initialEditType,o.options.theme));return o.setMinHeight(o.options.minHeight),o.setHeight(o.options.height),o.defaultUI={insertToolbarItem:r.insertToolbarItem.bind(r),removeToolbarItem:r.removeToolbarItem.bind(r),destroy:i},null===(n=o.pluginInfo.toolbarItems)||void 0===n||n.forEach((function(e){var t=e.groupIndex,n=e.itemIndex,r=e.item;o.defaultUI.insertToolbarItem({groupIndex:t,itemIndex:n},r)})),o.eventEmitter.emit("loadUI",o),o}return _(t,e),t.factory=function(e){return e.viewer?new Rd(e):new t(e)},t.prototype.insertToolbarItem=function(e,t){this.defaultUI.insertToolbarItem(e,t)},t.prototype.removeToolbarItem=function(e){this.defaultUI.removeToolbarItem(e)},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.defaultUI.destroy()},t}($d);$d.setLanguage(["en","en-US"],{Markdown:"Markdown",WYSIWYG:"WYSIWYG",Write:"Write",Preview:"Preview",Headings:"Headings",Paragraph:"Paragraph",Bold:"Bold",Italic:"Italic",Strike:"Strike",Code:"Inline code",Line:"Line",Blockquote:"Blockquote","Unordered list":"Unordered list","Ordered list":"Ordered list",Task:"Task",Indent:"Indent",Outdent:"Outdent","Insert link":"Insert link","Insert CodeBlock":"Insert codeBlock","Insert table":"Insert table","Insert image":"Insert image",Heading:"Heading","Image URL":"Image URL","Select image file":"Select image file","Choose a file":"Choose a file","No file":"No file",Description:"Description",OK:"OK",More:"More",Cancel:"Cancel",File:"File",URL:"URL","Link text":"Link text","Add row to up":"Add row to up","Add row to down":"Add row to down","Add column to left":"Add column to left","Add column to right":"Add column to right","Remove row":"Remove row","Remove column":"Remove column","Align column to left":"Align column to left","Align column to center":"Align column to center","Align column to right":"Align column to right","Remove table":"Remove table","Would you like to paste as table?":"Would you like to paste as table?","Text color":"Text color","Auto scroll enabled":"Auto scroll enabled","Auto scroll disabled":"Auto scroll disabled","Choose language":"Choose language"});export{Ff as Editor,$d as EditorCore,Ff as default};
|
37
|
-
//# sourceMappingURL=index.mjs.map
|