@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 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../node_modules/prosemirror-view/dist/index.cjs"],"sourcesContent":["'use strict';\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _iterableToArrayLimit(r, l) { var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it[\"return\"] != null) it[\"return\"](); } finally { if (didErr) throw err; } } }; }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar prosemirrorState = require('prosemirror-state');\nvar prosemirrorModel = require('prosemirror-model');\nvar prosemirrorTransform = require('prosemirror-transform');\nvar domIndex = function domIndex(node) {\n for (var index = 0;; index++) {\n node = node.previousSibling;\n if (!node) return index;\n }\n};\nvar parentNode = function parentNode(node) {\n var parent = node.assignedSlot || node.parentNode;\n return parent && parent.nodeType == 11 ? parent.host : parent;\n};\nvar reusedRange = null;\nvar textRange = function textRange(node, from, to) {\n var range = reusedRange || (reusedRange = document.createRange());\n range.setEnd(node, to == null ? node.nodeValue.length : to);\n range.setStart(node, from || 0);\n return range;\n};\nvar clearReusedRange = function clearReusedRange() {\n reusedRange = null;\n};\nvar isEquivalentPosition = function isEquivalentPosition(node, off, targetNode, targetOff) {\n return targetNode && (scanFor(node, off, targetNode, targetOff, -1) || scanFor(node, off, targetNode, targetOff, 1));\n};\nvar atomElements = /^(img|br|input|textarea|hr)$/i;\nfunction scanFor(node, off, targetNode, targetOff, dir) {\n for (;;) {\n if (node == targetNode && off == targetOff) return true;\n if (off == (dir < 0 ? 0 : nodeSize(node))) {\n var parent = node.parentNode;\n if (!parent || parent.nodeType != 1 || hasBlockDesc(node) || atomElements.test(node.nodeName) || node.contentEditable == \"false\") return false;\n off = domIndex(node) + (dir < 0 ? 0 : 1);\n node = parent;\n } else if (node.nodeType == 1) {\n node = node.childNodes[off + (dir < 0 ? -1 : 0)];\n if (node.contentEditable == \"false\") return false;\n off = dir < 0 ? nodeSize(node) : 0;\n } else {\n return false;\n }\n }\n}\nfunction nodeSize(node) {\n return node.nodeType == 3 ? node.nodeValue.length : node.childNodes.length;\n}\nfunction textNodeBefore$1(node, offset) {\n for (;;) {\n if (node.nodeType == 3 && offset) return node;\n if (node.nodeType == 1 && offset > 0) {\n if (node.contentEditable == \"false\") return null;\n node = node.childNodes[offset - 1];\n offset = nodeSize(node);\n } else if (node.parentNode && !hasBlockDesc(node)) {\n offset = domIndex(node);\n node = node.parentNode;\n } else {\n return null;\n }\n }\n}\nfunction textNodeAfter$1(node, offset) {\n for (;;) {\n if (node.nodeType == 3 && offset < node.nodeValue.length) return node;\n if (node.nodeType == 1 && offset < node.childNodes.length) {\n if (node.contentEditable == \"false\") return null;\n node = node.childNodes[offset];\n offset = 0;\n } else if (node.parentNode && !hasBlockDesc(node)) {\n offset = domIndex(node) + 1;\n node = node.parentNode;\n } else {\n return null;\n }\n }\n}\nfunction isOnEdge(node, offset, parent) {\n for (var atStart = offset == 0, atEnd = offset == nodeSize(node); atStart || atEnd;) {\n if (node == parent) return true;\n var index = domIndex(node);\n node = node.parentNode;\n if (!node) return false;\n atStart = atStart && index == 0;\n atEnd = atEnd && index == nodeSize(node);\n }\n}\nfunction hasBlockDesc(dom) {\n var desc;\n for (var cur = dom; cur; cur = cur.parentNode) if (desc = cur.pmViewDesc) break;\n return desc && desc.node && desc.node.isBlock && (desc.dom == dom || desc.contentDOM == dom);\n}\nvar selectionCollapsed = function selectionCollapsed(domSel) {\n return domSel.focusNode && isEquivalentPosition(domSel.focusNode, domSel.focusOffset, domSel.anchorNode, domSel.anchorOffset);\n};\nfunction keyEvent(keyCode, key) {\n var event = document.createEvent(\"Event\");\n event.initEvent(\"keydown\", true, true);\n event.keyCode = keyCode;\n event.key = event.code = key;\n return event;\n}\nfunction deepActiveElement(doc) {\n var elt = doc.activeElement;\n while (elt && elt.shadowRoot) elt = elt.shadowRoot.activeElement;\n return elt;\n}\nfunction caretFromPoint(doc, x, y) {\n if (doc.caretPositionFromPoint) {\n try {\n var pos = doc.caretPositionFromPoint(x, y);\n if (pos) return {\n node: pos.offsetNode,\n offset: Math.min(nodeSize(pos.offsetNode), pos.offset)\n };\n } catch (_) {}\n }\n if (doc.caretRangeFromPoint) {\n var range = doc.caretRangeFromPoint(x, y);\n if (range) return {\n node: range.startContainer,\n offset: Math.min(nodeSize(range.startContainer), range.startOffset)\n };\n }\n}\nvar nav = typeof navigator != \"undefined\" ? navigator : null;\nvar doc = typeof document != \"undefined\" ? document : null;\nvar agent = nav && nav.userAgent || \"\";\nvar ie_edge = /Edge\\/(\\d+)/.exec(agent);\nvar ie_upto10 = /MSIE \\d/.exec(agent);\nvar ie_11up = /Trident\\/(?:[7-9]|\\d{2,})\\..*rv:(\\d+)/.exec(agent);\nvar ie = !!(ie_upto10 || ie_11up || ie_edge);\nvar ie_version = ie_upto10 ? document.documentMode : ie_11up ? +ie_11up[1] : ie_edge ? +ie_edge[1] : 0;\nvar gecko = !ie && /gecko\\/(\\d+)/i.test(agent);\ngecko && +(/Firefox\\/(\\d+)/.exec(agent) || [0, 0])[1];\nvar _chrome = !ie && /Chrome\\/(\\d+)/.exec(agent);\nvar chrome = !!_chrome;\nvar chrome_version = _chrome ? +_chrome[1] : 0;\nvar safari = !ie && !!nav && /Apple Computer/.test(nav.vendor);\nvar ios = safari && (/Mobile\\/\\w+/.test(agent) || !!nav && nav.maxTouchPoints > 2);\nvar mac = ios || (nav ? /Mac/.test(nav.platform) : false);\nvar windows = nav ? /Win/.test(nav.platform) : false;\nvar android = /Android \\d/.test(agent);\nvar webkit = !!doc && \"webkitFontSmoothing\" in doc.documentElement.style;\nvar webkit_version = webkit ? +(/\\bAppleWebKit\\/(\\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;\nfunction windowRect(doc) {\n var vp = doc.defaultView && doc.defaultView.visualViewport;\n if (vp) return {\n left: 0,\n right: vp.width,\n top: 0,\n bottom: vp.height\n };\n return {\n left: 0,\n right: doc.documentElement.clientWidth,\n top: 0,\n bottom: doc.documentElement.clientHeight\n };\n}\nfunction getSide(value, side) {\n return typeof value == \"number\" ? value : value[side];\n}\nfunction clientRect(node) {\n var rect = node.getBoundingClientRect();\n var scaleX = rect.width / node.offsetWidth || 1;\n var scaleY = rect.height / node.offsetHeight || 1;\n return {\n left: rect.left,\n right: rect.left + node.clientWidth * scaleX,\n top: rect.top,\n bottom: rect.top + node.clientHeight * scaleY\n };\n}\nfunction scrollRectIntoView(view, rect, startDOM) {\n var scrollThreshold = view.someProp(\"scrollThreshold\") || 0,\n scrollMargin = view.someProp(\"scrollMargin\") || 5;\n var doc = view.dom.ownerDocument;\n for (var parent = startDOM || view.dom;; parent = parentNode(parent)) {\n if (!parent) break;\n if (parent.nodeType != 1) continue;\n var elt = parent;\n var atTop = elt == doc.body;\n var bounding = atTop ? windowRect(doc) : clientRect(elt);\n var moveX = 0,\n moveY = 0;\n if (rect.top < bounding.top + getSide(scrollThreshold, \"top\")) moveY = -(bounding.top - rect.top + getSide(scrollMargin, \"top\"));else if (rect.bottom > bounding.bottom - getSide(scrollThreshold, \"bottom\")) moveY = rect.bottom - rect.top > bounding.bottom - bounding.top ? rect.top + getSide(scrollMargin, \"top\") - bounding.top : rect.bottom - bounding.bottom + getSide(scrollMargin, \"bottom\");\n if (rect.left < bounding.left + getSide(scrollThreshold, \"left\")) moveX = -(bounding.left - rect.left + getSide(scrollMargin, \"left\"));else if (rect.right > bounding.right - getSide(scrollThreshold, \"right\")) moveX = rect.right - bounding.right + getSide(scrollMargin, \"right\");\n if (moveX || moveY) {\n if (atTop) {\n doc.defaultView.scrollBy(moveX, moveY);\n } else {\n var startX = elt.scrollLeft,\n startY = elt.scrollTop;\n if (moveY) elt.scrollTop += moveY;\n if (moveX) elt.scrollLeft += moveX;\n var dX = elt.scrollLeft - startX,\n dY = elt.scrollTop - startY;\n rect = {\n left: rect.left - dX,\n top: rect.top - dY,\n right: rect.right - dX,\n bottom: rect.bottom - dY\n };\n }\n }\n if (atTop || /^(fixed|sticky)$/.test(getComputedStyle(parent).position)) break;\n }\n}\nfunction storeScrollPos(view) {\n var rect = view.dom.getBoundingClientRect(),\n startY = Math.max(0, rect.top);\n var refDOM, refTop;\n for (var x = (rect.left + rect.right) / 2, y = startY + 1; y < Math.min(innerHeight, rect.bottom); y += 5) {\n var dom = view.root.elementFromPoint(x, y);\n if (!dom || dom == view.dom || !view.dom.contains(dom)) continue;\n var localRect = dom.getBoundingClientRect();\n if (localRect.top >= startY - 20) {\n refDOM = dom;\n refTop = localRect.top;\n break;\n }\n }\n return {\n refDOM: refDOM,\n refTop: refTop,\n stack: scrollStack(view.dom)\n };\n}\nfunction scrollStack(dom) {\n var stack = [],\n doc = dom.ownerDocument;\n for (var cur = dom; cur; cur = parentNode(cur)) {\n stack.push({\n dom: cur,\n top: cur.scrollTop,\n left: cur.scrollLeft\n });\n if (dom == doc) break;\n }\n return stack;\n}\nfunction resetScrollPos(_ref) {\n var refDOM = _ref.refDOM,\n refTop = _ref.refTop,\n stack = _ref.stack;\n var newRefTop = refDOM ? refDOM.getBoundingClientRect().top : 0;\n restoreScrollStack(stack, newRefTop == 0 ? 0 : newRefTop - refTop);\n}\nfunction restoreScrollStack(stack, dTop) {\n for (var i = 0; i < stack.length; i++) {\n var _stack$i = stack[i],\n dom = _stack$i.dom,\n top = _stack$i.top,\n left = _stack$i.left;\n if (dom.scrollTop != top + dTop) dom.scrollTop = top + dTop;\n if (dom.scrollLeft != left) dom.scrollLeft = left;\n }\n}\nvar preventScrollSupported = null;\nfunction focusPreventScroll(dom) {\n if (dom.setActive) return dom.setActive();\n if (preventScrollSupported) return dom.focus(preventScrollSupported);\n var stored = scrollStack(dom);\n dom.focus(preventScrollSupported == null ? {\n get preventScroll() {\n preventScrollSupported = {\n preventScroll: true\n };\n return true;\n }\n } : undefined);\n if (!preventScrollSupported) {\n preventScrollSupported = false;\n restoreScrollStack(stored, 0);\n }\n}\nfunction findOffsetInNode(node, coords) {\n var closest,\n dxClosest = 2e8,\n coordsClosest,\n offset = 0;\n var rowBot = coords.top,\n rowTop = coords.top;\n var firstBelow, coordsBelow;\n for (var child = node.firstChild, childIndex = 0; child; child = child.nextSibling, childIndex++) {\n var rects = void 0;\n if (child.nodeType == 1) rects = child.getClientRects();else if (child.nodeType == 3) rects = textRange(child).getClientRects();else continue;\n for (var i = 0; i < rects.length; i++) {\n var rect = rects[i];\n if (rect.top <= rowBot && rect.bottom >= rowTop) {\n rowBot = Math.max(rect.bottom, rowBot);\n rowTop = Math.min(rect.top, rowTop);\n var dx = rect.left > coords.left ? rect.left - coords.left : rect.right < coords.left ? coords.left - rect.right : 0;\n if (dx < dxClosest) {\n closest = child;\n dxClosest = dx;\n coordsClosest = dx && closest.nodeType == 3 ? {\n left: rect.right < coords.left ? rect.right : rect.left,\n top: coords.top\n } : coords;\n if (child.nodeType == 1 && dx) offset = childIndex + (coords.left >= (rect.left + rect.right) / 2 ? 1 : 0);\n continue;\n }\n } else if (rect.top > coords.top && !firstBelow && rect.left <= coords.left && rect.right >= coords.left) {\n firstBelow = child;\n coordsBelow = {\n left: Math.max(rect.left, Math.min(rect.right, coords.left)),\n top: rect.top\n };\n }\n if (!closest && (coords.left >= rect.right && coords.top >= rect.top || coords.left >= rect.left && coords.top >= rect.bottom)) offset = childIndex + 1;\n }\n }\n if (!closest && firstBelow) {\n closest = firstBelow;\n coordsClosest = coordsBelow;\n dxClosest = 0;\n }\n if (closest && closest.nodeType == 3) return findOffsetInText(closest, coordsClosest);\n if (!closest || dxClosest && closest.nodeType == 1) return {\n node: node,\n offset: offset\n };\n return findOffsetInNode(closest, coordsClosest);\n}\nfunction findOffsetInText(node, coords) {\n var len = node.nodeValue.length;\n var range = document.createRange();\n for (var i = 0; i < len; i++) {\n range.setEnd(node, i + 1);\n range.setStart(node, i);\n var rect = singleRect(range, 1);\n if (rect.top == rect.bottom) continue;\n if (inRect(coords, rect)) return {\n node: node,\n offset: i + (coords.left >= (rect.left + rect.right) / 2 ? 1 : 0)\n };\n }\n return {\n node: node,\n offset: 0\n };\n}\nfunction inRect(coords, rect) {\n return coords.left >= rect.left - 1 && coords.left <= rect.right + 1 && coords.top >= rect.top - 1 && coords.top <= rect.bottom + 1;\n}\nfunction targetKludge(dom, coords) {\n var parent = dom.parentNode;\n if (parent && /^li$/i.test(parent.nodeName) && coords.left < dom.getBoundingClientRect().left) return parent;\n return dom;\n}\nfunction posFromElement(view, elt, coords) {\n var _findOffsetInNode = findOffsetInNode(elt, coords),\n node = _findOffsetInNode.node,\n offset = _findOffsetInNode.offset,\n bias = -1;\n if (node.nodeType == 1 && !node.firstChild) {\n var rect = node.getBoundingClientRect();\n bias = rect.left != rect.right && coords.left > (rect.left + rect.right) / 2 ? 1 : -1;\n }\n return view.docView.posFromDOM(node, offset, bias);\n}\nfunction posFromCaret(view, node, offset, coords) {\n var outsideBlock = -1;\n for (var cur = node, sawBlock = false;;) {\n if (cur == view.dom) break;\n var desc = view.docView.nearestDesc(cur, true);\n if (!desc) return null;\n if (desc.dom.nodeType == 1 && (desc.node.isBlock && desc.parent || !desc.contentDOM)) {\n var rect = desc.dom.getBoundingClientRect();\n if (desc.node.isBlock && desc.parent) {\n if (!sawBlock && rect.left > coords.left || rect.top > coords.top) outsideBlock = desc.posBefore;else if (!sawBlock && rect.right < coords.left || rect.bottom < coords.top) outsideBlock = desc.posAfter;\n sawBlock = true;\n }\n if (!desc.contentDOM && outsideBlock < 0 && !desc.node.isText) {\n var before = desc.node.isBlock ? coords.top < (rect.top + rect.bottom) / 2 : coords.left < (rect.left + rect.right) / 2;\n return before ? desc.posBefore : desc.posAfter;\n }\n }\n cur = desc.dom.parentNode;\n }\n return outsideBlock > -1 ? outsideBlock : view.docView.posFromDOM(node, offset, -1);\n}\nfunction elementFromPoint(element, coords, box) {\n var len = element.childNodes.length;\n if (len && box.top < box.bottom) {\n for (var startI = Math.max(0, Math.min(len - 1, Math.floor(len * (coords.top - box.top) / (box.bottom - box.top)) - 2)), i = startI;;) {\n var child = element.childNodes[i];\n if (child.nodeType == 1) {\n var rects = child.getClientRects();\n for (var j = 0; j < rects.length; j++) {\n var rect = rects[j];\n if (inRect(coords, rect)) return elementFromPoint(child, coords, rect);\n }\n }\n if ((i = (i + 1) % len) == startI) break;\n }\n }\n return element;\n}\nfunction _posAtCoords(view, coords) {\n var doc = view.dom.ownerDocument,\n node,\n offset = 0;\n var caret = caretFromPoint(doc, coords.left, coords.top);\n if (caret) {\n node = caret.node;\n offset = caret.offset;\n }\n var elt = (view.root.elementFromPoint ? view.root : doc).elementFromPoint(coords.left, coords.top);\n var pos;\n if (!elt || !view.dom.contains(elt.nodeType != 1 ? elt.parentNode : elt)) {\n var box = view.dom.getBoundingClientRect();\n if (!inRect(coords, box)) return null;\n elt = elementFromPoint(view.dom, coords, box);\n if (!elt) return null;\n }\n if (safari) {\n for (var p = elt; node && p; p = parentNode(p)) if (p.draggable) node = undefined;\n }\n elt = targetKludge(elt, coords);\n if (node) {\n if (gecko && node.nodeType == 1) {\n offset = Math.min(offset, node.childNodes.length);\n if (offset < node.childNodes.length) {\n var next = node.childNodes[offset],\n _box;\n if (next.nodeName == \"IMG\" && (_box = next.getBoundingClientRect()).right <= coords.left && _box.bottom > coords.top) offset++;\n }\n }\n var prev;\n if (webkit && offset && node.nodeType == 1 && (prev = node.childNodes[offset - 1]).nodeType == 1 && prev.contentEditable == \"false\" && prev.getBoundingClientRect().top >= coords.top) offset--;\n if (node == view.dom && offset == node.childNodes.length - 1 && node.lastChild.nodeType == 1 && coords.top > node.lastChild.getBoundingClientRect().bottom) pos = view.state.doc.content.size;else if (offset == 0 || node.nodeType != 1 || node.childNodes[offset - 1].nodeName != \"BR\") pos = posFromCaret(view, node, offset, coords);\n }\n if (pos == null) pos = posFromElement(view, elt, coords);\n var desc = view.docView.nearestDesc(elt, true);\n return {\n pos: pos,\n inside: desc ? desc.posAtStart - desc.border : -1\n };\n}\nfunction nonZero(rect) {\n return rect.top < rect.bottom || rect.left < rect.right;\n}\nfunction singleRect(target, bias) {\n var rects = target.getClientRects();\n if (rects.length) {\n var first = rects[bias < 0 ? 0 : rects.length - 1];\n if (nonZero(first)) return first;\n }\n return Array.prototype.find.call(rects, nonZero) || target.getBoundingClientRect();\n}\nvar BIDI = /[\\u0590-\\u05f4\\u0600-\\u06ff\\u0700-\\u08ac]/;\nfunction _coordsAtPos(view, pos, side) {\n var _view$docView$domFrom = view.docView.domFromPos(pos, side < 0 ? -1 : 1),\n node = _view$docView$domFrom.node,\n offset = _view$docView$domFrom.offset,\n atom = _view$docView$domFrom.atom;\n var supportEmptyRange = webkit || gecko;\n if (node.nodeType == 3) {\n if (supportEmptyRange && (BIDI.test(node.nodeValue) || (side < 0 ? !offset : offset == node.nodeValue.length))) {\n var rect = singleRect(textRange(node, offset, offset), side);\n if (gecko && offset && /\\s/.test(node.nodeValue[offset - 1]) && offset < node.nodeValue.length) {\n var rectBefore = singleRect(textRange(node, offset - 1, offset - 1), -1);\n if (rectBefore.top == rect.top) {\n var rectAfter = singleRect(textRange(node, offset, offset + 1), -1);\n if (rectAfter.top != rect.top) return flattenV(rectAfter, rectAfter.left < rectBefore.left);\n }\n }\n return rect;\n } else {\n var from = offset,\n to = offset,\n takeSide = side < 0 ? 1 : -1;\n if (side < 0 && !offset) {\n to++;\n takeSide = -1;\n } else if (side >= 0 && offset == node.nodeValue.length) {\n from--;\n takeSide = 1;\n } else if (side < 0) {\n from--;\n } else {\n to++;\n }\n return flattenV(singleRect(textRange(node, from, to), takeSide), takeSide < 0);\n }\n }\n var $dom = view.state.doc.resolve(pos - (atom || 0));\n if (!$dom.parent.inlineContent) {\n if (atom == null && offset && (side < 0 || offset == nodeSize(node))) {\n var before = node.childNodes[offset - 1];\n if (before.nodeType == 1) return flattenH(before.getBoundingClientRect(), false);\n }\n if (atom == null && offset < nodeSize(node)) {\n var after = node.childNodes[offset];\n if (after.nodeType == 1) return flattenH(after.getBoundingClientRect(), true);\n }\n return flattenH(node.getBoundingClientRect(), side >= 0);\n }\n if (atom == null && offset && (side < 0 || offset == nodeSize(node))) {\n var _before = node.childNodes[offset - 1];\n var target = _before.nodeType == 3 ? textRange(_before, nodeSize(_before) - (supportEmptyRange ? 0 : 1)) : _before.nodeType == 1 && (_before.nodeName != \"BR\" || !_before.nextSibling) ? _before : null;\n if (target) return flattenV(singleRect(target, 1), false);\n }\n if (atom == null && offset < nodeSize(node)) {\n var _after = node.childNodes[offset];\n while (_after.pmViewDesc && _after.pmViewDesc.ignoreForCoords) _after = _after.nextSibling;\n var _target = !_after ? null : _after.nodeType == 3 ? textRange(_after, 0, supportEmptyRange ? 0 : 1) : _after.nodeType == 1 ? _after : null;\n if (_target) return flattenV(singleRect(_target, -1), true);\n }\n return flattenV(singleRect(node.nodeType == 3 ? textRange(node) : node, -side), side >= 0);\n}\nfunction flattenV(rect, left) {\n if (rect.width == 0) return rect;\n var x = left ? rect.left : rect.right;\n return {\n top: rect.top,\n bottom: rect.bottom,\n left: x,\n right: x\n };\n}\nfunction flattenH(rect, top) {\n if (rect.height == 0) return rect;\n var y = top ? rect.top : rect.bottom;\n return {\n top: y,\n bottom: y,\n left: rect.left,\n right: rect.right\n };\n}\nfunction withFlushedState(view, state, f) {\n var viewState = view.state,\n active = view.root.activeElement;\n if (viewState != state) view.updateState(state);\n if (active != view.dom) view.focus();\n try {\n return f();\n } finally {\n if (viewState != state) view.updateState(viewState);\n if (active != view.dom && active) active.focus();\n }\n}\nfunction endOfTextblockVertical(view, state, dir) {\n var sel = state.selection;\n var $pos = dir == \"up\" ? sel.$from : sel.$to;\n return withFlushedState(view, state, function () {\n var _view$docView$domFrom2 = view.docView.domFromPos($pos.pos, dir == \"up\" ? -1 : 1),\n dom = _view$docView$domFrom2.node;\n for (;;) {\n var nearest = view.docView.nearestDesc(dom, true);\n if (!nearest) break;\n if (nearest.node.isBlock) {\n dom = nearest.contentDOM || nearest.dom;\n break;\n }\n dom = nearest.dom.parentNode;\n }\n var coords = _coordsAtPos(view, $pos.pos, 1);\n for (var child = dom.firstChild; child; child = child.nextSibling) {\n var boxes = void 0;\n if (child.nodeType == 1) boxes = child.getClientRects();else if (child.nodeType == 3) boxes = textRange(child, 0, child.nodeValue.length).getClientRects();else continue;\n for (var i = 0; i < boxes.length; i++) {\n var box = boxes[i];\n if (box.bottom > box.top + 1 && (dir == \"up\" ? coords.top - box.top > (box.bottom - coords.top) * 2 : box.bottom - coords.bottom > (coords.bottom - box.top) * 2)) return false;\n }\n }\n return true;\n });\n}\nvar maybeRTL = /[\\u0590-\\u08ac]/;\nfunction endOfTextblockHorizontal(view, state, dir) {\n var $head = state.selection.$head;\n if (!$head.parent.isTextblock) return false;\n var offset = $head.parentOffset,\n atStart = !offset,\n atEnd = offset == $head.parent.content.size;\n var sel = view.domSelection();\n if (!sel) return $head.pos == $head.start() || $head.pos == $head.end();\n if (!maybeRTL.test($head.parent.textContent) || !sel.modify) return dir == \"left\" || dir == \"backward\" ? atStart : atEnd;\n return withFlushedState(view, state, function () {\n var _view$domSelectionRan = view.domSelectionRange(),\n oldNode = _view$domSelectionRan.focusNode,\n oldOff = _view$domSelectionRan.focusOffset,\n anchorNode = _view$domSelectionRan.anchorNode,\n anchorOffset = _view$domSelectionRan.anchorOffset;\n var oldBidiLevel = sel.caretBidiLevel;\n sel.modify(\"move\", dir, \"character\");\n var parentDOM = $head.depth ? view.docView.domAfterPos($head.before()) : view.dom;\n var _view$domSelectionRan2 = view.domSelectionRange(),\n newNode = _view$domSelectionRan2.focusNode,\n newOff = _view$domSelectionRan2.focusOffset;\n var result = newNode && !parentDOM.contains(newNode.nodeType == 1 ? newNode : newNode.parentNode) || oldNode == newNode && oldOff == newOff;\n try {\n sel.collapse(anchorNode, anchorOffset);\n if (oldNode && (oldNode != anchorNode || oldOff != anchorOffset) && sel.extend) sel.extend(oldNode, oldOff);\n } catch (_) {}\n if (oldBidiLevel != null) sel.caretBidiLevel = oldBidiLevel;\n return result;\n });\n}\nvar cachedState = null;\nvar cachedDir = null;\nvar cachedResult = false;\nfunction _endOfTextblock(view, state, dir) {\n if (cachedState == state && cachedDir == dir) return cachedResult;\n cachedState = state;\n cachedDir = dir;\n return cachedResult = dir == \"up\" || dir == \"down\" ? endOfTextblockVertical(view, state, dir) : endOfTextblockHorizontal(view, state, dir);\n}\nvar NOT_DIRTY = 0,\n CHILD_DIRTY = 1,\n CONTENT_DIRTY = 2,\n NODE_DIRTY = 3;\nvar ViewDesc = function () {\n function ViewDesc(parent, children, dom, contentDOM) {\n _classCallCheck(this, ViewDesc);\n this.parent = parent;\n this.children = children;\n this.dom = dom;\n this.contentDOM = contentDOM;\n this.dirty = NOT_DIRTY;\n dom.pmViewDesc = this;\n }\n _createClass(ViewDesc, [{\n key: \"matchesWidget\",\n value: function matchesWidget(widget) {\n return false;\n }\n }, {\n key: \"matchesMark\",\n value: function matchesMark(mark) {\n return false;\n }\n }, {\n key: \"matchesNode\",\n value: function matchesNode(node, outerDeco, innerDeco) {\n return false;\n }\n }, {\n key: \"matchesHack\",\n value: function matchesHack(nodeName) {\n return false;\n }\n }, {\n key: \"parseRule\",\n value: function parseRule() {\n return null;\n }\n }, {\n key: \"stopEvent\",\n value: function stopEvent(event) {\n return false;\n }\n }, {\n key: \"size\",\n get: function get() {\n var size = 0;\n for (var i = 0; i < this.children.length; i++) size += this.children[i].size;\n return size;\n }\n }, {\n key: \"border\",\n get: function get() {\n return 0;\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.parent = undefined;\n if (this.dom.pmViewDesc == this) this.dom.pmViewDesc = undefined;\n for (var i = 0; i < this.children.length; i++) this.children[i].destroy();\n }\n }, {\n key: \"posBeforeChild\",\n value: function posBeforeChild(child) {\n for (var i = 0, pos = this.posAtStart;; i++) {\n var cur = this.children[i];\n if (cur == child) return pos;\n pos += cur.size;\n }\n }\n }, {\n key: \"posBefore\",\n get: function get() {\n return this.parent.posBeforeChild(this);\n }\n }, {\n key: \"posAtStart\",\n get: function get() {\n return this.parent ? this.parent.posBeforeChild(this) + this.border : 0;\n }\n }, {\n key: \"posAfter\",\n get: function get() {\n return this.posBefore + this.size;\n }\n }, {\n key: \"posAtEnd\",\n get: function get() {\n return this.posAtStart + this.size - 2 * this.border;\n }\n }, {\n key: \"localPosFromDOM\",\n value: function localPosFromDOM(dom, offset, bias) {\n if (this.contentDOM && this.contentDOM.contains(dom.nodeType == 1 ? dom : dom.parentNode)) {\n if (bias < 0) {\n var domBefore, desc;\n if (dom == this.contentDOM) {\n domBefore = dom.childNodes[offset - 1];\n } else {\n while (dom.parentNode != this.contentDOM) dom = dom.parentNode;\n domBefore = dom.previousSibling;\n }\n while (domBefore && !((desc = domBefore.pmViewDesc) && desc.parent == this)) domBefore = domBefore.previousSibling;\n return domBefore ? this.posBeforeChild(desc) + desc.size : this.posAtStart;\n } else {\n var domAfter, _desc;\n if (dom == this.contentDOM) {\n domAfter = dom.childNodes[offset];\n } else {\n while (dom.parentNode != this.contentDOM) dom = dom.parentNode;\n domAfter = dom.nextSibling;\n }\n while (domAfter && !((_desc = domAfter.pmViewDesc) && _desc.parent == this)) domAfter = domAfter.nextSibling;\n return domAfter ? this.posBeforeChild(_desc) : this.posAtEnd;\n }\n }\n var atEnd;\n if (dom == this.dom && this.contentDOM) {\n atEnd = offset > domIndex(this.contentDOM);\n } else if (this.contentDOM && this.contentDOM != this.dom && this.dom.contains(this.contentDOM)) {\n atEnd = dom.compareDocumentPosition(this.contentDOM) & 2;\n } else if (this.dom.firstChild) {\n if (offset == 0) for (var search = dom;; search = search.parentNode) {\n if (search == this.dom) {\n atEnd = false;\n break;\n }\n if (search.previousSibling) break;\n }\n if (atEnd == null && offset == dom.childNodes.length) for (var _search = dom;; _search = _search.parentNode) {\n if (_search == this.dom) {\n atEnd = true;\n break;\n }\n if (_search.nextSibling) break;\n }\n }\n return (atEnd == null ? bias > 0 : atEnd) ? this.posAtEnd : this.posAtStart;\n }\n }, {\n key: \"nearestDesc\",\n value: function nearestDesc(dom) {\n var onlyNodes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n for (var first = true, cur = dom; cur; cur = cur.parentNode) {\n var desc = this.getDesc(cur),\n nodeDOM = void 0;\n if (desc && (!onlyNodes || desc.node)) {\n if (first && (nodeDOM = desc.nodeDOM) && !(nodeDOM.nodeType == 1 ? nodeDOM.contains(dom.nodeType == 1 ? dom : dom.parentNode) : nodeDOM == dom)) first = false;else return desc;\n }\n }\n }\n }, {\n key: \"getDesc\",\n value: function getDesc(dom) {\n var desc = dom.pmViewDesc;\n for (var cur = desc; cur; cur = cur.parent) if (cur == this) return desc;\n }\n }, {\n key: \"posFromDOM\",\n value: function posFromDOM(dom, offset, bias) {\n for (var scan = dom; scan; scan = scan.parentNode) {\n var desc = this.getDesc(scan);\n if (desc) return desc.localPosFromDOM(dom, offset, bias);\n }\n return -1;\n }\n }, {\n key: \"descAt\",\n value: function descAt(pos) {\n for (var i = 0, offset = 0; i < this.children.length; i++) {\n var child = this.children[i],\n end = offset + child.size;\n if (offset == pos && end != offset) {\n while (!child.border && child.children.length) child = child.children[0];\n return child;\n }\n if (pos < end) return child.descAt(pos - offset - child.border);\n offset = end;\n }\n }\n }, {\n key: \"domFromPos\",\n value: function domFromPos(pos, side) {\n if (!this.contentDOM) return {\n node: this.dom,\n offset: 0,\n atom: pos + 1\n };\n var i = 0,\n offset = 0;\n for (var curPos = 0; i < this.children.length; i++) {\n var child = this.children[i],\n end = curPos + child.size;\n if (end > pos || child instanceof TrailingHackViewDesc) {\n offset = pos - curPos;\n break;\n }\n curPos = end;\n }\n if (offset) return this.children[i].domFromPos(offset - this.children[i].border, side);\n for (var prev; i && !(prev = this.children[i - 1]).size && prev instanceof WidgetViewDesc && prev.side >= 0; i--) {}\n if (side <= 0) {\n var _prev,\n enter = true;\n for (;; i--, enter = false) {\n _prev = i ? this.children[i - 1] : null;\n if (!_prev || _prev.dom.parentNode == this.contentDOM) break;\n }\n if (_prev && side && enter && !_prev.border && !_prev.domAtom) return _prev.domFromPos(_prev.size, side);\n return {\n node: this.contentDOM,\n offset: _prev ? domIndex(_prev.dom) + 1 : 0\n };\n } else {\n var next,\n _enter = true;\n for (;; i++, _enter = false) {\n next = i < this.children.length ? this.children[i] : null;\n if (!next || next.dom.parentNode == this.contentDOM) break;\n }\n if (next && _enter && !next.border && !next.domAtom) return next.domFromPos(0, side);\n return {\n node: this.contentDOM,\n offset: next ? domIndex(next.dom) : this.contentDOM.childNodes.length\n };\n }\n }\n }, {\n key: \"parseRange\",\n value: function parseRange(from, to) {\n var base = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n if (this.children.length == 0) return {\n node: this.contentDOM,\n from: from,\n to: to,\n fromOffset: 0,\n toOffset: this.contentDOM.childNodes.length\n };\n var fromOffset = -1,\n toOffset = -1;\n for (var offset = base, i = 0;; i++) {\n var child = this.children[i],\n end = offset + child.size;\n if (fromOffset == -1 && from <= end) {\n var childBase = offset + child.border;\n if (from >= childBase && to <= end - child.border && child.node && child.contentDOM && this.contentDOM.contains(child.contentDOM)) return child.parseRange(from, to, childBase);\n from = offset;\n for (var j = i; j > 0; j--) {\n var prev = this.children[j - 1];\n if (prev.size && prev.dom.parentNode == this.contentDOM && !prev.emptyChildAt(1)) {\n fromOffset = domIndex(prev.dom) + 1;\n break;\n }\n from -= prev.size;\n }\n if (fromOffset == -1) fromOffset = 0;\n }\n if (fromOffset > -1 && (end > to || i == this.children.length - 1)) {\n to = end;\n for (var _j = i + 1; _j < this.children.length; _j++) {\n var next = this.children[_j];\n if (next.size && next.dom.parentNode == this.contentDOM && !next.emptyChildAt(-1)) {\n toOffset = domIndex(next.dom);\n break;\n }\n to += next.size;\n }\n if (toOffset == -1) toOffset = this.contentDOM.childNodes.length;\n break;\n }\n offset = end;\n }\n return {\n node: this.contentDOM,\n from: from,\n to: to,\n fromOffset: fromOffset,\n toOffset: toOffset\n };\n }\n }, {\n key: \"emptyChildAt\",\n value: function emptyChildAt(side) {\n if (this.border || !this.contentDOM || !this.children.length) return false;\n var child = this.children[side < 0 ? 0 : this.children.length - 1];\n return child.size == 0 || child.emptyChildAt(side);\n }\n }, {\n key: \"domAfterPos\",\n value: function domAfterPos(pos) {\n var _this$domFromPos = this.domFromPos(pos, 0),\n node = _this$domFromPos.node,\n offset = _this$domFromPos.offset;\n if (node.nodeType != 1 || offset == node.childNodes.length) throw new RangeError(\"No node after pos \" + pos);\n return node.childNodes[offset];\n }\n }, {\n key: \"setSelection\",\n value: function setSelection(anchor, head, root) {\n var force = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n var from = Math.min(anchor, head),\n to = Math.max(anchor, head);\n for (var i = 0, offset = 0; i < this.children.length; i++) {\n var child = this.children[i],\n end = offset + child.size;\n if (from > offset && to < end) return child.setSelection(anchor - offset - child.border, head - offset - child.border, root, force);\n offset = end;\n }\n var anchorDOM = this.domFromPos(anchor, anchor ? -1 : 1);\n var headDOM = head == anchor ? anchorDOM : this.domFromPos(head, head ? -1 : 1);\n var domSel = root.getSelection();\n var brKludge = false;\n if ((gecko || safari) && anchor == head) {\n var _anchorDOM = anchorDOM,\n node = _anchorDOM.node,\n _offset = _anchorDOM.offset;\n if (node.nodeType == 3) {\n brKludge = !!(_offset && node.nodeValue[_offset - 1] == \"\\n\");\n if (brKludge && _offset == node.nodeValue.length) {\n for (var scan = node, after; scan; scan = scan.parentNode) {\n if (after = scan.nextSibling) {\n if (after.nodeName == \"BR\") anchorDOM = headDOM = {\n node: after.parentNode,\n offset: domIndex(after) + 1\n };\n break;\n }\n var desc = scan.pmViewDesc;\n if (desc && desc.node && desc.node.isBlock) break;\n }\n }\n } else {\n var prev = node.childNodes[_offset - 1];\n brKludge = prev && (prev.nodeName == \"BR\" || prev.contentEditable == \"false\");\n }\n }\n if (gecko && domSel.focusNode && domSel.focusNode != headDOM.node && domSel.focusNode.nodeType == 1) {\n var _after2 = domSel.focusNode.childNodes[domSel.focusOffset];\n if (_after2 && _after2.contentEditable == \"false\") force = true;\n }\n if (!(force || brKludge && safari) && isEquivalentPosition(anchorDOM.node, anchorDOM.offset, domSel.anchorNode, domSel.anchorOffset) && isEquivalentPosition(headDOM.node, headDOM.offset, domSel.focusNode, domSel.focusOffset)) return;\n var domSelExtended = false;\n if ((domSel.extend || anchor == head) && !brKludge) {\n domSel.collapse(anchorDOM.node, anchorDOM.offset);\n try {\n if (anchor != head) domSel.extend(headDOM.node, headDOM.offset);\n domSelExtended = true;\n } catch (_) {}\n }\n if (!domSelExtended) {\n if (anchor > head) {\n var tmp = anchorDOM;\n anchorDOM = headDOM;\n headDOM = tmp;\n }\n var range = document.createRange();\n range.setEnd(headDOM.node, headDOM.offset);\n range.setStart(anchorDOM.node, anchorDOM.offset);\n domSel.removeAllRanges();\n domSel.addRange(range);\n }\n }\n }, {\n key: \"ignoreMutation\",\n value: function ignoreMutation(mutation) {\n return !this.contentDOM && mutation.type != \"selection\";\n }\n }, {\n key: \"contentLost\",\n get: function get() {\n return this.contentDOM && this.contentDOM != this.dom && !this.dom.contains(this.contentDOM);\n }\n }, {\n key: \"markDirty\",\n value: function markDirty(from, to) {\n for (var offset = 0, i = 0; i < this.children.length; i++) {\n var child = this.children[i],\n end = offset + child.size;\n if (offset == end ? from <= end && to >= offset : from < end && to > offset) {\n var startInside = offset + child.border,\n endInside = end - child.border;\n if (from >= startInside && to <= endInside) {\n this.dirty = from == offset || to == end ? CONTENT_DIRTY : CHILD_DIRTY;\n if (from == startInside && to == endInside && (child.contentLost || child.dom.parentNode != this.contentDOM)) child.dirty = NODE_DIRTY;else child.markDirty(from - startInside, to - startInside);\n return;\n } else {\n child.dirty = child.dom == child.contentDOM && child.dom.parentNode == this.contentDOM && !child.children.length ? CONTENT_DIRTY : NODE_DIRTY;\n }\n }\n offset = end;\n }\n this.dirty = CONTENT_DIRTY;\n }\n }, {\n key: \"markParentsDirty\",\n value: function markParentsDirty() {\n var level = 1;\n for (var node = this.parent; node; node = node.parent, level++) {\n var dirty = level == 1 ? CONTENT_DIRTY : CHILD_DIRTY;\n if (node.dirty < dirty) node.dirty = dirty;\n }\n }\n }, {\n key: \"domAtom\",\n get: function get() {\n return false;\n }\n }, {\n key: \"ignoreForCoords\",\n get: function get() {\n return false;\n }\n }, {\n key: \"isText\",\n value: function isText(text) {\n return false;\n }\n }]);\n return ViewDesc;\n}();\nvar WidgetViewDesc = function (_ViewDesc) {\n _inherits(WidgetViewDesc, _ViewDesc);\n var _super = _createSuper(WidgetViewDesc);\n function WidgetViewDesc(parent, widget, view, pos) {\n var _this;\n _classCallCheck(this, WidgetViewDesc);\n var self,\n dom = widget.type.toDOM;\n if (typeof dom == \"function\") dom = dom(view, function () {\n if (!self) return pos;\n if (self.parent) return self.parent.posBeforeChild(self);\n });\n if (!widget.type.spec.raw) {\n if (dom.nodeType != 1) {\n var wrap = document.createElement(\"span\");\n wrap.appendChild(dom);\n dom = wrap;\n }\n dom.contentEditable = \"false\";\n dom.classList.add(\"ProseMirror-widget\");\n }\n _this = _super.call(this, parent, [], dom, null);\n _this.widget = widget;\n _this.widget = widget;\n self = _assertThisInitialized(_this);\n return _this;\n }\n _createClass(WidgetViewDesc, [{\n key: \"matchesWidget\",\n value: function matchesWidget(widget) {\n return this.dirty == NOT_DIRTY && widget.type.eq(this.widget.type);\n }\n }, {\n key: \"parseRule\",\n value: function parseRule() {\n return {\n ignore: true\n };\n }\n }, {\n key: \"stopEvent\",\n value: function stopEvent(event) {\n var stop = this.widget.spec.stopEvent;\n return stop ? stop(event) : false;\n }\n }, {\n key: \"ignoreMutation\",\n value: function ignoreMutation(mutation) {\n return mutation.type != \"selection\" || this.widget.spec.ignoreSelection;\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.widget.type.destroy(this.dom);\n _get(_getPrototypeOf(WidgetViewDesc.prototype), \"destroy\", this).call(this);\n }\n }, {\n key: \"domAtom\",\n get: function get() {\n return true;\n }\n }, {\n key: \"side\",\n get: function get() {\n return this.widget.type.side;\n }\n }]);\n return WidgetViewDesc;\n}(ViewDesc);\nvar CompositionViewDesc = function (_ViewDesc2) {\n _inherits(CompositionViewDesc, _ViewDesc2);\n var _super2 = _createSuper(CompositionViewDesc);\n function CompositionViewDesc(parent, dom, textDOM, text) {\n var _this2;\n _classCallCheck(this, CompositionViewDesc);\n _this2 = _super2.call(this, parent, [], dom, null);\n _this2.textDOM = textDOM;\n _this2.text = text;\n return _this2;\n }\n _createClass(CompositionViewDesc, [{\n key: \"size\",\n get: function get() {\n return this.text.length;\n }\n }, {\n key: \"localPosFromDOM\",\n value: function localPosFromDOM(dom, offset) {\n if (dom != this.textDOM) return this.posAtStart + (offset ? this.size : 0);\n return this.posAtStart + offset;\n }\n }, {\n key: \"domFromPos\",\n value: function domFromPos(pos) {\n return {\n node: this.textDOM,\n offset: pos\n };\n }\n }, {\n key: \"ignoreMutation\",\n value: function ignoreMutation(mut) {\n return mut.type === 'characterData' && mut.target.nodeValue == mut.oldValue;\n }\n }]);\n return CompositionViewDesc;\n}(ViewDesc);\nvar MarkViewDesc = function (_ViewDesc3) {\n _inherits(MarkViewDesc, _ViewDesc3);\n var _super3 = _createSuper(MarkViewDesc);\n function MarkViewDesc(parent, mark, dom, contentDOM) {\n var _this3;\n _classCallCheck(this, MarkViewDesc);\n _this3 = _super3.call(this, parent, [], dom, contentDOM);\n _this3.mark = mark;\n return _this3;\n }\n _createClass(MarkViewDesc, [{\n key: \"parseRule\",\n value: function parseRule() {\n if (this.dirty & NODE_DIRTY || this.mark.type.spec.reparseInView) return null;\n return {\n mark: this.mark.type.name,\n attrs: this.mark.attrs,\n contentElement: this.contentDOM\n };\n }\n }, {\n key: \"matchesMark\",\n value: function matchesMark(mark) {\n return this.dirty != NODE_DIRTY && this.mark.eq(mark);\n }\n }, {\n key: \"markDirty\",\n value: function markDirty(from, to) {\n _get(_getPrototypeOf(MarkViewDesc.prototype), \"markDirty\", this).call(this, from, to);\n if (this.dirty != NOT_DIRTY) {\n var parent = this.parent;\n while (!parent.node) parent = parent.parent;\n if (parent.dirty < this.dirty) parent.dirty = this.dirty;\n this.dirty = NOT_DIRTY;\n }\n }\n }, {\n key: \"slice\",\n value: function slice(from, to, view) {\n var copy = MarkViewDesc.create(this.parent, this.mark, true, view);\n var nodes = this.children,\n size = this.size;\n if (to < size) nodes = replaceNodes(nodes, to, size, view);\n if (from > 0) nodes = replaceNodes(nodes, 0, from, view);\n for (var i = 0; i < nodes.length; i++) nodes[i].parent = copy;\n copy.children = nodes;\n return copy;\n }\n }], [{\n key: \"create\",\n value: function create(parent, mark, inline, view) {\n var custom = view.nodeViews[mark.type.name];\n var spec = custom && custom(mark, view, inline);\n if (!spec || !spec.dom) spec = prosemirrorModel.DOMSerializer.renderSpec(document, mark.type.spec.toDOM(mark, inline), null, mark.attrs);\n return new MarkViewDesc(parent, mark, spec.dom, spec.contentDOM || spec.dom);\n }\n }]);\n return MarkViewDesc;\n}(ViewDesc);\nvar NodeViewDesc = function (_ViewDesc4) {\n _inherits(NodeViewDesc, _ViewDesc4);\n var _super4 = _createSuper(NodeViewDesc);\n function NodeViewDesc(parent, node, outerDeco, innerDeco, dom, contentDOM, nodeDOM, view, pos) {\n var _this4;\n _classCallCheck(this, NodeViewDesc);\n _this4 = _super4.call(this, parent, [], dom, contentDOM);\n _this4.node = node;\n _this4.outerDeco = outerDeco;\n _this4.innerDeco = innerDeco;\n _this4.nodeDOM = nodeDOM;\n return _this4;\n }\n _createClass(NodeViewDesc, [{\n key: \"parseRule\",\n value: function parseRule() {\n var _this5 = this;\n if (this.node.type.spec.reparseInView) return null;\n var rule = {\n node: this.node.type.name,\n attrs: this.node.attrs\n };\n if (this.node.type.whitespace == \"pre\") rule.preserveWhitespace = \"full\";\n if (!this.contentDOM) {\n rule.getContent = function () {\n return _this5.node.content;\n };\n } else if (!this.contentLost) {\n rule.contentElement = this.contentDOM;\n } else {\n for (var i = this.children.length - 1; i >= 0; i--) {\n var child = this.children[i];\n if (this.dom.contains(child.dom.parentNode)) {\n rule.contentElement = child.dom.parentNode;\n break;\n }\n }\n if (!rule.contentElement) rule.getContent = function () {\n return prosemirrorModel.Fragment.empty;\n };\n }\n return rule;\n }\n }, {\n key: \"matchesNode\",\n value: function matchesNode(node, outerDeco, innerDeco) {\n return this.dirty == NOT_DIRTY && node.eq(this.node) && sameOuterDeco(outerDeco, this.outerDeco) && innerDeco.eq(this.innerDeco);\n }\n }, {\n key: \"size\",\n get: function get() {\n return this.node.nodeSize;\n }\n }, {\n key: \"border\",\n get: function get() {\n return this.node.isLeaf ? 0 : 1;\n }\n }, {\n key: \"updateChildren\",\n value: function updateChildren(view, pos) {\n var _this6 = this;\n var inline = this.node.inlineContent,\n off = pos;\n var composition = view.composing ? this.localCompositionInfo(view, pos) : null;\n var localComposition = composition && composition.pos > -1 ? composition : null;\n var compositionInChild = composition && composition.pos < 0;\n var updater = new ViewTreeUpdater(this, localComposition && localComposition.node, view);\n iterDeco(this.node, this.innerDeco, function (widget, i, insideNode) {\n if (widget.spec.marks) updater.syncToMarks(widget.spec.marks, inline, view);else if (widget.type.side >= 0 && !insideNode) updater.syncToMarks(i == _this6.node.childCount ? prosemirrorModel.Mark.none : _this6.node.child(i).marks, inline, view);\n updater.placeWidget(widget, view, off);\n }, function (child, outerDeco, innerDeco, i) {\n updater.syncToMarks(child.marks, inline, view);\n var compIndex;\n if (updater.findNodeMatch(child, outerDeco, innerDeco, i)) ;else if (compositionInChild && view.state.selection.from > off && view.state.selection.to < off + child.nodeSize && (compIndex = updater.findIndexWithChild(composition.node)) > -1 && updater.updateNodeAt(child, outerDeco, innerDeco, compIndex, view)) ;else if (updater.updateNextNode(child, outerDeco, innerDeco, view, i, off)) ;else {\n updater.addNode(child, outerDeco, innerDeco, view, off);\n }\n off += child.nodeSize;\n });\n updater.syncToMarks([], inline, view);\n if (this.node.isTextblock) updater.addTextblockHacks();\n updater.destroyRest();\n if (updater.changed || this.dirty == CONTENT_DIRTY) {\n if (localComposition) this.protectLocalComposition(view, localComposition);\n renderDescs(this.contentDOM, this.children, view);\n if (ios) iosHacks(this.dom);\n }\n }\n }, {\n key: \"localCompositionInfo\",\n value: function localCompositionInfo(view, pos) {\n var _view$state$selection = view.state.selection,\n from = _view$state$selection.from,\n to = _view$state$selection.to;\n if (!(view.state.selection instanceof prosemirrorState.TextSelection) || from < pos || to > pos + this.node.content.size) return null;\n var textNode = view.input.compositionNode;\n if (!textNode || !this.dom.contains(textNode.parentNode)) return null;\n if (this.node.inlineContent) {\n var text = textNode.nodeValue;\n var textPos = findTextInFragment(this.node.content, text, from - pos, to - pos);\n return textPos < 0 ? null : {\n node: textNode,\n pos: textPos,\n text: text\n };\n } else {\n return {\n node: textNode,\n pos: -1,\n text: \"\"\n };\n }\n }\n }, {\n key: \"protectLocalComposition\",\n value: function protectLocalComposition(view, _ref2) {\n var node = _ref2.node,\n pos = _ref2.pos,\n text = _ref2.text;\n if (this.getDesc(node)) return;\n var topNode = node;\n for (;; topNode = topNode.parentNode) {\n if (topNode.parentNode == this.contentDOM) break;\n while (topNode.previousSibling) topNode.parentNode.removeChild(topNode.previousSibling);\n while (topNode.nextSibling) topNode.parentNode.removeChild(topNode.nextSibling);\n if (topNode.pmViewDesc) topNode.pmViewDesc = undefined;\n }\n var desc = new CompositionViewDesc(this, topNode, node, text);\n view.input.compositionNodes.push(desc);\n this.children = replaceNodes(this.children, pos, pos + text.length, view, desc);\n }\n }, {\n key: \"update\",\n value: function update(node, outerDeco, innerDeco, view) {\n if (this.dirty == NODE_DIRTY || !node.sameMarkup(this.node)) return false;\n this.updateInner(node, outerDeco, innerDeco, view);\n return true;\n }\n }, {\n key: \"updateInner\",\n value: function updateInner(node, outerDeco, innerDeco, view) {\n this.updateOuterDeco(outerDeco);\n this.node = node;\n this.innerDeco = innerDeco;\n if (this.contentDOM) this.updateChildren(view, this.posAtStart);\n this.dirty = NOT_DIRTY;\n }\n }, {\n key: \"updateOuterDeco\",\n value: function updateOuterDeco(outerDeco) {\n if (sameOuterDeco(outerDeco, this.outerDeco)) return;\n var needsWrap = this.nodeDOM.nodeType != 1;\n var oldDOM = this.dom;\n this.dom = patchOuterDeco(this.dom, this.nodeDOM, computeOuterDeco(this.outerDeco, this.node, needsWrap), computeOuterDeco(outerDeco, this.node, needsWrap));\n if (this.dom != oldDOM) {\n oldDOM.pmViewDesc = undefined;\n this.dom.pmViewDesc = this;\n }\n this.outerDeco = outerDeco;\n }\n }, {\n key: \"selectNode\",\n value: function selectNode() {\n if (this.nodeDOM.nodeType == 1) this.nodeDOM.classList.add(\"ProseMirror-selectednode\");\n if (this.contentDOM || !this.node.type.spec.draggable) this.dom.draggable = true;\n }\n }, {\n key: \"deselectNode\",\n value: function deselectNode() {\n if (this.nodeDOM.nodeType == 1) {\n this.nodeDOM.classList.remove(\"ProseMirror-selectednode\");\n if (this.contentDOM || !this.node.type.spec.draggable) this.dom.removeAttribute(\"draggable\");\n }\n }\n }, {\n key: \"domAtom\",\n get: function get() {\n return this.node.isAtom;\n }\n }], [{\n key: \"create\",\n value: function create(parent, node, outerDeco, innerDeco, view, pos) {\n var custom = view.nodeViews[node.type.name],\n descObj;\n var spec = custom && custom(node, view, function () {\n if (!descObj) return pos;\n if (descObj.parent) return descObj.parent.posBeforeChild(descObj);\n }, outerDeco, innerDeco);\n var dom = spec && spec.dom,\n contentDOM = spec && spec.contentDOM;\n if (node.isText) {\n if (!dom) dom = document.createTextNode(node.text);else if (dom.nodeType != 3) throw new RangeError(\"Text must be rendered as a DOM text node\");\n } else if (!dom) {\n var _spec = prosemirrorModel.DOMSerializer.renderSpec(document, node.type.spec.toDOM(node), null, node.attrs);\n dom = _spec.dom;\n contentDOM = _spec.contentDOM;\n }\n if (!contentDOM && !node.isText && dom.nodeName != \"BR\") {\n if (!dom.hasAttribute(\"contenteditable\")) dom.contentEditable = \"false\";\n if (node.type.spec.draggable) dom.draggable = true;\n }\n var nodeDOM = dom;\n dom = applyOuterDeco(dom, outerDeco, node);\n if (spec) return descObj = new CustomNodeViewDesc(parent, node, outerDeco, innerDeco, dom, contentDOM || null, nodeDOM, spec, view, pos + 1);else if (node.isText) return new TextViewDesc(parent, node, outerDeco, innerDeco, dom, nodeDOM, view);else return new NodeViewDesc(parent, node, outerDeco, innerDeco, dom, contentDOM || null, nodeDOM, view, pos + 1);\n }\n }]);\n return NodeViewDesc;\n}(ViewDesc);\nfunction docViewDesc(doc, outerDeco, innerDeco, dom, view) {\n applyOuterDeco(dom, outerDeco, doc);\n var docView = new NodeViewDesc(undefined, doc, outerDeco, innerDeco, dom, dom, dom, view, 0);\n if (docView.contentDOM) docView.updateChildren(view, 0);\n return docView;\n}\nvar TextViewDesc = function (_NodeViewDesc) {\n _inherits(TextViewDesc, _NodeViewDesc);\n var _super5 = _createSuper(TextViewDesc);\n function TextViewDesc(parent, node, outerDeco, innerDeco, dom, nodeDOM, view) {\n _classCallCheck(this, TextViewDesc);\n return _super5.call(this, parent, node, outerDeco, innerDeco, dom, null, nodeDOM, view, 0);\n }\n _createClass(TextViewDesc, [{\n key: \"parseRule\",\n value: function parseRule() {\n var skip = this.nodeDOM.parentNode;\n while (skip && skip != this.dom && !skip.pmIsDeco) skip = skip.parentNode;\n return {\n skip: skip || true\n };\n }\n }, {\n key: \"update\",\n value: function update(node, outerDeco, innerDeco, view) {\n if (this.dirty == NODE_DIRTY || this.dirty != NOT_DIRTY && !this.inParent() || !node.sameMarkup(this.node)) return false;\n this.updateOuterDeco(outerDeco);\n if ((this.dirty != NOT_DIRTY || node.text != this.node.text) && node.text != this.nodeDOM.nodeValue) {\n this.nodeDOM.nodeValue = node.text;\n if (view.trackWrites == this.nodeDOM) view.trackWrites = null;\n }\n this.node = node;\n this.dirty = NOT_DIRTY;\n return true;\n }\n }, {\n key: \"inParent\",\n value: function inParent() {\n var parentDOM = this.parent.contentDOM;\n for (var n = this.nodeDOM; n; n = n.parentNode) if (n == parentDOM) return true;\n return false;\n }\n }, {\n key: \"domFromPos\",\n value: function domFromPos(pos) {\n return {\n node: this.nodeDOM,\n offset: pos\n };\n }\n }, {\n key: \"localPosFromDOM\",\n value: function localPosFromDOM(dom, offset, bias) {\n if (dom == this.nodeDOM) return this.posAtStart + Math.min(offset, this.node.text.length);\n return _get(_getPrototypeOf(TextViewDesc.prototype), \"localPosFromDOM\", this).call(this, dom, offset, bias);\n }\n }, {\n key: \"ignoreMutation\",\n value: function ignoreMutation(mutation) {\n return mutation.type != \"characterData\" && mutation.type != \"selection\";\n }\n }, {\n key: \"slice\",\n value: function slice(from, to, view) {\n var node = this.node.cut(from, to),\n dom = document.createTextNode(node.text);\n return new TextViewDesc(this.parent, node, this.outerDeco, this.innerDeco, dom, dom, view);\n }\n }, {\n key: \"markDirty\",\n value: function markDirty(from, to) {\n _get(_getPrototypeOf(TextViewDesc.prototype), \"markDirty\", this).call(this, from, to);\n if (this.dom != this.nodeDOM && (from == 0 || to == this.nodeDOM.nodeValue.length)) this.dirty = NODE_DIRTY;\n }\n }, {\n key: \"domAtom\",\n get: function get() {\n return false;\n }\n }, {\n key: \"isText\",\n value: function isText(text) {\n return this.node.text == text;\n }\n }]);\n return TextViewDesc;\n}(NodeViewDesc);\nvar TrailingHackViewDesc = function (_ViewDesc5) {\n _inherits(TrailingHackViewDesc, _ViewDesc5);\n var _super6 = _createSuper(TrailingHackViewDesc);\n function TrailingHackViewDesc() {\n _classCallCheck(this, TrailingHackViewDesc);\n return _super6.apply(this, arguments);\n }\n _createClass(TrailingHackViewDesc, [{\n key: \"parseRule\",\n value: function parseRule() {\n return {\n ignore: true\n };\n }\n }, {\n key: \"matchesHack\",\n value: function matchesHack(nodeName) {\n return this.dirty == NOT_DIRTY && this.dom.nodeName == nodeName;\n }\n }, {\n key: \"domAtom\",\n get: function get() {\n return true;\n }\n }, {\n key: \"ignoreForCoords\",\n get: function get() {\n return this.dom.nodeName == \"IMG\";\n }\n }]);\n return TrailingHackViewDesc;\n}(ViewDesc);\nvar CustomNodeViewDesc = function (_NodeViewDesc2) {\n _inherits(CustomNodeViewDesc, _NodeViewDesc2);\n var _super7 = _createSuper(CustomNodeViewDesc);\n function CustomNodeViewDesc(parent, node, outerDeco, innerDeco, dom, contentDOM, nodeDOM, spec, view, pos) {\n var _this7;\n _classCallCheck(this, CustomNodeViewDesc);\n _this7 = _super7.call(this, parent, node, outerDeco, innerDeco, dom, contentDOM, nodeDOM, view, pos);\n _this7.spec = spec;\n return _this7;\n }\n _createClass(CustomNodeViewDesc, [{\n key: \"update\",\n value: function update(node, outerDeco, innerDeco, view) {\n if (this.dirty == NODE_DIRTY) return false;\n if (this.spec.update && (this.node.type == node.type || this.spec.multiType)) {\n var result = this.spec.update(node, outerDeco, innerDeco);\n if (result) this.updateInner(node, outerDeco, innerDeco, view);\n return result;\n } else if (!this.contentDOM && !node.isLeaf) {\n return false;\n } else {\n return _get(_getPrototypeOf(CustomNodeViewDesc.prototype), \"update\", this).call(this, node, outerDeco, innerDeco, view);\n }\n }\n }, {\n key: \"selectNode\",\n value: function selectNode() {\n this.spec.selectNode ? this.spec.selectNode() : _get(_getPrototypeOf(CustomNodeViewDesc.prototype), \"selectNode\", this).call(this);\n }\n }, {\n key: \"deselectNode\",\n value: function deselectNode() {\n this.spec.deselectNode ? this.spec.deselectNode() : _get(_getPrototypeOf(CustomNodeViewDesc.prototype), \"deselectNode\", this).call(this);\n }\n }, {\n key: \"setSelection\",\n value: function setSelection(anchor, head, root, force) {\n this.spec.setSelection ? this.spec.setSelection(anchor, head, root) : _get(_getPrototypeOf(CustomNodeViewDesc.prototype), \"setSelection\", this).call(this, anchor, head, root, force);\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n if (this.spec.destroy) this.spec.destroy();\n _get(_getPrototypeOf(CustomNodeViewDesc.prototype), \"destroy\", this).call(this);\n }\n }, {\n key: \"stopEvent\",\n value: function stopEvent(event) {\n return this.spec.stopEvent ? this.spec.stopEvent(event) : false;\n }\n }, {\n key: \"ignoreMutation\",\n value: function ignoreMutation(mutation) {\n return this.spec.ignoreMutation ? this.spec.ignoreMutation(mutation) : _get(_getPrototypeOf(CustomNodeViewDesc.prototype), \"ignoreMutation\", this).call(this, mutation);\n }\n }]);\n return CustomNodeViewDesc;\n}(NodeViewDesc);\nfunction renderDescs(parentDOM, descs, view) {\n var dom = parentDOM.firstChild,\n written = false;\n for (var i = 0; i < descs.length; i++) {\n var desc = descs[i],\n childDOM = desc.dom;\n if (childDOM.parentNode == parentDOM) {\n while (childDOM != dom) {\n dom = rm(dom);\n written = true;\n }\n dom = dom.nextSibling;\n } else {\n written = true;\n parentDOM.insertBefore(childDOM, dom);\n }\n if (desc instanceof MarkViewDesc) {\n var pos = dom ? dom.previousSibling : parentDOM.lastChild;\n renderDescs(desc.contentDOM, desc.children, view);\n dom = pos ? pos.nextSibling : parentDOM.firstChild;\n }\n }\n while (dom) {\n dom = rm(dom);\n written = true;\n }\n if (written && view.trackWrites == parentDOM) view.trackWrites = null;\n}\nvar OuterDecoLevel = function OuterDecoLevel(nodeName) {\n if (nodeName) this.nodeName = nodeName;\n};\nOuterDecoLevel.prototype = Object.create(null);\nvar noDeco = [new OuterDecoLevel()];\nfunction computeOuterDeco(outerDeco, node, needsWrap) {\n if (outerDeco.length == 0) return noDeco;\n var top = needsWrap ? noDeco[0] : new OuterDecoLevel(),\n result = [top];\n for (var i = 0; i < outerDeco.length; i++) {\n var attrs = outerDeco[i].type.attrs;\n if (!attrs) continue;\n if (attrs.nodeName) result.push(top = new OuterDecoLevel(attrs.nodeName));\n for (var name in attrs) {\n var val = attrs[name];\n if (val == null) continue;\n if (needsWrap && result.length == 1) result.push(top = new OuterDecoLevel(node.isInline ? \"span\" : \"div\"));\n if (name == \"class\") top[\"class\"] = (top[\"class\"] ? top[\"class\"] + \" \" : \"\") + val;else if (name == \"style\") top.style = (top.style ? top.style + \";\" : \"\") + val;else if (name != \"nodeName\") top[name] = val;\n }\n }\n return result;\n}\nfunction patchOuterDeco(outerDOM, nodeDOM, prevComputed, curComputed) {\n if (prevComputed == noDeco && curComputed == noDeco) return nodeDOM;\n var curDOM = nodeDOM;\n for (var i = 0; i < curComputed.length; i++) {\n var deco = curComputed[i],\n prev = prevComputed[i];\n if (i) {\n var parent = void 0;\n if (prev && prev.nodeName == deco.nodeName && curDOM != outerDOM && (parent = curDOM.parentNode) && parent.nodeName.toLowerCase() == deco.nodeName) {\n curDOM = parent;\n } else {\n parent = document.createElement(deco.nodeName);\n parent.pmIsDeco = true;\n parent.appendChild(curDOM);\n prev = noDeco[0];\n curDOM = parent;\n }\n }\n patchAttributes(curDOM, prev || noDeco[0], deco);\n }\n return curDOM;\n}\nfunction patchAttributes(dom, prev, cur) {\n for (var name in prev) if (name != \"class\" && name != \"style\" && name != \"nodeName\" && !(name in cur)) dom.removeAttribute(name);\n for (var _name in cur) if (_name != \"class\" && _name != \"style\" && _name != \"nodeName\" && cur[_name] != prev[_name]) dom.setAttribute(_name, cur[_name]);\n if (prev[\"class\"] != cur[\"class\"]) {\n var prevList = prev[\"class\"] ? prev[\"class\"].split(\" \").filter(Boolean) : [];\n var curList = cur[\"class\"] ? cur[\"class\"].split(\" \").filter(Boolean) : [];\n for (var i = 0; i < prevList.length; i++) if (curList.indexOf(prevList[i]) == -1) dom.classList.remove(prevList[i]);\n for (var _i = 0; _i < curList.length; _i++) if (prevList.indexOf(curList[_i]) == -1) dom.classList.add(curList[_i]);\n if (dom.classList.length == 0) dom.removeAttribute(\"class\");\n }\n if (prev.style != cur.style) {\n if (prev.style) {\n var prop = /\\s*([\\w\\-\\xa1-\\uffff]+)\\s*:(?:\"(?:\\\\.|[^\"])*\"|'(?:\\\\.|[^'])*'|\\(.*?\\)|[^;])*/g,\n m;\n while (m = prop.exec(prev.style)) dom.style.removeProperty(m[1]);\n }\n if (cur.style) dom.style.cssText += cur.style;\n }\n}\nfunction applyOuterDeco(dom, deco, node) {\n return patchOuterDeco(dom, dom, noDeco, computeOuterDeco(deco, node, dom.nodeType != 1));\n}\nfunction sameOuterDeco(a, b) {\n if (a.length != b.length) return false;\n for (var i = 0; i < a.length; i++) if (!a[i].type.eq(b[i].type)) return false;\n return true;\n}\nfunction rm(dom) {\n var next = dom.nextSibling;\n dom.parentNode.removeChild(dom);\n return next;\n}\nvar ViewTreeUpdater = function () {\n function ViewTreeUpdater(top, lock, view) {\n _classCallCheck(this, ViewTreeUpdater);\n this.lock = lock;\n this.view = view;\n this.index = 0;\n this.stack = [];\n this.changed = false;\n this.top = top;\n this.preMatch = preMatch(top.node.content, top);\n }\n _createClass(ViewTreeUpdater, [{\n key: \"destroyBetween\",\n value: function destroyBetween(start, end) {\n if (start == end) return;\n for (var i = start; i < end; i++) this.top.children[i].destroy();\n this.top.children.splice(start, end - start);\n this.changed = true;\n }\n }, {\n key: \"destroyRest\",\n value: function destroyRest() {\n this.destroyBetween(this.index, this.top.children.length);\n }\n }, {\n key: \"syncToMarks\",\n value: function syncToMarks(marks, inline, view) {\n var keep = 0,\n depth = this.stack.length >> 1;\n var maxKeep = Math.min(depth, marks.length);\n while (keep < maxKeep && (keep == depth - 1 ? this.top : this.stack[keep + 1 << 1]).matchesMark(marks[keep]) && marks[keep].type.spec.spanning !== false) keep++;\n while (keep < depth) {\n this.destroyRest();\n this.top.dirty = NOT_DIRTY;\n this.index = this.stack.pop();\n this.top = this.stack.pop();\n depth--;\n }\n while (depth < marks.length) {\n this.stack.push(this.top, this.index + 1);\n var found = -1;\n for (var i = this.index; i < Math.min(this.index + 3, this.top.children.length); i++) {\n var next = this.top.children[i];\n if (next.matchesMark(marks[depth]) && !this.isLocked(next.dom)) {\n found = i;\n break;\n }\n }\n if (found > -1) {\n if (found > this.index) {\n this.changed = true;\n this.destroyBetween(this.index, found);\n }\n this.top = this.top.children[this.index];\n } else {\n var markDesc = MarkViewDesc.create(this.top, marks[depth], inline, view);\n this.top.children.splice(this.index, 0, markDesc);\n this.top = markDesc;\n this.changed = true;\n }\n this.index = 0;\n depth++;\n }\n }\n }, {\n key: \"findNodeMatch\",\n value: function findNodeMatch(node, outerDeco, innerDeco, index) {\n var found = -1,\n targetDesc;\n if (index >= this.preMatch.index && (targetDesc = this.preMatch.matches[index - this.preMatch.index]).parent == this.top && targetDesc.matchesNode(node, outerDeco, innerDeco)) {\n found = this.top.children.indexOf(targetDesc, this.index);\n } else {\n for (var i = this.index, e = Math.min(this.top.children.length, i + 5); i < e; i++) {\n var child = this.top.children[i];\n if (child.matchesNode(node, outerDeco, innerDeco) && !this.preMatch.matched.has(child)) {\n found = i;\n break;\n }\n }\n }\n if (found < 0) return false;\n this.destroyBetween(this.index, found);\n this.index++;\n return true;\n }\n }, {\n key: \"updateNodeAt\",\n value: function updateNodeAt(node, outerDeco, innerDeco, index, view) {\n var child = this.top.children[index];\n if (child.dirty == NODE_DIRTY && child.dom == child.contentDOM) child.dirty = CONTENT_DIRTY;\n if (!child.update(node, outerDeco, innerDeco, view)) return false;\n this.destroyBetween(this.index, index);\n this.index++;\n return true;\n }\n }, {\n key: \"findIndexWithChild\",\n value: function findIndexWithChild(domNode) {\n for (;;) {\n var parent = domNode.parentNode;\n if (!parent) return -1;\n if (parent == this.top.contentDOM) {\n var desc = domNode.pmViewDesc;\n if (desc) for (var i = this.index; i < this.top.children.length; i++) {\n if (this.top.children[i] == desc) return i;\n }\n return -1;\n }\n domNode = parent;\n }\n }\n }, {\n key: \"updateNextNode\",\n value: function updateNextNode(node, outerDeco, innerDeco, view, index, pos) {\n for (var i = this.index; i < this.top.children.length; i++) {\n var next = this.top.children[i];\n if (next instanceof NodeViewDesc) {\n var _preMatch = this.preMatch.matched.get(next);\n if (_preMatch != null && _preMatch != index) return false;\n var nextDOM = next.dom,\n updated = void 0;\n var locked = this.isLocked(nextDOM) && !(node.isText && next.node && next.node.isText && next.nodeDOM.nodeValue == node.text && next.dirty != NODE_DIRTY && sameOuterDeco(outerDeco, next.outerDeco));\n if (!locked && next.update(node, outerDeco, innerDeco, view)) {\n this.destroyBetween(this.index, i);\n if (next.dom != nextDOM) this.changed = true;\n this.index++;\n return true;\n } else if (!locked && (updated = this.recreateWrapper(next, node, outerDeco, innerDeco, view, pos))) {\n this.destroyBetween(this.index, i);\n this.top.children[this.index] = updated;\n if (updated.contentDOM) {\n updated.dirty = CONTENT_DIRTY;\n updated.updateChildren(view, pos + 1);\n updated.dirty = NOT_DIRTY;\n }\n this.changed = true;\n this.index++;\n return true;\n }\n break;\n }\n }\n return false;\n }\n }, {\n key: \"recreateWrapper\",\n value: function recreateWrapper(next, node, outerDeco, innerDeco, view, pos) {\n if (next.dirty || node.isAtom || !next.children.length || !next.node.content.eq(node.content) || !sameOuterDeco(outerDeco, next.outerDeco) || !innerDeco.eq(next.innerDeco)) return null;\n var wrapper = NodeViewDesc.create(this.top, node, outerDeco, innerDeco, view, pos);\n if (wrapper.contentDOM) {\n wrapper.children = next.children;\n next.children = [];\n var _iterator = _createForOfIteratorHelper(wrapper.children),\n _step;\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var ch = _step.value;\n ch.parent = wrapper;\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n }\n next.destroy();\n return wrapper;\n }\n }, {\n key: \"addNode\",\n value: function addNode(node, outerDeco, innerDeco, view, pos) {\n var desc = NodeViewDesc.create(this.top, node, outerDeco, innerDeco, view, pos);\n if (desc.contentDOM) desc.updateChildren(view, pos + 1);\n this.top.children.splice(this.index++, 0, desc);\n this.changed = true;\n }\n }, {\n key: \"placeWidget\",\n value: function placeWidget(widget, view, pos) {\n var next = this.index < this.top.children.length ? this.top.children[this.index] : null;\n if (next && next.matchesWidget(widget) && (widget == next.widget || !next.widget.type.toDOM.parentNode)) {\n this.index++;\n } else {\n var desc = new WidgetViewDesc(this.top, widget, view, pos);\n this.top.children.splice(this.index++, 0, desc);\n this.changed = true;\n }\n }\n }, {\n key: \"addTextblockHacks\",\n value: function addTextblockHacks() {\n var lastChild = this.top.children[this.index - 1],\n parent = this.top;\n while (lastChild instanceof MarkViewDesc) {\n parent = lastChild;\n lastChild = parent.children[parent.children.length - 1];\n }\n if (!lastChild || !(lastChild instanceof TextViewDesc) || /\\n$/.test(lastChild.node.text) || this.view.requiresGeckoHackNode && /\\s$/.test(lastChild.node.text)) {\n if ((safari || chrome) && lastChild && lastChild.dom.contentEditable == \"false\") this.addHackNode(\"IMG\", parent);\n this.addHackNode(\"BR\", this.top);\n }\n }\n }, {\n key: \"addHackNode\",\n value: function addHackNode(nodeName, parent) {\n if (parent == this.top && this.index < parent.children.length && parent.children[this.index].matchesHack(nodeName)) {\n this.index++;\n } else {\n var dom = document.createElement(nodeName);\n if (nodeName == \"IMG\") {\n dom.className = \"ProseMirror-separator\";\n dom.alt = \"\";\n }\n if (nodeName == \"BR\") dom.className = \"ProseMirror-trailingBreak\";\n var hack = new TrailingHackViewDesc(this.top, [], dom, null);\n if (parent != this.top) parent.children.push(hack);else parent.children.splice(this.index++, 0, hack);\n this.changed = true;\n }\n }\n }, {\n key: \"isLocked\",\n value: function isLocked(node) {\n return this.lock && (node == this.lock || node.nodeType == 1 && node.contains(this.lock.parentNode));\n }\n }]);\n return ViewTreeUpdater;\n}();\nfunction preMatch(frag, parentDesc) {\n var curDesc = parentDesc,\n descI = curDesc.children.length;\n var fI = frag.childCount,\n matched = new Map(),\n matches = [];\n outer: while (fI > 0) {\n var desc = void 0;\n for (;;) {\n if (descI) {\n var next = curDesc.children[descI - 1];\n if (next instanceof MarkViewDesc) {\n curDesc = next;\n descI = next.children.length;\n } else {\n desc = next;\n descI--;\n break;\n }\n } else if (curDesc == parentDesc) {\n break outer;\n } else {\n descI = curDesc.parent.children.indexOf(curDesc);\n curDesc = curDesc.parent;\n }\n }\n var node = desc.node;\n if (!node) continue;\n if (node != frag.child(fI - 1)) break;\n --fI;\n matched.set(desc, fI);\n matches.push(desc);\n }\n return {\n index: fI,\n matched: matched,\n matches: matches.reverse()\n };\n}\nfunction compareSide(a, b) {\n return a.type.side - b.type.side;\n}\nfunction iterDeco(parent, deco, onWidget, onNode) {\n var locals = deco.locals(parent),\n offset = 0;\n if (locals.length == 0) {\n for (var i = 0; i < parent.childCount; i++) {\n var child = parent.child(i);\n onNode(child, locals, deco.forChild(offset, child), i);\n offset += child.nodeSize;\n }\n return;\n }\n var decoIndex = 0,\n active = [],\n restNode = null;\n for (var parentIndex = 0;;) {\n var widget = void 0,\n widgets = void 0;\n while (decoIndex < locals.length && locals[decoIndex].to == offset) {\n var next = locals[decoIndex++];\n if (next.widget) {\n if (!widget) widget = next;else (widgets || (widgets = [widget])).push(next);\n }\n }\n if (widget) {\n if (widgets) {\n widgets.sort(compareSide);\n for (var _i2 = 0; _i2 < widgets.length; _i2++) onWidget(widgets[_i2], parentIndex, !!restNode);\n } else {\n onWidget(widget, parentIndex, !!restNode);\n }\n }\n var _child = void 0,\n index = void 0;\n if (restNode) {\n index = -1;\n _child = restNode;\n restNode = null;\n } else if (parentIndex < parent.childCount) {\n index = parentIndex;\n _child = parent.child(parentIndex++);\n } else {\n break;\n }\n for (var _i3 = 0; _i3 < active.length; _i3++) if (active[_i3].to <= offset) active.splice(_i3--, 1);\n while (decoIndex < locals.length && locals[decoIndex].from <= offset && locals[decoIndex].to > offset) active.push(locals[decoIndex++]);\n var end = offset + _child.nodeSize;\n if (_child.isText) {\n var cutAt = end;\n if (decoIndex < locals.length && locals[decoIndex].from < cutAt) cutAt = locals[decoIndex].from;\n for (var _i4 = 0; _i4 < active.length; _i4++) if (active[_i4].to < cutAt) cutAt = active[_i4].to;\n if (cutAt < end) {\n restNode = _child.cut(cutAt - offset);\n _child = _child.cut(0, cutAt - offset);\n end = cutAt;\n index = -1;\n }\n } else {\n while (decoIndex < locals.length && locals[decoIndex].to < end) decoIndex++;\n }\n var outerDeco = _child.isInline && !_child.isLeaf ? active.filter(function (d) {\n return !d.inline;\n }) : active.slice();\n onNode(_child, outerDeco, deco.forChild(offset, _child), index);\n offset = end;\n }\n}\nfunction iosHacks(dom) {\n if (dom.nodeName == \"UL\" || dom.nodeName == \"OL\") {\n var oldCSS = dom.style.cssText;\n dom.style.cssText = oldCSS + \"; list-style: square !important\";\n window.getComputedStyle(dom).listStyle;\n dom.style.cssText = oldCSS;\n }\n}\nfunction findTextInFragment(frag, text, from, to) {\n for (var i = 0, pos = 0; i < frag.childCount && pos <= to;) {\n var child = frag.child(i++),\n childStart = pos;\n pos += child.nodeSize;\n if (!child.isText) continue;\n var str = child.text;\n while (i < frag.childCount) {\n var next = frag.child(i++);\n pos += next.nodeSize;\n if (!next.isText) break;\n str += next.text;\n }\n if (pos >= from) {\n if (pos >= to && str.slice(to - text.length - childStart, to - childStart) == text) return to - text.length;\n var found = childStart < to ? str.lastIndexOf(text, to - childStart - 1) : -1;\n if (found >= 0 && found + text.length + childStart >= from) return childStart + found;\n if (from == to && str.length >= to + text.length - childStart && str.slice(to - childStart, to - childStart + text.length) == text) return to;\n }\n }\n return -1;\n}\nfunction replaceNodes(nodes, from, to, view, replacement) {\n var result = [];\n for (var i = 0, off = 0; i < nodes.length; i++) {\n var child = nodes[i],\n start = off,\n end = off += child.size;\n if (start >= to || end <= from) {\n result.push(child);\n } else {\n if (start < from) result.push(child.slice(0, from - start, view));\n if (replacement) {\n result.push(replacement);\n replacement = undefined;\n }\n if (end > to) result.push(child.slice(to - start, child.size, view));\n }\n }\n return result;\n}\nfunction selectionFromDOM(view) {\n var origin = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n var domSel = view.domSelectionRange(),\n doc = view.state.doc;\n if (!domSel.focusNode) return null;\n var nearestDesc = view.docView.nearestDesc(domSel.focusNode),\n inWidget = nearestDesc && nearestDesc.size == 0;\n var head = view.docView.posFromDOM(domSel.focusNode, domSel.focusOffset, 1);\n if (head < 0) return null;\n var $head = doc.resolve(head),\n anchor,\n selection;\n if (selectionCollapsed(domSel)) {\n anchor = head;\n while (nearestDesc && !nearestDesc.node) nearestDesc = nearestDesc.parent;\n var nearestDescNode = nearestDesc.node;\n if (nearestDesc && nearestDescNode.isAtom && prosemirrorState.NodeSelection.isSelectable(nearestDescNode) && nearestDesc.parent && !(nearestDescNode.isInline && isOnEdge(domSel.focusNode, domSel.focusOffset, nearestDesc.dom))) {\n var pos = nearestDesc.posBefore;\n selection = new prosemirrorState.NodeSelection(head == pos ? $head : doc.resolve(pos));\n }\n } else {\n if (domSel instanceof view.dom.ownerDocument.defaultView.Selection && domSel.rangeCount > 1) {\n var min = head,\n max = head;\n for (var i = 0; i < domSel.rangeCount; i++) {\n var range = domSel.getRangeAt(i);\n min = Math.min(min, view.docView.posFromDOM(range.startContainer, range.startOffset, 1));\n max = Math.max(max, view.docView.posFromDOM(range.endContainer, range.endOffset, -1));\n }\n if (min < 0) return null;\n var _ref3 = max == view.state.selection.anchor ? [max, min] : [min, max];\n var _ref4 = _slicedToArray(_ref3, 2);\n anchor = _ref4[0];\n head = _ref4[1];\n $head = doc.resolve(head);\n } else {\n anchor = view.docView.posFromDOM(domSel.anchorNode, domSel.anchorOffset, 1);\n }\n if (anchor < 0) return null;\n }\n var $anchor = doc.resolve(anchor);\n if (!selection) {\n var bias = origin == \"pointer\" || view.state.selection.head < $head.pos && !inWidget ? 1 : -1;\n selection = selectionBetween(view, $anchor, $head, bias);\n }\n return selection;\n}\nfunction editorOwnsSelection(view) {\n return view.editable ? view.hasFocus() : hasSelection(view) && document.activeElement && document.activeElement.contains(view.dom);\n}\nfunction selectionToDOM(view) {\n var force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var sel = view.state.selection;\n syncNodeSelection(view, sel);\n if (!editorOwnsSelection(view)) return;\n if (!force && view.input.mouseDown && view.input.mouseDown.allowDefault && chrome) {\n var domSel = view.domSelectionRange(),\n curSel = view.domObserver.currentSelection;\n if (domSel.anchorNode && curSel.anchorNode && isEquivalentPosition(domSel.anchorNode, domSel.anchorOffset, curSel.anchorNode, curSel.anchorOffset)) {\n view.input.mouseDown.delayedSelectionSync = true;\n view.domObserver.setCurSelection();\n return;\n }\n }\n view.domObserver.disconnectSelection();\n if (view.cursorWrapper) {\n selectCursorWrapper(view);\n } else {\n var anchor = sel.anchor,\n head = sel.head,\n resetEditableFrom,\n resetEditableTo;\n if (brokenSelectBetweenUneditable && !(sel instanceof prosemirrorState.TextSelection)) {\n if (!sel.$from.parent.inlineContent) resetEditableFrom = temporarilyEditableNear(view, sel.from);\n if (!sel.empty && !sel.$from.parent.inlineContent) resetEditableTo = temporarilyEditableNear(view, sel.to);\n }\n view.docView.setSelection(anchor, head, view.root, force);\n if (brokenSelectBetweenUneditable) {\n if (resetEditableFrom) resetEditable(resetEditableFrom);\n if (resetEditableTo) resetEditable(resetEditableTo);\n }\n if (sel.visible) {\n view.dom.classList.remove(\"ProseMirror-hideselection\");\n } else {\n view.dom.classList.add(\"ProseMirror-hideselection\");\n if (\"onselectionchange\" in document) removeClassOnSelectionChange(view);\n }\n }\n view.domObserver.setCurSelection();\n view.domObserver.connectSelection();\n}\nvar brokenSelectBetweenUneditable = safari || chrome && chrome_version < 63;\nfunction temporarilyEditableNear(view, pos) {\n var _view$docView$domFrom3 = view.docView.domFromPos(pos, 0),\n node = _view$docView$domFrom3.node,\n offset = _view$docView$domFrom3.offset;\n var after = offset < node.childNodes.length ? node.childNodes[offset] : null;\n var before = offset ? node.childNodes[offset - 1] : null;\n if (safari && after && after.contentEditable == \"false\") return setEditable(after);\n if ((!after || after.contentEditable == \"false\") && (!before || before.contentEditable == \"false\")) {\n if (after) return setEditable(after);else if (before) return setEditable(before);\n }\n}\nfunction setEditable(element) {\n element.contentEditable = \"true\";\n if (safari && element.draggable) {\n element.draggable = false;\n element.wasDraggable = true;\n }\n return element;\n}\nfunction resetEditable(element) {\n element.contentEditable = \"false\";\n if (element.wasDraggable) {\n element.draggable = true;\n element.wasDraggable = null;\n }\n}\nfunction removeClassOnSelectionChange(view) {\n var doc = view.dom.ownerDocument;\n doc.removeEventListener(\"selectionchange\", view.input.hideSelectionGuard);\n var domSel = view.domSelectionRange();\n var node = domSel.anchorNode,\n offset = domSel.anchorOffset;\n doc.addEventListener(\"selectionchange\", view.input.hideSelectionGuard = function () {\n if (domSel.anchorNode != node || domSel.anchorOffset != offset) {\n doc.removeEventListener(\"selectionchange\", view.input.hideSelectionGuard);\n setTimeout(function () {\n if (!editorOwnsSelection(view) || view.state.selection.visible) view.dom.classList.remove(\"ProseMirror-hideselection\");\n }, 20);\n }\n });\n}\nfunction selectCursorWrapper(view) {\n var domSel = view.domSelection(),\n range = document.createRange();\n if (!domSel) return;\n var node = view.cursorWrapper.dom,\n img = node.nodeName == \"IMG\";\n if (img) range.setStart(node.parentNode, domIndex(node) + 1);else range.setStart(node, 0);\n range.collapse(true);\n domSel.removeAllRanges();\n domSel.addRange(range);\n if (!img && !view.state.selection.visible && ie && ie_version <= 11) {\n node.disabled = true;\n node.disabled = false;\n }\n}\nfunction syncNodeSelection(view, sel) {\n if (sel instanceof prosemirrorState.NodeSelection) {\n var desc = view.docView.descAt(sel.from);\n if (desc != view.lastSelectedViewDesc) {\n clearNodeSelection(view);\n if (desc) desc.selectNode();\n view.lastSelectedViewDesc = desc;\n }\n } else {\n clearNodeSelection(view);\n }\n}\nfunction clearNodeSelection(view) {\n if (view.lastSelectedViewDesc) {\n if (view.lastSelectedViewDesc.parent) view.lastSelectedViewDesc.deselectNode();\n view.lastSelectedViewDesc = undefined;\n }\n}\nfunction selectionBetween(view, $anchor, $head, bias) {\n return view.someProp(\"createSelectionBetween\", function (f) {\n return f(view, $anchor, $head);\n }) || prosemirrorState.TextSelection.between($anchor, $head, bias);\n}\nfunction hasFocusAndSelection(view) {\n if (view.editable && !view.hasFocus()) return false;\n return hasSelection(view);\n}\nfunction hasSelection(view) {\n var sel = view.domSelectionRange();\n if (!sel.anchorNode) return false;\n try {\n return view.dom.contains(sel.anchorNode.nodeType == 3 ? sel.anchorNode.parentNode : sel.anchorNode) && (view.editable || view.dom.contains(sel.focusNode.nodeType == 3 ? sel.focusNode.parentNode : sel.focusNode));\n } catch (_) {\n return false;\n }\n}\nfunction anchorInRightPlace(view) {\n var anchorDOM = view.docView.domFromPos(view.state.selection.anchor, 0);\n var domSel = view.domSelectionRange();\n return isEquivalentPosition(anchorDOM.node, anchorDOM.offset, domSel.anchorNode, domSel.anchorOffset);\n}\nfunction moveSelectionBlock(state, dir) {\n var _state$selection = state.selection,\n $anchor = _state$selection.$anchor,\n $head = _state$selection.$head;\n var $side = dir > 0 ? $anchor.max($head) : $anchor.min($head);\n var $start = !$side.parent.inlineContent ? $side : $side.depth ? state.doc.resolve(dir > 0 ? $side.after() : $side.before()) : null;\n return $start && prosemirrorState.Selection.findFrom($start, dir);\n}\nfunction apply(view, sel) {\n view.dispatch(view.state.tr.setSelection(sel).scrollIntoView());\n return true;\n}\nfunction selectHorizontally(view, dir, mods) {\n var sel = view.state.selection;\n if (sel instanceof prosemirrorState.TextSelection) {\n if (mods.indexOf(\"s\") > -1) {\n var $head = sel.$head,\n node = $head.textOffset ? null : dir < 0 ? $head.nodeBefore : $head.nodeAfter;\n if (!node || node.isText || !node.isLeaf) return false;\n var $newHead = view.state.doc.resolve($head.pos + node.nodeSize * (dir < 0 ? -1 : 1));\n return apply(view, new prosemirrorState.TextSelection(sel.$anchor, $newHead));\n } else if (!sel.empty) {\n return false;\n } else if (view.endOfTextblock(dir > 0 ? \"forward\" : \"backward\")) {\n var next = moveSelectionBlock(view.state, dir);\n if (next && next instanceof prosemirrorState.NodeSelection) return apply(view, next);\n return false;\n } else if (!(mac && mods.indexOf(\"m\") > -1)) {\n var _$head = sel.$head,\n _node = _$head.textOffset ? null : dir < 0 ? _$head.nodeBefore : _$head.nodeAfter,\n desc;\n if (!_node || _node.isText) return false;\n var nodePos = dir < 0 ? _$head.pos - _node.nodeSize : _$head.pos;\n if (!(_node.isAtom || (desc = view.docView.descAt(nodePos)) && !desc.contentDOM)) return false;\n if (prosemirrorState.NodeSelection.isSelectable(_node)) {\n return apply(view, new prosemirrorState.NodeSelection(dir < 0 ? view.state.doc.resolve(_$head.pos - _node.nodeSize) : _$head));\n } else if (webkit) {\n return apply(view, new prosemirrorState.TextSelection(view.state.doc.resolve(dir < 0 ? nodePos : nodePos + _node.nodeSize)));\n } else {\n return false;\n }\n }\n } else if (sel instanceof prosemirrorState.NodeSelection && sel.node.isInline) {\n return apply(view, new prosemirrorState.TextSelection(dir > 0 ? sel.$to : sel.$from));\n } else {\n var _next = moveSelectionBlock(view.state, dir);\n if (_next) return apply(view, _next);\n return false;\n }\n}\nfunction nodeLen(node) {\n return node.nodeType == 3 ? node.nodeValue.length : node.childNodes.length;\n}\nfunction isIgnorable(dom, dir) {\n var desc = dom.pmViewDesc;\n return desc && desc.size == 0 && (dir < 0 || dom.nextSibling || dom.nodeName != \"BR\");\n}\nfunction skipIgnoredNodes(view, dir) {\n return dir < 0 ? skipIgnoredNodesBefore(view) : skipIgnoredNodesAfter(view);\n}\nfunction skipIgnoredNodesBefore(view) {\n var sel = view.domSelectionRange();\n var node = sel.focusNode,\n offset = sel.focusOffset;\n if (!node) return;\n var moveNode,\n moveOffset,\n force = false;\n if (gecko && node.nodeType == 1 && offset < nodeLen(node) && isIgnorable(node.childNodes[offset], -1)) force = true;\n for (;;) {\n if (offset > 0) {\n if (node.nodeType != 1) {\n break;\n } else {\n var before = node.childNodes[offset - 1];\n if (isIgnorable(before, -1)) {\n moveNode = node;\n moveOffset = --offset;\n } else if (before.nodeType == 3) {\n node = before;\n offset = node.nodeValue.length;\n } else break;\n }\n } else if (isBlockNode(node)) {\n break;\n } else {\n var prev = node.previousSibling;\n while (prev && isIgnorable(prev, -1)) {\n moveNode = node.parentNode;\n moveOffset = domIndex(prev);\n prev = prev.previousSibling;\n }\n if (!prev) {\n node = node.parentNode;\n if (node == view.dom) break;\n offset = 0;\n } else {\n node = prev;\n offset = nodeLen(node);\n }\n }\n }\n if (force) setSelFocus(view, node, offset);else if (moveNode) setSelFocus(view, moveNode, moveOffset);\n}\nfunction skipIgnoredNodesAfter(view) {\n var sel = view.domSelectionRange();\n var node = sel.focusNode,\n offset = sel.focusOffset;\n if (!node) return;\n var len = nodeLen(node);\n var moveNode, moveOffset;\n for (;;) {\n if (offset < len) {\n if (node.nodeType != 1) break;\n var after = node.childNodes[offset];\n if (isIgnorable(after, 1)) {\n moveNode = node;\n moveOffset = ++offset;\n } else break;\n } else if (isBlockNode(node)) {\n break;\n } else {\n var next = node.nextSibling;\n while (next && isIgnorable(next, 1)) {\n moveNode = next.parentNode;\n moveOffset = domIndex(next) + 1;\n next = next.nextSibling;\n }\n if (!next) {\n node = node.parentNode;\n if (node == view.dom) break;\n offset = len = 0;\n } else {\n node = next;\n offset = 0;\n len = nodeLen(node);\n }\n }\n }\n if (moveNode) setSelFocus(view, moveNode, moveOffset);\n}\nfunction isBlockNode(dom) {\n var desc = dom.pmViewDesc;\n return desc && desc.node && desc.node.isBlock;\n}\nfunction textNodeAfter(node, offset) {\n while (node && offset == node.childNodes.length && !hasBlockDesc(node)) {\n offset = domIndex(node) + 1;\n node = node.parentNode;\n }\n while (node && offset < node.childNodes.length) {\n var next = node.childNodes[offset];\n if (next.nodeType == 3) return next;\n if (next.nodeType == 1 && next.contentEditable == \"false\") break;\n node = next;\n offset = 0;\n }\n}\nfunction textNodeBefore(node, offset) {\n while (node && !offset && !hasBlockDesc(node)) {\n offset = domIndex(node);\n node = node.parentNode;\n }\n while (node && offset) {\n var next = node.childNodes[offset - 1];\n if (next.nodeType == 3) return next;\n if (next.nodeType == 1 && next.contentEditable == \"false\") break;\n node = next;\n offset = node.childNodes.length;\n }\n}\nfunction setSelFocus(view, node, offset) {\n if (node.nodeType != 3) {\n var before, after;\n if (after = textNodeAfter(node, offset)) {\n node = after;\n offset = 0;\n } else if (before = textNodeBefore(node, offset)) {\n node = before;\n offset = before.nodeValue.length;\n }\n }\n var sel = view.domSelection();\n if (!sel) return;\n if (selectionCollapsed(sel)) {\n var range = document.createRange();\n range.setEnd(node, offset);\n range.setStart(node, offset);\n sel.removeAllRanges();\n sel.addRange(range);\n } else if (sel.extend) {\n sel.extend(node, offset);\n }\n view.domObserver.setCurSelection();\n var state = view.state;\n setTimeout(function () {\n if (view.state == state) selectionToDOM(view);\n }, 50);\n}\nfunction findDirection(view, pos) {\n var $pos = view.state.doc.resolve(pos);\n if (!(chrome || windows) && $pos.parent.inlineContent) {\n var coords = view.coordsAtPos(pos);\n if (pos > $pos.start()) {\n var before = view.coordsAtPos(pos - 1);\n var mid = (before.top + before.bottom) / 2;\n if (mid > coords.top && mid < coords.bottom && Math.abs(before.left - coords.left) > 1) return before.left < coords.left ? \"ltr\" : \"rtl\";\n }\n if (pos < $pos.end()) {\n var after = view.coordsAtPos(pos + 1);\n var _mid = (after.top + after.bottom) / 2;\n if (_mid > coords.top && _mid < coords.bottom && Math.abs(after.left - coords.left) > 1) return after.left > coords.left ? \"ltr\" : \"rtl\";\n }\n }\n var computed = getComputedStyle(view.dom).direction;\n return computed == \"rtl\" ? \"rtl\" : \"ltr\";\n}\nfunction selectVertically(view, dir, mods) {\n var sel = view.state.selection;\n if (sel instanceof prosemirrorState.TextSelection && !sel.empty || mods.indexOf(\"s\") > -1) return false;\n if (mac && mods.indexOf(\"m\") > -1) return false;\n var $from = sel.$from,\n $to = sel.$to;\n if (!$from.parent.inlineContent || view.endOfTextblock(dir < 0 ? \"up\" : \"down\")) {\n var next = moveSelectionBlock(view.state, dir);\n if (next && next instanceof prosemirrorState.NodeSelection) return apply(view, next);\n }\n if (!$from.parent.inlineContent) {\n var side = dir < 0 ? $from : $to;\n var beyond = sel instanceof prosemirrorState.AllSelection ? prosemirrorState.Selection.near(side, dir) : prosemirrorState.Selection.findFrom(side, dir);\n return beyond ? apply(view, beyond) : false;\n }\n return false;\n}\nfunction stopNativeHorizontalDelete(view, dir) {\n if (!(view.state.selection instanceof prosemirrorState.TextSelection)) return true;\n var _view$state$selection2 = view.state.selection,\n $head = _view$state$selection2.$head,\n $anchor = _view$state$selection2.$anchor,\n empty = _view$state$selection2.empty;\n if (!$head.sameParent($anchor)) return true;\n if (!empty) return false;\n if (view.endOfTextblock(dir > 0 ? \"forward\" : \"backward\")) return true;\n var nextNode = !$head.textOffset && (dir < 0 ? $head.nodeBefore : $head.nodeAfter);\n if (nextNode && !nextNode.isText) {\n var tr = view.state.tr;\n if (dir < 0) tr[\"delete\"]($head.pos - nextNode.nodeSize, $head.pos);else tr[\"delete\"]($head.pos, $head.pos + nextNode.nodeSize);\n view.dispatch(tr);\n return true;\n }\n return false;\n}\nfunction switchEditable(view, node, state) {\n view.domObserver.stop();\n node.contentEditable = state;\n view.domObserver.start();\n}\nfunction safariDownArrowBug(view) {\n if (!safari || view.state.selection.$head.parentOffset > 0) return false;\n var _view$domSelectionRan3 = view.domSelectionRange(),\n focusNode = _view$domSelectionRan3.focusNode,\n focusOffset = _view$domSelectionRan3.focusOffset;\n if (focusNode && focusNode.nodeType == 1 && focusOffset == 0 && focusNode.firstChild && focusNode.firstChild.contentEditable == \"false\") {\n var child = focusNode.firstChild;\n switchEditable(view, child, \"true\");\n setTimeout(function () {\n return switchEditable(view, child, \"false\");\n }, 20);\n }\n return false;\n}\nfunction getMods(event) {\n var result = \"\";\n if (event.ctrlKey) result += \"c\";\n if (event.metaKey) result += \"m\";\n if (event.altKey) result += \"a\";\n if (event.shiftKey) result += \"s\";\n return result;\n}\nfunction captureKeyDown(view, event) {\n var code = event.keyCode,\n mods = getMods(event);\n if (code == 8 || mac && code == 72 && mods == \"c\") {\n return stopNativeHorizontalDelete(view, -1) || skipIgnoredNodes(view, -1);\n } else if (code == 46 && !event.shiftKey || mac && code == 68 && mods == \"c\") {\n return stopNativeHorizontalDelete(view, 1) || skipIgnoredNodes(view, 1);\n } else if (code == 13 || code == 27) {\n return true;\n } else if (code == 37 || mac && code == 66 && mods == \"c\") {\n var dir = code == 37 ? findDirection(view, view.state.selection.from) == \"ltr\" ? -1 : 1 : -1;\n return selectHorizontally(view, dir, mods) || skipIgnoredNodes(view, dir);\n } else if (code == 39 || mac && code == 70 && mods == \"c\") {\n var _dir = code == 39 ? findDirection(view, view.state.selection.from) == \"ltr\" ? 1 : -1 : 1;\n return selectHorizontally(view, _dir, mods) || skipIgnoredNodes(view, _dir);\n } else if (code == 38 || mac && code == 80 && mods == \"c\") {\n return selectVertically(view, -1, mods) || skipIgnoredNodes(view, -1);\n } else if (code == 40 || mac && code == 78 && mods == \"c\") {\n return safariDownArrowBug(view) || selectVertically(view, 1, mods) || skipIgnoredNodes(view, 1);\n } else if (mods == (mac ? \"m\" : \"c\") && (code == 66 || code == 73 || code == 89 || code == 90)) {\n return true;\n }\n return false;\n}\nfunction serializeForClipboard(view, slice) {\n view.someProp(\"transformCopied\", function (f) {\n slice = f(slice, view);\n });\n var context = [],\n _slice = slice,\n content = _slice.content,\n openStart = _slice.openStart,\n openEnd = _slice.openEnd;\n while (openStart > 1 && openEnd > 1 && content.childCount == 1 && content.firstChild.childCount == 1) {\n openStart--;\n openEnd--;\n var node = content.firstChild;\n context.push(node.type.name, node.attrs != node.type.defaultAttrs ? node.attrs : null);\n content = node.content;\n }\n var serializer = view.someProp(\"clipboardSerializer\") || prosemirrorModel.DOMSerializer.fromSchema(view.state.schema);\n var doc = detachedDoc(),\n wrap = doc.createElement(\"div\");\n wrap.appendChild(serializer.serializeFragment(content, {\n document: doc\n }));\n var firstChild = wrap.firstChild,\n needsWrap,\n wrappers = 0;\n while (firstChild && firstChild.nodeType == 1 && (needsWrap = wrapMap[firstChild.nodeName.toLowerCase()])) {\n for (var i = needsWrap.length - 1; i >= 0; i--) {\n var wrapper = doc.createElement(needsWrap[i]);\n while (wrap.firstChild) wrapper.appendChild(wrap.firstChild);\n wrap.appendChild(wrapper);\n wrappers++;\n }\n firstChild = wrap.firstChild;\n }\n if (firstChild && firstChild.nodeType == 1) firstChild.setAttribute(\"data-pm-slice\", \"\".concat(openStart, \" \").concat(openEnd).concat(wrappers ? \" -\".concat(wrappers) : \"\", \" \").concat(JSON.stringify(context)));\n var text = view.someProp(\"clipboardTextSerializer\", function (f) {\n return f(slice, view);\n }) || slice.content.textBetween(0, slice.content.size, \"\\n\\n\");\n return {\n dom: wrap,\n text: text,\n slice: slice\n };\n}\nfunction parseFromClipboard(view, text, html, plainText, $context) {\n var inCode = $context.parent.type.spec.code;\n var dom, slice;\n if (!html && !text) return null;\n var asText = text && (plainText || inCode || !html);\n if (asText) {\n view.someProp(\"transformPastedText\", function (f) {\n text = f(text, inCode || plainText, view);\n });\n if (inCode) return text ? new prosemirrorModel.Slice(prosemirrorModel.Fragment.from(view.state.schema.text(text.replace(/\\r\\n?/g, \"\\n\"))), 0, 0) : prosemirrorModel.Slice.empty;\n var parsed = view.someProp(\"clipboardTextParser\", function (f) {\n return f(text, $context, plainText, view);\n });\n if (parsed) {\n slice = parsed;\n } else {\n var marks = $context.marks();\n var schema = view.state.schema,\n serializer = prosemirrorModel.DOMSerializer.fromSchema(schema);\n dom = document.createElement(\"div\");\n text.split(/(?:\\r\\n?|\\n)+/).forEach(function (block) {\n var p = dom.appendChild(document.createElement(\"p\"));\n if (block) p.appendChild(serializer.serializeNode(schema.text(block, marks)));\n });\n }\n } else {\n view.someProp(\"transformPastedHTML\", function (f) {\n html = f(html, view);\n });\n dom = readHTML(html);\n if (webkit) restoreReplacedSpaces(dom);\n }\n var contextNode = dom && dom.querySelector(\"[data-pm-slice]\");\n var sliceData = contextNode && /^(\\d+) (\\d+)(?: -(\\d+))? (.*)/.exec(contextNode.getAttribute(\"data-pm-slice\") || \"\");\n if (sliceData && sliceData[3]) for (var i = +sliceData[3]; i > 0; i--) {\n var child = dom.firstChild;\n while (child && child.nodeType != 1) child = child.nextSibling;\n if (!child) break;\n dom = child;\n }\n if (!slice) {\n var parser = view.someProp(\"clipboardParser\") || view.someProp(\"domParser\") || prosemirrorModel.DOMParser.fromSchema(view.state.schema);\n slice = parser.parseSlice(dom, {\n preserveWhitespace: !!(asText || sliceData),\n context: $context,\n ruleFromNode: function ruleFromNode(dom) {\n if (dom.nodeName == \"BR\" && !dom.nextSibling && dom.parentNode && !inlineParents.test(dom.parentNode.nodeName)) return {\n ignore: true\n };\n return null;\n }\n });\n }\n if (sliceData) {\n slice = addContext(closeSlice(slice, +sliceData[1], +sliceData[2]), sliceData[4]);\n } else {\n slice = prosemirrorModel.Slice.maxOpen(normalizeSiblings(slice.content, $context), true);\n if (slice.openStart || slice.openEnd) {\n var openStart = 0,\n openEnd = 0;\n for (var node = slice.content.firstChild; openStart < slice.openStart && !node.type.spec.isolating; openStart++, node = node.firstChild) {}\n for (var _node2 = slice.content.lastChild; openEnd < slice.openEnd && !_node2.type.spec.isolating; openEnd++, _node2 = _node2.lastChild) {}\n slice = closeSlice(slice, openStart, openEnd);\n }\n }\n view.someProp(\"transformPasted\", function (f) {\n slice = f(slice, view);\n });\n return slice;\n}\nvar inlineParents = /^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;\nfunction normalizeSiblings(fragment, $context) {\n if (fragment.childCount < 2) return fragment;\n var _loop = function _loop() {\n var parent = $context.node(d);\n var match = parent.contentMatchAt($context.index(d));\n var lastWrap,\n result = [];\n fragment.forEach(function (node) {\n if (!result) return;\n var wrap = match.findWrapping(node.type),\n inLast;\n if (!wrap) return result = null;\n if (inLast = result.length && lastWrap.length && addToSibling(wrap, lastWrap, node, result[result.length - 1], 0)) {\n result[result.length - 1] = inLast;\n } else {\n if (result.length) result[result.length - 1] = closeRight(result[result.length - 1], lastWrap.length);\n var wrapped = withWrappers(node, wrap);\n result.push(wrapped);\n match = match.matchType(wrapped.type);\n lastWrap = wrap;\n }\n });\n if (result) return {\n v: prosemirrorModel.Fragment.from(result)\n };\n },\n _ret;\n for (var d = $context.depth; d >= 0; d--) {\n _ret = _loop();\n if (_ret) return _ret.v;\n }\n return fragment;\n}\nfunction withWrappers(node, wrap) {\n var from = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n for (var i = wrap.length - 1; i >= from; i--) node = wrap[i].create(null, prosemirrorModel.Fragment.from(node));\n return node;\n}\nfunction addToSibling(wrap, lastWrap, node, sibling, depth) {\n if (depth < wrap.length && depth < lastWrap.length && wrap[depth] == lastWrap[depth]) {\n var inner = addToSibling(wrap, lastWrap, node, sibling.lastChild, depth + 1);\n if (inner) return sibling.copy(sibling.content.replaceChild(sibling.childCount - 1, inner));\n var match = sibling.contentMatchAt(sibling.childCount);\n if (match.matchType(depth == wrap.length - 1 ? node.type : wrap[depth + 1])) return sibling.copy(sibling.content.append(prosemirrorModel.Fragment.from(withWrappers(node, wrap, depth + 1))));\n }\n}\nfunction closeRight(node, depth) {\n if (depth == 0) return node;\n var fragment = node.content.replaceChild(node.childCount - 1, closeRight(node.lastChild, depth - 1));\n var fill = node.contentMatchAt(node.childCount).fillBefore(prosemirrorModel.Fragment.empty, true);\n return node.copy(fragment.append(fill));\n}\nfunction closeRange(fragment, side, from, to, depth, openEnd) {\n var node = side < 0 ? fragment.firstChild : fragment.lastChild,\n inner = node.content;\n if (fragment.childCount > 1) openEnd = 0;\n if (depth < to - 1) inner = closeRange(inner, side, from, to, depth + 1, openEnd);\n if (depth >= from) inner = side < 0 ? node.contentMatchAt(0).fillBefore(inner, openEnd <= depth).append(inner) : inner.append(node.contentMatchAt(node.childCount).fillBefore(prosemirrorModel.Fragment.empty, true));\n return fragment.replaceChild(side < 0 ? 0 : fragment.childCount - 1, node.copy(inner));\n}\nfunction closeSlice(slice, openStart, openEnd) {\n if (openStart < slice.openStart) slice = new prosemirrorModel.Slice(closeRange(slice.content, -1, openStart, slice.openStart, 0, slice.openEnd), openStart, slice.openEnd);\n if (openEnd < slice.openEnd) slice = new prosemirrorModel.Slice(closeRange(slice.content, 1, openEnd, slice.openEnd, 0, 0), slice.openStart, openEnd);\n return slice;\n}\nvar wrapMap = {\n thead: [\"table\"],\n tbody: [\"table\"],\n tfoot: [\"table\"],\n caption: [\"table\"],\n colgroup: [\"table\"],\n col: [\"table\", \"colgroup\"],\n tr: [\"table\", \"tbody\"],\n td: [\"table\", \"tbody\", \"tr\"],\n th: [\"table\", \"tbody\", \"tr\"]\n};\nvar _detachedDoc = null;\nfunction detachedDoc() {\n return _detachedDoc || (_detachedDoc = document.implementation.createHTMLDocument(\"title\"));\n}\nfunction maybeWrapTrusted(html) {\n var trustedTypes = window.trustedTypes;\n if (!trustedTypes) return html;\n return trustedTypes.createPolicy(\"detachedDocument\", {\n createHTML: function createHTML(s) {\n return s;\n }\n }).createHTML(html);\n}\nfunction readHTML(html) {\n var metas = /^(\\s*<meta [^>]*>)*/.exec(html);\n if (metas) html = html.slice(metas[0].length);\n var elt = detachedDoc().createElement(\"div\");\n var firstTag = /<([a-z][^>\\s]+)/i.exec(html),\n wrap;\n if (wrap = firstTag && wrapMap[firstTag[1].toLowerCase()]) html = wrap.map(function (n) {\n return \"<\" + n + \">\";\n }).join(\"\") + html + wrap.map(function (n) {\n return \"</\" + n + \">\";\n }).reverse().join(\"\");\n elt.innerHTML = maybeWrapTrusted(html);\n if (wrap) for (var i = 0; i < wrap.length; i++) elt = elt.querySelector(wrap[i]) || elt;\n return elt;\n}\nfunction restoreReplacedSpaces(dom) {\n var nodes = dom.querySelectorAll(chrome ? \"span:not([class]):not([style])\" : \"span.Apple-converted-space\");\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n if (node.childNodes.length == 1 && node.textContent == \"\\xA0\" && node.parentNode) node.parentNode.replaceChild(dom.ownerDocument.createTextNode(\" \"), node);\n }\n}\nfunction addContext(slice, context) {\n if (!slice.size) return slice;\n var schema = slice.content.firstChild.type.schema,\n array;\n try {\n array = JSON.parse(context);\n } catch (e) {\n return slice;\n }\n var content = slice.content,\n openStart = slice.openStart,\n openEnd = slice.openEnd;\n for (var i = array.length - 2; i >= 0; i -= 2) {\n var type = schema.nodes[array[i]];\n if (!type || type.hasRequiredAttrs()) break;\n content = prosemirrorModel.Fragment.from(type.create(array[i + 1], content));\n openStart++;\n openEnd++;\n }\n return new prosemirrorModel.Slice(content, openStart, openEnd);\n}\nvar handlers = {};\nvar editHandlers = {};\nvar passiveHandlers = {\n touchstart: true,\n touchmove: true\n};\nvar InputState = _createClass(function InputState() {\n _classCallCheck(this, InputState);\n this.shiftKey = false;\n this.mouseDown = null;\n this.lastKeyCode = null;\n this.lastKeyCodeTime = 0;\n this.lastClick = {\n time: 0,\n x: 0,\n y: 0,\n type: \"\"\n };\n this.lastSelectionOrigin = null;\n this.lastSelectionTime = 0;\n this.lastIOSEnter = 0;\n this.lastIOSEnterFallbackTimeout = -1;\n this.lastFocus = 0;\n this.lastTouch = 0;\n this.lastAndroidDelete = 0;\n this.composing = false;\n this.compositionNode = null;\n this.composingTimeout = -1;\n this.compositionNodes = [];\n this.compositionEndedAt = -2e8;\n this.compositionID = 1;\n this.compositionPendingChanges = 0;\n this.domChangeCount = 0;\n this.eventHandlers = Object.create(null);\n this.hideSelectionGuard = null;\n});\nfunction initInput(view) {\n var _loop2 = function _loop2() {\n var handler = handlers[event];\n view.dom.addEventListener(event, view.input.eventHandlers[event] = function (event) {\n if (eventBelongsToView(view, event) && !runCustomHandler(view, event) && (view.editable || !(event.type in editHandlers))) handler(view, event);\n }, passiveHandlers[event] ? {\n passive: true\n } : undefined);\n };\n for (var event in handlers) {\n _loop2();\n }\n if (safari) view.dom.addEventListener(\"input\", function () {\n return null;\n });\n ensureListeners(view);\n}\nfunction setSelectionOrigin(view, origin) {\n view.input.lastSelectionOrigin = origin;\n view.input.lastSelectionTime = Date.now();\n}\nfunction destroyInput(view) {\n view.domObserver.stop();\n for (var type in view.input.eventHandlers) view.dom.removeEventListener(type, view.input.eventHandlers[type]);\n clearTimeout(view.input.composingTimeout);\n clearTimeout(view.input.lastIOSEnterFallbackTimeout);\n}\nfunction ensureListeners(view) {\n view.someProp(\"handleDOMEvents\", function (currentHandlers) {\n for (var type in currentHandlers) if (!view.input.eventHandlers[type]) view.dom.addEventListener(type, view.input.eventHandlers[type] = function (event) {\n return runCustomHandler(view, event);\n });\n });\n}\nfunction runCustomHandler(view, event) {\n return view.someProp(\"handleDOMEvents\", function (handlers) {\n var handler = handlers[event.type];\n return handler ? handler(view, event) || event.defaultPrevented : false;\n });\n}\nfunction eventBelongsToView(view, event) {\n if (!event.bubbles) return true;\n if (event.defaultPrevented) return false;\n for (var node = event.target; node != view.dom; node = node.parentNode) if (!node || node.nodeType == 11 || node.pmViewDesc && node.pmViewDesc.stopEvent(event)) return false;\n return true;\n}\nfunction _dispatchEvent(view, event) {\n if (!runCustomHandler(view, event) && handlers[event.type] && (view.editable || !(event.type in editHandlers))) handlers[event.type](view, event);\n}\neditHandlers.keydown = function (view, _event) {\n var event = _event;\n view.input.shiftKey = event.keyCode == 16 || event.shiftKey;\n if (inOrNearComposition(view, event)) return;\n view.input.lastKeyCode = event.keyCode;\n view.input.lastKeyCodeTime = Date.now();\n if (android && chrome && event.keyCode == 13) return;\n if (event.keyCode != 229) view.domObserver.forceFlush();\n if (ios && event.keyCode == 13 && !event.ctrlKey && !event.altKey && !event.metaKey) {\n var now = Date.now();\n view.input.lastIOSEnter = now;\n view.input.lastIOSEnterFallbackTimeout = setTimeout(function () {\n if (view.input.lastIOSEnter == now) {\n view.someProp(\"handleKeyDown\", function (f) {\n return f(view, keyEvent(13, \"Enter\"));\n });\n view.input.lastIOSEnter = 0;\n }\n }, 200);\n } else if (view.someProp(\"handleKeyDown\", function (f) {\n return f(view, event);\n }) || captureKeyDown(view, event)) {\n event.preventDefault();\n } else {\n setSelectionOrigin(view, \"key\");\n }\n};\neditHandlers.keyup = function (view, event) {\n if (event.keyCode == 16) view.input.shiftKey = false;\n};\neditHandlers.keypress = function (view, _event) {\n var event = _event;\n if (inOrNearComposition(view, event) || !event.charCode || event.ctrlKey && !event.altKey || mac && event.metaKey) return;\n if (view.someProp(\"handleKeyPress\", function (f) {\n return f(view, event);\n })) {\n event.preventDefault();\n return;\n }\n var sel = view.state.selection;\n if (!(sel instanceof prosemirrorState.TextSelection) || !sel.$from.sameParent(sel.$to)) {\n var text = String.fromCharCode(event.charCode);\n if (!/[\\r\\n]/.test(text) && !view.someProp(\"handleTextInput\", function (f) {\n return f(view, sel.$from.pos, sel.$to.pos, text);\n })) view.dispatch(view.state.tr.insertText(text).scrollIntoView());\n event.preventDefault();\n }\n};\nfunction eventCoords(event) {\n return {\n left: event.clientX,\n top: event.clientY\n };\n}\nfunction isNear(event, click) {\n var dx = click.x - event.clientX,\n dy = click.y - event.clientY;\n return dx * dx + dy * dy < 100;\n}\nfunction runHandlerOnContext(view, propName, pos, inside, event) {\n if (inside == -1) return false;\n var $pos = view.state.doc.resolve(inside);\n var _loop3 = function _loop3(i) {\n if (view.someProp(propName, function (f) {\n return i > $pos.depth ? f(view, pos, $pos.nodeAfter, $pos.before(i), event, true) : f(view, pos, $pos.node(i), $pos.before(i), event, false);\n })) return {\n v: true\n };\n },\n _ret2;\n for (var i = $pos.depth + 1; i > 0; i--) {\n _ret2 = _loop3(i);\n if (_ret2) return _ret2.v;\n }\n return false;\n}\nfunction updateSelection(view, selection, origin) {\n if (!view.focused) view.focus();\n if (view.state.selection.eq(selection)) return;\n var tr = view.state.tr.setSelection(selection);\n if (origin == \"pointer\") tr.setMeta(\"pointer\", true);\n view.dispatch(tr);\n}\nfunction selectClickedLeaf(view, inside) {\n if (inside == -1) return false;\n var $pos = view.state.doc.resolve(inside),\n node = $pos.nodeAfter;\n if (node && node.isAtom && prosemirrorState.NodeSelection.isSelectable(node)) {\n updateSelection(view, new prosemirrorState.NodeSelection($pos), \"pointer\");\n return true;\n }\n return false;\n}\nfunction selectClickedNode(view, inside) {\n if (inside == -1) return false;\n var sel = view.state.selection,\n selectedNode,\n selectAt;\n if (sel instanceof prosemirrorState.NodeSelection) selectedNode = sel.node;\n var $pos = view.state.doc.resolve(inside);\n for (var i = $pos.depth + 1; i > 0; i--) {\n var node = i > $pos.depth ? $pos.nodeAfter : $pos.node(i);\n if (prosemirrorState.NodeSelection.isSelectable(node)) {\n if (selectedNode && sel.$from.depth > 0 && i >= sel.$from.depth && $pos.before(sel.$from.depth + 1) == sel.$from.pos) selectAt = $pos.before(sel.$from.depth);else selectAt = $pos.before(i);\n break;\n }\n }\n if (selectAt != null) {\n updateSelection(view, prosemirrorState.NodeSelection.create(view.state.doc, selectAt), \"pointer\");\n return true;\n } else {\n return false;\n }\n}\nfunction handleSingleClick(view, pos, inside, event, selectNode) {\n return runHandlerOnContext(view, \"handleClickOn\", pos, inside, event) || view.someProp(\"handleClick\", function (f) {\n return f(view, pos, event);\n }) || (selectNode ? selectClickedNode(view, inside) : selectClickedLeaf(view, inside));\n}\nfunction handleDoubleClick(view, pos, inside, event) {\n return runHandlerOnContext(view, \"handleDoubleClickOn\", pos, inside, event) || view.someProp(\"handleDoubleClick\", function (f) {\n return f(view, pos, event);\n });\n}\nfunction handleTripleClick(view, pos, inside, event) {\n return runHandlerOnContext(view, \"handleTripleClickOn\", pos, inside, event) || view.someProp(\"handleTripleClick\", function (f) {\n return f(view, pos, event);\n }) || defaultTripleClick(view, inside, event);\n}\nfunction defaultTripleClick(view, inside, event) {\n if (event.button != 0) return false;\n var doc = view.state.doc;\n if (inside == -1) {\n if (doc.inlineContent) {\n updateSelection(view, prosemirrorState.TextSelection.create(doc, 0, doc.content.size), \"pointer\");\n return true;\n }\n return false;\n }\n var $pos = doc.resolve(inside);\n for (var i = $pos.depth + 1; i > 0; i--) {\n var node = i > $pos.depth ? $pos.nodeAfter : $pos.node(i);\n var nodePos = $pos.before(i);\n if (node.inlineContent) updateSelection(view, prosemirrorState.TextSelection.create(doc, nodePos + 1, nodePos + 1 + node.content.size), \"pointer\");else if (prosemirrorState.NodeSelection.isSelectable(node)) updateSelection(view, prosemirrorState.NodeSelection.create(doc, nodePos), \"pointer\");else continue;\n return true;\n }\n}\nfunction forceDOMFlush(view) {\n return endComposition(view);\n}\nvar selectNodeModifier = mac ? \"metaKey\" : \"ctrlKey\";\nhandlers.mousedown = function (view, _event) {\n var event = _event;\n view.input.shiftKey = event.shiftKey;\n var flushed = forceDOMFlush(view);\n var now = Date.now(),\n type = \"singleClick\";\n if (now - view.input.lastClick.time < 500 && isNear(event, view.input.lastClick) && !event[selectNodeModifier]) {\n if (view.input.lastClick.type == \"singleClick\") type = \"doubleClick\";else if (view.input.lastClick.type == \"doubleClick\") type = \"tripleClick\";\n }\n view.input.lastClick = {\n time: now,\n x: event.clientX,\n y: event.clientY,\n type: type\n };\n var pos = view.posAtCoords(eventCoords(event));\n if (!pos) return;\n if (type == \"singleClick\") {\n if (view.input.mouseDown) view.input.mouseDown.done();\n view.input.mouseDown = new MouseDown(view, pos, event, !!flushed);\n } else if ((type == \"doubleClick\" ? handleDoubleClick : handleTripleClick)(view, pos.pos, pos.inside, event)) {\n event.preventDefault();\n } else {\n setSelectionOrigin(view, \"pointer\");\n }\n};\nvar MouseDown = function () {\n function MouseDown(view, pos, event, flushed) {\n var _this8 = this;\n _classCallCheck(this, MouseDown);\n this.view = view;\n this.pos = pos;\n this.event = event;\n this.flushed = flushed;\n this.delayedSelectionSync = false;\n this.mightDrag = null;\n this.startDoc = view.state.doc;\n this.selectNode = !!event[selectNodeModifier];\n this.allowDefault = event.shiftKey;\n var targetNode, targetPos;\n if (pos.inside > -1) {\n targetNode = view.state.doc.nodeAt(pos.inside);\n targetPos = pos.inside;\n } else {\n var $pos = view.state.doc.resolve(pos.pos);\n targetNode = $pos.parent;\n targetPos = $pos.depth ? $pos.before() : 0;\n }\n var target = flushed ? null : event.target;\n var targetDesc = target ? view.docView.nearestDesc(target, true) : null;\n this.target = targetDesc && targetDesc.dom.nodeType == 1 ? targetDesc.dom : null;\n var selection = view.state.selection;\n if (event.button == 0 && targetNode.type.spec.draggable && targetNode.type.spec.selectable !== false || selection instanceof prosemirrorState.NodeSelection && selection.from <= targetPos && selection.to > targetPos) this.mightDrag = {\n node: targetNode,\n pos: targetPos,\n addAttr: !!(this.target && !this.target.draggable),\n setUneditable: !!(this.target && gecko && !this.target.hasAttribute(\"contentEditable\"))\n };\n if (this.target && this.mightDrag && (this.mightDrag.addAttr || this.mightDrag.setUneditable)) {\n this.view.domObserver.stop();\n if (this.mightDrag.addAttr) this.target.draggable = true;\n if (this.mightDrag.setUneditable) setTimeout(function () {\n if (_this8.view.input.mouseDown == _this8) _this8.target.setAttribute(\"contentEditable\", \"false\");\n }, 20);\n this.view.domObserver.start();\n }\n view.root.addEventListener(\"mouseup\", this.up = this.up.bind(this));\n view.root.addEventListener(\"mousemove\", this.move = this.move.bind(this));\n setSelectionOrigin(view, \"pointer\");\n }\n _createClass(MouseDown, [{\n key: \"done\",\n value: function done() {\n var _this9 = this;\n this.view.root.removeEventListener(\"mouseup\", this.up);\n this.view.root.removeEventListener(\"mousemove\", this.move);\n if (this.mightDrag && this.target) {\n this.view.domObserver.stop();\n if (this.mightDrag.addAttr) this.target.removeAttribute(\"draggable\");\n if (this.mightDrag.setUneditable) this.target.removeAttribute(\"contentEditable\");\n this.view.domObserver.start();\n }\n if (this.delayedSelectionSync) setTimeout(function () {\n return selectionToDOM(_this9.view);\n });\n this.view.input.mouseDown = null;\n }\n }, {\n key: \"up\",\n value: function up(event) {\n this.done();\n if (!this.view.dom.contains(event.target)) return;\n var pos = this.pos;\n if (this.view.state.doc != this.startDoc) pos = this.view.posAtCoords(eventCoords(event));\n this.updateAllowDefault(event);\n if (this.allowDefault || !pos) {\n setSelectionOrigin(this.view, \"pointer\");\n } else if (handleSingleClick(this.view, pos.pos, pos.inside, event, this.selectNode)) {\n event.preventDefault();\n } else if (event.button == 0 && (this.flushed || safari && this.mightDrag && !this.mightDrag.node.isAtom || chrome && !this.view.state.selection.visible && Math.min(Math.abs(pos.pos - this.view.state.selection.from), Math.abs(pos.pos - this.view.state.selection.to)) <= 2)) {\n updateSelection(this.view, prosemirrorState.Selection.near(this.view.state.doc.resolve(pos.pos)), \"pointer\");\n event.preventDefault();\n } else {\n setSelectionOrigin(this.view, \"pointer\");\n }\n }\n }, {\n key: \"move\",\n value: function move(event) {\n this.updateAllowDefault(event);\n setSelectionOrigin(this.view, \"pointer\");\n if (event.buttons == 0) this.done();\n }\n }, {\n key: \"updateAllowDefault\",\n value: function updateAllowDefault(event) {\n if (!this.allowDefault && (Math.abs(this.event.x - event.clientX) > 4 || Math.abs(this.event.y - event.clientY) > 4)) this.allowDefault = true;\n }\n }]);\n return MouseDown;\n}();\nhandlers.touchstart = function (view) {\n view.input.lastTouch = Date.now();\n forceDOMFlush(view);\n setSelectionOrigin(view, \"pointer\");\n};\nhandlers.touchmove = function (view) {\n view.input.lastTouch = Date.now();\n setSelectionOrigin(view, \"pointer\");\n};\nhandlers.contextmenu = function (view) {\n return forceDOMFlush(view);\n};\nfunction inOrNearComposition(view, event) {\n if (view.composing) return true;\n if (safari && Math.abs(event.timeStamp - view.input.compositionEndedAt) < 500) {\n view.input.compositionEndedAt = -2e8;\n return true;\n }\n return false;\n}\nvar timeoutComposition = android ? 5000 : -1;\neditHandlers.compositionstart = editHandlers.compositionupdate = function (view) {\n if (!view.composing) {\n view.domObserver.flush();\n var state = view.state,\n $pos = state.selection.$to;\n if (state.selection instanceof prosemirrorState.TextSelection && (state.storedMarks || !$pos.textOffset && $pos.parentOffset && $pos.nodeBefore.marks.some(function (m) {\n return m.type.spec.inclusive === false;\n }))) {\n view.markCursor = view.state.storedMarks || $pos.marks();\n endComposition(view, true);\n view.markCursor = null;\n } else {\n endComposition(view, !state.selection.empty);\n if (gecko && state.selection.empty && $pos.parentOffset && !$pos.textOffset && $pos.nodeBefore.marks.length) {\n var sel = view.domSelectionRange();\n for (var node = sel.focusNode, offset = sel.focusOffset; node && node.nodeType == 1 && offset != 0;) {\n var before = offset < 0 ? node.lastChild : node.childNodes[offset - 1];\n if (!before) break;\n if (before.nodeType == 3) {\n var _sel = view.domSelection();\n if (_sel) _sel.collapse(before, before.nodeValue.length);\n break;\n } else {\n node = before;\n offset = -1;\n }\n }\n }\n }\n view.input.composing = true;\n }\n scheduleComposeEnd(view, timeoutComposition);\n};\neditHandlers.compositionend = function (view, event) {\n if (view.composing) {\n view.input.composing = false;\n view.input.compositionEndedAt = event.timeStamp;\n view.input.compositionPendingChanges = view.domObserver.pendingRecords().length ? view.input.compositionID : 0;\n view.input.compositionNode = null;\n if (view.input.compositionPendingChanges) Promise.resolve().then(function () {\n return view.domObserver.flush();\n });\n view.input.compositionID++;\n scheduleComposeEnd(view, 20);\n }\n};\nfunction scheduleComposeEnd(view, delay) {\n clearTimeout(view.input.composingTimeout);\n if (delay > -1) view.input.composingTimeout = setTimeout(function () {\n return endComposition(view);\n }, delay);\n}\nfunction clearComposition(view) {\n if (view.composing) {\n view.input.composing = false;\n view.input.compositionEndedAt = timestampFromCustomEvent();\n }\n while (view.input.compositionNodes.length > 0) view.input.compositionNodes.pop().markParentsDirty();\n}\nfunction findCompositionNode(view) {\n var sel = view.domSelectionRange();\n if (!sel.focusNode) return null;\n var textBefore = textNodeBefore$1(sel.focusNode, sel.focusOffset);\n var textAfter = textNodeAfter$1(sel.focusNode, sel.focusOffset);\n if (textBefore && textAfter && textBefore != textAfter) {\n var descAfter = textAfter.pmViewDesc,\n lastChanged = view.domObserver.lastChangedTextNode;\n if (textBefore == lastChanged || textAfter == lastChanged) return lastChanged;\n if (!descAfter || !descAfter.isText(textAfter.nodeValue)) {\n return textAfter;\n } else if (view.input.compositionNode == textAfter) {\n var descBefore = textBefore.pmViewDesc;\n if (!(!descBefore || !descBefore.isText(textBefore.nodeValue))) return textAfter;\n }\n }\n return textBefore || textAfter;\n}\nfunction timestampFromCustomEvent() {\n var event = document.createEvent(\"Event\");\n event.initEvent(\"event\", true, true);\n return event.timeStamp;\n}\nfunction endComposition(view) {\n var restarting = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n if (android && view.domObserver.flushingSoon >= 0) return;\n view.domObserver.forceFlush();\n clearComposition(view);\n if (restarting || view.docView && view.docView.dirty) {\n var sel = selectionFromDOM(view);\n if (sel && !sel.eq(view.state.selection)) view.dispatch(view.state.tr.setSelection(sel));else if ((view.markCursor || restarting) && !view.state.selection.empty) view.dispatch(view.state.tr.deleteSelection());else view.updateState(view.state);\n return true;\n }\n return false;\n}\nfunction captureCopy(view, dom) {\n if (!view.dom.parentNode) return;\n var wrap = view.dom.parentNode.appendChild(document.createElement(\"div\"));\n wrap.appendChild(dom);\n wrap.style.cssText = \"position: fixed; left: -10000px; top: 10px\";\n var sel = getSelection(),\n range = document.createRange();\n range.selectNodeContents(dom);\n view.dom.blur();\n sel.removeAllRanges();\n sel.addRange(range);\n setTimeout(function () {\n if (wrap.parentNode) wrap.parentNode.removeChild(wrap);\n view.focus();\n }, 50);\n}\nvar brokenClipboardAPI = ie && ie_version < 15 || ios && webkit_version < 604;\nhandlers.copy = editHandlers.cut = function (view, _event) {\n var event = _event;\n var sel = view.state.selection,\n cut = event.type == \"cut\";\n if (sel.empty) return;\n var data = brokenClipboardAPI ? null : event.clipboardData;\n var slice = sel.content(),\n _serializeForClipboar = serializeForClipboard(view, slice),\n dom = _serializeForClipboar.dom,\n text = _serializeForClipboar.text;\n if (data) {\n event.preventDefault();\n data.clearData();\n data.setData(\"text/html\", dom.innerHTML);\n data.setData(\"text/plain\", text);\n } else {\n captureCopy(view, dom);\n }\n if (cut) view.dispatch(view.state.tr.deleteSelection().scrollIntoView().setMeta(\"uiEvent\", \"cut\"));\n};\nfunction sliceSingleNode(slice) {\n return slice.openStart == 0 && slice.openEnd == 0 && slice.content.childCount == 1 ? slice.content.firstChild : null;\n}\nfunction capturePaste(view, event) {\n if (!view.dom.parentNode) return;\n var plainText = view.input.shiftKey || view.state.selection.$from.parent.type.spec.code;\n var target = view.dom.parentNode.appendChild(document.createElement(plainText ? \"textarea\" : \"div\"));\n if (!plainText) target.contentEditable = \"true\";\n target.style.cssText = \"position: fixed; left: -10000px; top: 10px\";\n target.focus();\n var plain = view.input.shiftKey && view.input.lastKeyCode != 45;\n setTimeout(function () {\n view.focus();\n if (target.parentNode) target.parentNode.removeChild(target);\n if (plainText) doPaste(view, target.value, null, plain, event);else doPaste(view, target.textContent, target.innerHTML, plain, event);\n }, 50);\n}\nfunction doPaste(view, text, html, preferPlain, event) {\n var slice = parseFromClipboard(view, text, html, preferPlain, view.state.selection.$from);\n if (view.someProp(\"handlePaste\", function (f) {\n return f(view, event, slice || prosemirrorModel.Slice.empty);\n })) return true;\n if (!slice) return false;\n var singleNode = sliceSingleNode(slice);\n var tr = singleNode ? view.state.tr.replaceSelectionWith(singleNode, preferPlain) : view.state.tr.replaceSelection(slice);\n view.dispatch(tr.scrollIntoView().setMeta(\"paste\", true).setMeta(\"uiEvent\", \"paste\"));\n return true;\n}\nfunction getText(clipboardData) {\n var text = clipboardData.getData(\"text/plain\") || clipboardData.getData(\"Text\");\n if (text) return text;\n var uris = clipboardData.getData(\"text/uri-list\");\n return uris ? uris.replace(/\\r?\\n/g, \" \") : \"\";\n}\neditHandlers.paste = function (view, _event) {\n var event = _event;\n if (view.composing && !android) return;\n var data = brokenClipboardAPI ? null : event.clipboardData;\n var plain = view.input.shiftKey && view.input.lastKeyCode != 45;\n if (data && doPaste(view, getText(data), data.getData(\"text/html\"), plain, event)) event.preventDefault();else capturePaste(view, event);\n};\nvar Dragging = _createClass(function Dragging(slice, move, node) {\n _classCallCheck(this, Dragging);\n this.slice = slice;\n this.move = move;\n this.node = node;\n});\nvar dragCopyModifier = mac ? \"altKey\" : \"ctrlKey\";\nhandlers.dragstart = function (view, _event) {\n var event = _event;\n var mouseDown = view.input.mouseDown;\n if (mouseDown) mouseDown.done();\n if (!event.dataTransfer) return;\n var sel = view.state.selection;\n var pos = sel.empty ? null : view.posAtCoords(eventCoords(event));\n var node;\n if (pos && pos.pos >= sel.from && pos.pos <= (sel instanceof prosemirrorState.NodeSelection ? sel.to - 1 : sel.to)) ;else if (mouseDown && mouseDown.mightDrag) {\n node = prosemirrorState.NodeSelection.create(view.state.doc, mouseDown.mightDrag.pos);\n } else if (event.target && event.target.nodeType == 1) {\n var desc = view.docView.nearestDesc(event.target, true);\n if (desc && desc.node.type.spec.draggable && desc != view.docView) node = prosemirrorState.NodeSelection.create(view.state.doc, desc.posBefore);\n }\n var draggedSlice = (node || view.state.selection).content();\n var _serializeForClipboar2 = serializeForClipboard(view, draggedSlice),\n dom = _serializeForClipboar2.dom,\n text = _serializeForClipboar2.text,\n slice = _serializeForClipboar2.slice;\n if (!event.dataTransfer.files.length || !chrome || chrome_version > 120) event.dataTransfer.clearData();\n event.dataTransfer.setData(brokenClipboardAPI ? \"Text\" : \"text/html\", dom.innerHTML);\n event.dataTransfer.effectAllowed = \"copyMove\";\n if (!brokenClipboardAPI) event.dataTransfer.setData(\"text/plain\", text);\n view.dragging = new Dragging(slice, !event[dragCopyModifier], node);\n};\nhandlers.dragend = function (view) {\n var dragging = view.dragging;\n window.setTimeout(function () {\n if (view.dragging == dragging) view.dragging = null;\n }, 50);\n};\neditHandlers.dragover = editHandlers.dragenter = function (_, e) {\n return e.preventDefault();\n};\neditHandlers.drop = function (view, _event) {\n var event = _event;\n var dragging = view.dragging;\n view.dragging = null;\n if (!event.dataTransfer) return;\n var eventPos = view.posAtCoords(eventCoords(event));\n if (!eventPos) return;\n var $mouse = view.state.doc.resolve(eventPos.pos);\n var slice = dragging && dragging.slice;\n if (slice) {\n view.someProp(\"transformPasted\", function (f) {\n slice = f(slice, view);\n });\n } else {\n slice = parseFromClipboard(view, getText(event.dataTransfer), brokenClipboardAPI ? null : event.dataTransfer.getData(\"text/html\"), false, $mouse);\n }\n var move = !!(dragging && !event[dragCopyModifier]);\n if (view.someProp(\"handleDrop\", function (f) {\n return f(view, event, slice || prosemirrorModel.Slice.empty, move);\n })) {\n event.preventDefault();\n return;\n }\n if (!slice) return;\n event.preventDefault();\n var insertPos = slice ? prosemirrorTransform.dropPoint(view.state.doc, $mouse.pos, slice) : $mouse.pos;\n if (insertPos == null) insertPos = $mouse.pos;\n var tr = view.state.tr;\n if (move) {\n var node = dragging.node;\n if (node) node.replace(tr);else tr.deleteSelection();\n }\n var pos = tr.mapping.map(insertPos);\n var isNode = slice.openStart == 0 && slice.openEnd == 0 && slice.content.childCount == 1;\n var beforeInsert = tr.doc;\n if (isNode) tr.replaceRangeWith(pos, pos, slice.content.firstChild);else tr.replaceRange(pos, pos, slice);\n if (tr.doc.eq(beforeInsert)) return;\n var $pos = tr.doc.resolve(pos);\n if (isNode && prosemirrorState.NodeSelection.isSelectable(slice.content.firstChild) && $pos.nodeAfter && $pos.nodeAfter.sameMarkup(slice.content.firstChild)) {\n tr.setSelection(new prosemirrorState.NodeSelection($pos));\n } else {\n var end = tr.mapping.map(insertPos);\n tr.mapping.maps[tr.mapping.maps.length - 1].forEach(function (_from, _to, _newFrom, newTo) {\n return end = newTo;\n });\n tr.setSelection(selectionBetween(view, $pos, tr.doc.resolve(end)));\n }\n view.focus();\n view.dispatch(tr.setMeta(\"uiEvent\", \"drop\"));\n};\nhandlers.focus = function (view) {\n view.input.lastFocus = Date.now();\n if (!view.focused) {\n view.domObserver.stop();\n view.dom.classList.add(\"ProseMirror-focused\");\n view.domObserver.start();\n view.focused = true;\n setTimeout(function () {\n if (view.docView && view.hasFocus() && !view.domObserver.currentSelection.eq(view.domSelectionRange())) selectionToDOM(view);\n }, 20);\n }\n};\nhandlers.blur = function (view, _event) {\n var event = _event;\n if (view.focused) {\n view.domObserver.stop();\n view.dom.classList.remove(\"ProseMirror-focused\");\n view.domObserver.start();\n if (event.relatedTarget && view.dom.contains(event.relatedTarget)) view.domObserver.currentSelection.clear();\n view.focused = false;\n }\n};\nhandlers.beforeinput = function (view, _event) {\n var event = _event;\n if (chrome && android && event.inputType == \"deleteContentBackward\") {\n view.domObserver.flushSoon();\n var domChangeCount = view.input.domChangeCount;\n setTimeout(function () {\n if (view.input.domChangeCount != domChangeCount) return;\n view.dom.blur();\n view.focus();\n if (view.someProp(\"handleKeyDown\", function (f) {\n return f(view, keyEvent(8, \"Backspace\"));\n })) return;\n var $cursor = view.state.selection.$cursor;\n if ($cursor && $cursor.pos > 0) view.dispatch(view.state.tr[\"delete\"]($cursor.pos - 1, $cursor.pos).scrollIntoView());\n }, 50);\n }\n};\nfor (var prop in editHandlers) handlers[prop] = editHandlers[prop];\nfunction compareObjs(a, b) {\n if (a == b) return true;\n for (var p in a) if (a[p] !== b[p]) return false;\n for (var _p in b) if (!(_p in a)) return false;\n return true;\n}\nvar WidgetType = function () {\n function WidgetType(toDOM, spec) {\n _classCallCheck(this, WidgetType);\n this.toDOM = toDOM;\n this.spec = spec || noSpec;\n this.side = this.spec.side || 0;\n }\n _createClass(WidgetType, [{\n key: \"map\",\n value: function map(mapping, span, offset, oldOffset) {\n var _mapping$mapResult = mapping.mapResult(span.from + oldOffset, this.side < 0 ? -1 : 1),\n pos = _mapping$mapResult.pos,\n deleted = _mapping$mapResult.deleted;\n return deleted ? null : new Decoration(pos - offset, pos - offset, this);\n }\n }, {\n key: \"valid\",\n value: function valid() {\n return true;\n }\n }, {\n key: \"eq\",\n value: function eq(other) {\n return this == other || other instanceof WidgetType && (this.spec.key && this.spec.key == other.spec.key || this.toDOM == other.toDOM && compareObjs(this.spec, other.spec));\n }\n }, {\n key: \"destroy\",\n value: function destroy(node) {\n if (this.spec.destroy) this.spec.destroy(node);\n }\n }]);\n return WidgetType;\n}();\nvar InlineType = function () {\n function InlineType(attrs, spec) {\n _classCallCheck(this, InlineType);\n this.attrs = attrs;\n this.spec = spec || noSpec;\n }\n _createClass(InlineType, [{\n key: \"map\",\n value: function map(mapping, span, offset, oldOffset) {\n var from = mapping.map(span.from + oldOffset, this.spec.inclusiveStart ? -1 : 1) - offset;\n var to = mapping.map(span.to + oldOffset, this.spec.inclusiveEnd ? 1 : -1) - offset;\n return from >= to ? null : new Decoration(from, to, this);\n }\n }, {\n key: \"valid\",\n value: function valid(_, span) {\n return span.from < span.to;\n }\n }, {\n key: \"eq\",\n value: function eq(other) {\n return this == other || other instanceof InlineType && compareObjs(this.attrs, other.attrs) && compareObjs(this.spec, other.spec);\n }\n }, {\n key: \"destroy\",\n value: function destroy() {}\n }], [{\n key: \"is\",\n value: function is(span) {\n return span.type instanceof InlineType;\n }\n }]);\n return InlineType;\n}();\nvar NodeType = function () {\n function NodeType(attrs, spec) {\n _classCallCheck(this, NodeType);\n this.attrs = attrs;\n this.spec = spec || noSpec;\n }\n _createClass(NodeType, [{\n key: \"map\",\n value: function map(mapping, span, offset, oldOffset) {\n var from = mapping.mapResult(span.from + oldOffset, 1);\n if (from.deleted) return null;\n var to = mapping.mapResult(span.to + oldOffset, -1);\n if (to.deleted || to.pos <= from.pos) return null;\n return new Decoration(from.pos - offset, to.pos - offset, this);\n }\n }, {\n key: \"valid\",\n value: function valid(node, span) {\n var _node$content$findInd = node.content.findIndex(span.from),\n index = _node$content$findInd.index,\n offset = _node$content$findInd.offset,\n child;\n return offset == span.from && !(child = node.child(index)).isText && offset + child.nodeSize == span.to;\n }\n }, {\n key: \"eq\",\n value: function eq(other) {\n return this == other || other instanceof NodeType && compareObjs(this.attrs, other.attrs) && compareObjs(this.spec, other.spec);\n }\n }, {\n key: \"destroy\",\n value: function destroy() {}\n }]);\n return NodeType;\n}();\nvar Decoration = function () {\n function Decoration(from, to, type) {\n _classCallCheck(this, Decoration);\n this.from = from;\n this.to = to;\n this.type = type;\n }\n _createClass(Decoration, [{\n key: \"copy\",\n value: function copy(from, to) {\n return new Decoration(from, to, this.type);\n }\n }, {\n key: \"eq\",\n value: function eq(other) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n return this.type.eq(other.type) && this.from + offset == other.from && this.to + offset == other.to;\n }\n }, {\n key: \"map\",\n value: function map(mapping, offset, oldOffset) {\n return this.type.map(mapping, this, offset, oldOffset);\n }\n }, {\n key: \"spec\",\n get: function get() {\n return this.type.spec;\n }\n }, {\n key: \"inline\",\n get: function get() {\n return this.type instanceof InlineType;\n }\n }, {\n key: \"widget\",\n get: function get() {\n return this.type instanceof WidgetType;\n }\n }], [{\n key: \"widget\",\n value: function widget(pos, toDOM, spec) {\n return new Decoration(pos, pos, new WidgetType(toDOM, spec));\n }\n }, {\n key: \"inline\",\n value: function inline(from, to, attrs, spec) {\n return new Decoration(from, to, new InlineType(attrs, spec));\n }\n }, {\n key: \"node\",\n value: function node(from, to, attrs, spec) {\n return new Decoration(from, to, new NodeType(attrs, spec));\n }\n }]);\n return Decoration;\n}();\nvar none = [],\n noSpec = {};\nvar DecorationSet = function () {\n function DecorationSet(local, children) {\n _classCallCheck(this, DecorationSet);\n this.local = local.length ? local : none;\n this.children = children.length ? children : none;\n }\n _createClass(DecorationSet, [{\n key: \"find\",\n value: function find(start, end, predicate) {\n var result = [];\n this.findInner(start == null ? 0 : start, end == null ? 1e9 : end, result, 0, predicate);\n return result;\n }\n }, {\n key: \"findInner\",\n value: function findInner(start, end, result, offset, predicate) {\n for (var i = 0; i < this.local.length; i++) {\n var span = this.local[i];\n if (span.from <= end && span.to >= start && (!predicate || predicate(span.spec))) result.push(span.copy(span.from + offset, span.to + offset));\n }\n for (var _i5 = 0; _i5 < this.children.length; _i5 += 3) {\n if (this.children[_i5] < end && this.children[_i5 + 1] > start) {\n var childOff = this.children[_i5] + 1;\n this.children[_i5 + 2].findInner(start - childOff, end - childOff, result, offset + childOff, predicate);\n }\n }\n }\n }, {\n key: \"map\",\n value: function map(mapping, doc, options) {\n if (this == empty || mapping.maps.length == 0) return this;\n return this.mapInner(mapping, doc, 0, 0, options || noSpec);\n }\n }, {\n key: \"mapInner\",\n value: function mapInner(mapping, node, offset, oldOffset, options) {\n var newLocal;\n for (var i = 0; i < this.local.length; i++) {\n var mapped = this.local[i].map(mapping, offset, oldOffset);\n if (mapped && mapped.type.valid(node, mapped)) (newLocal || (newLocal = [])).push(mapped);else if (options.onRemove) options.onRemove(this.local[i].spec);\n }\n if (this.children.length) return mapChildren(this.children, newLocal || [], mapping, node, offset, oldOffset, options);else return newLocal ? new DecorationSet(newLocal.sort(byPos), none) : empty;\n }\n }, {\n key: \"add\",\n value: function add(doc, decorations) {\n if (!decorations.length) return this;\n if (this == empty) return DecorationSet.create(doc, decorations);\n return this.addInner(doc, decorations, 0);\n }\n }, {\n key: \"addInner\",\n value: function addInner(doc, decorations, offset) {\n var _this10 = this;\n var children,\n childIndex = 0;\n doc.forEach(function (childNode, childOffset) {\n var baseOffset = childOffset + offset,\n found;\n if (!(found = takeSpansForNode(decorations, childNode, baseOffset))) return;\n if (!children) children = _this10.children.slice();\n while (childIndex < children.length && children[childIndex] < childOffset) childIndex += 3;\n if (children[childIndex] == childOffset) children[childIndex + 2] = children[childIndex + 2].addInner(childNode, found, baseOffset + 1);else children.splice(childIndex, 0, childOffset, childOffset + childNode.nodeSize, buildTree(found, childNode, baseOffset + 1, noSpec));\n childIndex += 3;\n });\n var local = moveSpans(childIndex ? withoutNulls(decorations) : decorations, -offset);\n for (var i = 0; i < local.length; i++) if (!local[i].type.valid(doc, local[i])) local.splice(i--, 1);\n return new DecorationSet(local.length ? this.local.concat(local).sort(byPos) : this.local, children || this.children);\n }\n }, {\n key: \"remove\",\n value: function remove(decorations) {\n if (decorations.length == 0 || this == empty) return this;\n return this.removeInner(decorations, 0);\n }\n }, {\n key: \"removeInner\",\n value: function removeInner(decorations, offset) {\n var children = this.children,\n local = this.local;\n for (var i = 0; i < children.length; i += 3) {\n var found = void 0;\n var from = children[i] + offset,\n to = children[i + 1] + offset;\n for (var j = 0, span; j < decorations.length; j++) if (span = decorations[j]) {\n if (span.from > from && span.to < to) {\n decorations[j] = null;\n (found || (found = [])).push(span);\n }\n }\n if (!found) continue;\n if (children == this.children) children = this.children.slice();\n var removed = children[i + 2].removeInner(found, from + 1);\n if (removed != empty) {\n children[i + 2] = removed;\n } else {\n children.splice(i, 3);\n i -= 3;\n }\n }\n if (local.length) for (var _i6 = 0, _span; _i6 < decorations.length; _i6++) if (_span = decorations[_i6]) {\n for (var _j2 = 0; _j2 < local.length; _j2++) if (local[_j2].eq(_span, offset)) {\n if (local == this.local) local = this.local.slice();\n local.splice(_j2--, 1);\n }\n }\n if (children == this.children && local == this.local) return this;\n return local.length || children.length ? new DecorationSet(local, children) : empty;\n }\n }, {\n key: \"forChild\",\n value: function forChild(offset, node) {\n if (this == empty) return this;\n if (node.isLeaf) return DecorationSet.empty;\n var child, local;\n for (var i = 0; i < this.children.length; i += 3) if (this.children[i] >= offset) {\n if (this.children[i] == offset) child = this.children[i + 2];\n break;\n }\n var start = offset + 1,\n end = start + node.content.size;\n for (var _i7 = 0; _i7 < this.local.length; _i7++) {\n var dec = this.local[_i7];\n if (dec.from < end && dec.to > start && dec.type instanceof InlineType) {\n var from = Math.max(start, dec.from) - start,\n to = Math.min(end, dec.to) - start;\n if (from < to) (local || (local = [])).push(dec.copy(from, to));\n }\n }\n if (local) {\n var localSet = new DecorationSet(local.sort(byPos), none);\n return child ? new DecorationGroup([localSet, child]) : localSet;\n }\n return child || empty;\n }\n }, {\n key: \"eq\",\n value: function eq(other) {\n if (this == other) return true;\n if (!(other instanceof DecorationSet) || this.local.length != other.local.length || this.children.length != other.children.length) return false;\n for (var i = 0; i < this.local.length; i++) if (!this.local[i].eq(other.local[i])) return false;\n for (var _i8 = 0; _i8 < this.children.length; _i8 += 3) if (this.children[_i8] != other.children[_i8] || this.children[_i8 + 1] != other.children[_i8 + 1] || !this.children[_i8 + 2].eq(other.children[_i8 + 2])) return false;\n return true;\n }\n }, {\n key: \"locals\",\n value: function locals(node) {\n return removeOverlap(this.localsInner(node));\n }\n }, {\n key: \"localsInner\",\n value: function localsInner(node) {\n if (this == empty) return none;\n if (node.inlineContent || !this.local.some(InlineType.is)) return this.local;\n var result = [];\n for (var i = 0; i < this.local.length; i++) {\n if (!(this.local[i].type instanceof InlineType)) result.push(this.local[i]);\n }\n return result;\n }\n }, {\n key: \"forEachSet\",\n value: function forEachSet(f) {\n f(this);\n }\n }], [{\n key: \"create\",\n value: function create(doc, decorations) {\n return decorations.length ? buildTree(decorations, doc, 0, noSpec) : empty;\n }\n }]);\n return DecorationSet;\n}();\nDecorationSet.empty = new DecorationSet([], []);\nDecorationSet.removeOverlap = removeOverlap;\nvar empty = DecorationSet.empty;\nvar DecorationGroup = function () {\n function DecorationGroup(members) {\n _classCallCheck(this, DecorationGroup);\n this.members = members;\n }\n _createClass(DecorationGroup, [{\n key: \"map\",\n value: function map(mapping, doc) {\n var mappedDecos = this.members.map(function (member) {\n return member.map(mapping, doc, noSpec);\n });\n return DecorationGroup.from(mappedDecos);\n }\n }, {\n key: \"forChild\",\n value: function forChild(offset, child) {\n if (child.isLeaf) return DecorationSet.empty;\n var found = [];\n for (var i = 0; i < this.members.length; i++) {\n var result = this.members[i].forChild(offset, child);\n if (result == empty) continue;\n if (result instanceof DecorationGroup) found = found.concat(result.members);else found.push(result);\n }\n return DecorationGroup.from(found);\n }\n }, {\n key: \"eq\",\n value: function eq(other) {\n if (!(other instanceof DecorationGroup) || other.members.length != this.members.length) return false;\n for (var i = 0; i < this.members.length; i++) if (!this.members[i].eq(other.members[i])) return false;\n return true;\n }\n }, {\n key: \"locals\",\n value: function locals(node) {\n var result,\n sorted = true;\n for (var i = 0; i < this.members.length; i++) {\n var locals = this.members[i].localsInner(node);\n if (!locals.length) continue;\n if (!result) {\n result = locals;\n } else {\n if (sorted) {\n result = result.slice();\n sorted = false;\n }\n for (var j = 0; j < locals.length; j++) result.push(locals[j]);\n }\n }\n return result ? removeOverlap(sorted ? result : result.sort(byPos)) : none;\n }\n }, {\n key: \"forEachSet\",\n value: function forEachSet(f) {\n for (var i = 0; i < this.members.length; i++) this.members[i].forEachSet(f);\n }\n }], [{\n key: \"from\",\n value: function from(members) {\n switch (members.length) {\n case 0:\n return empty;\n case 1:\n return members[0];\n default:\n return new DecorationGroup(members.every(function (m) {\n return m instanceof DecorationSet;\n }) ? members : members.reduce(function (r, m) {\n return r.concat(m instanceof DecorationSet ? m : m.members);\n }, []));\n }\n }\n }]);\n return DecorationGroup;\n}();\nfunction mapChildren(oldChildren, newLocal, mapping, node, offset, oldOffset, options) {\n var children = oldChildren.slice();\n var _loop4 = function _loop4(_baseOffset) {\n var moved = 0;\n mapping.maps[i].forEach(function (oldStart, oldEnd, newStart, newEnd) {\n var dSize = newEnd - newStart - (oldEnd - oldStart);\n for (var _i12 = 0; _i12 < children.length; _i12 += 3) {\n var end = children[_i12 + 1];\n if (end < 0 || oldStart > end + _baseOffset - moved) continue;\n var start = children[_i12] + _baseOffset - moved;\n if (oldEnd >= start) {\n children[_i12 + 1] = oldStart <= start ? -2 : -1;\n } else if (oldStart >= _baseOffset && dSize) {\n children[_i12] += dSize;\n children[_i12 + 1] += dSize;\n }\n }\n moved += dSize;\n });\n _baseOffset = mapping.maps[i].map(_baseOffset, -1);\n baseOffset = _baseOffset;\n };\n for (var i = 0, baseOffset = oldOffset; i < mapping.maps.length; i++) {\n _loop4(baseOffset);\n }\n var mustRebuild = false;\n for (var _i9 = 0; _i9 < children.length; _i9 += 3) if (children[_i9 + 1] < 0) {\n if (children[_i9 + 1] == -2) {\n mustRebuild = true;\n children[_i9 + 1] = -1;\n continue;\n }\n var from = mapping.map(oldChildren[_i9] + oldOffset),\n fromLocal = from - offset;\n if (fromLocal < 0 || fromLocal >= node.content.size) {\n mustRebuild = true;\n continue;\n }\n var to = mapping.map(oldChildren[_i9 + 1] + oldOffset, -1),\n toLocal = to - offset;\n var _node$content$findInd2 = node.content.findIndex(fromLocal),\n index = _node$content$findInd2.index,\n childOffset = _node$content$findInd2.offset;\n var childNode = node.maybeChild(index);\n if (childNode && childOffset == fromLocal && childOffset + childNode.nodeSize == toLocal) {\n var mapped = children[_i9 + 2].mapInner(mapping, childNode, from + 1, oldChildren[_i9] + oldOffset + 1, options);\n if (mapped != empty) {\n children[_i9] = fromLocal;\n children[_i9 + 1] = toLocal;\n children[_i9 + 2] = mapped;\n } else {\n children[_i9 + 1] = -2;\n mustRebuild = true;\n }\n } else {\n mustRebuild = true;\n }\n }\n if (mustRebuild) {\n var decorations = mapAndGatherRemainingDecorations(children, oldChildren, newLocal, mapping, offset, oldOffset, options);\n var built = buildTree(decorations, node, 0, options);\n newLocal = built.local;\n for (var _i10 = 0; _i10 < children.length; _i10 += 3) if (children[_i10 + 1] < 0) {\n children.splice(_i10, 3);\n _i10 -= 3;\n }\n for (var _i11 = 0, j = 0; _i11 < built.children.length; _i11 += 3) {\n var _from2 = built.children[_i11];\n while (j < children.length && children[j] < _from2) j += 3;\n children.splice(j, 0, built.children[_i11], built.children[_i11 + 1], built.children[_i11 + 2]);\n }\n }\n return new DecorationSet(newLocal.sort(byPos), children);\n}\nfunction moveSpans(spans, offset) {\n if (!offset || !spans.length) return spans;\n var result = [];\n for (var i = 0; i < spans.length; i++) {\n var span = spans[i];\n result.push(new Decoration(span.from + offset, span.to + offset, span.type));\n }\n return result;\n}\nfunction mapAndGatherRemainingDecorations(children, oldChildren, decorations, mapping, offset, oldOffset, options) {\n function gather(set, oldOffset) {\n for (var i = 0; i < set.local.length; i++) {\n var mapped = set.local[i].map(mapping, offset, oldOffset);\n if (mapped) decorations.push(mapped);else if (options.onRemove) options.onRemove(set.local[i].spec);\n }\n for (var _i13 = 0; _i13 < set.children.length; _i13 += 3) gather(set.children[_i13 + 2], set.children[_i13] + oldOffset + 1);\n }\n for (var i = 0; i < children.length; i += 3) if (children[i + 1] == -1) gather(children[i + 2], oldChildren[i] + oldOffset + 1);\n return decorations;\n}\nfunction takeSpansForNode(spans, node, offset) {\n if (node.isLeaf) return null;\n var end = offset + node.nodeSize,\n found = null;\n for (var i = 0, span; i < spans.length; i++) {\n if ((span = spans[i]) && span.from > offset && span.to < end) {\n (found || (found = [])).push(span);\n spans[i] = null;\n }\n }\n return found;\n}\nfunction withoutNulls(array) {\n var result = [];\n for (var i = 0; i < array.length; i++) if (array[i] != null) result.push(array[i]);\n return result;\n}\nfunction buildTree(spans, node, offset, options) {\n var children = [],\n hasNulls = false;\n node.forEach(function (childNode, localStart) {\n var found = takeSpansForNode(spans, childNode, localStart + offset);\n if (found) {\n hasNulls = true;\n var subtree = buildTree(found, childNode, offset + localStart + 1, options);\n if (subtree != empty) children.push(localStart, localStart + childNode.nodeSize, subtree);\n }\n });\n var locals = moveSpans(hasNulls ? withoutNulls(spans) : spans, -offset).sort(byPos);\n for (var i = 0; i < locals.length; i++) if (!locals[i].type.valid(node, locals[i])) {\n if (options.onRemove) options.onRemove(locals[i].spec);\n locals.splice(i--, 1);\n }\n return locals.length || children.length ? new DecorationSet(locals, children) : empty;\n}\nfunction byPos(a, b) {\n return a.from - b.from || a.to - b.to;\n}\nfunction removeOverlap(spans) {\n var working = spans;\n for (var i = 0; i < working.length - 1; i++) {\n var span = working[i];\n if (span.from != span.to) for (var j = i + 1; j < working.length; j++) {\n var next = working[j];\n if (next.from == span.from) {\n if (next.to != span.to) {\n if (working == spans) working = spans.slice();\n working[j] = next.copy(next.from, span.to);\n insertAhead(working, j + 1, next.copy(span.to, next.to));\n }\n continue;\n } else {\n if (next.from < span.to) {\n if (working == spans) working = spans.slice();\n working[i] = span.copy(span.from, next.from);\n insertAhead(working, j, span.copy(next.from, span.to));\n }\n break;\n }\n }\n }\n return working;\n}\nfunction insertAhead(array, i, deco) {\n while (i < array.length && byPos(deco, array[i]) > 0) i++;\n array.splice(i, 0, deco);\n}\nfunction viewDecorations(view) {\n var found = [];\n view.someProp(\"decorations\", function (f) {\n var result = f(view.state);\n if (result && result != empty) found.push(result);\n });\n if (view.cursorWrapper) found.push(DecorationSet.create(view.state.doc, [view.cursorWrapper.deco]));\n return DecorationGroup.from(found);\n}\nvar observeOptions = {\n childList: true,\n characterData: true,\n characterDataOldValue: true,\n attributes: true,\n attributeOldValue: true,\n subtree: true\n};\nvar useCharData = ie && ie_version <= 11;\nvar SelectionState = function () {\n function SelectionState() {\n _classCallCheck(this, SelectionState);\n this.anchorNode = null;\n this.anchorOffset = 0;\n this.focusNode = null;\n this.focusOffset = 0;\n }\n _createClass(SelectionState, [{\n key: \"set\",\n value: function set(sel) {\n this.anchorNode = sel.anchorNode;\n this.anchorOffset = sel.anchorOffset;\n this.focusNode = sel.focusNode;\n this.focusOffset = sel.focusOffset;\n }\n }, {\n key: \"clear\",\n value: function clear() {\n this.anchorNode = this.focusNode = null;\n }\n }, {\n key: \"eq\",\n value: function eq(sel) {\n return sel.anchorNode == this.anchorNode && sel.anchorOffset == this.anchorOffset && sel.focusNode == this.focusNode && sel.focusOffset == this.focusOffset;\n }\n }]);\n return SelectionState;\n}();\nvar DOMObserver = function () {\n function DOMObserver(view, handleDOMChange) {\n var _this11 = this;\n _classCallCheck(this, DOMObserver);\n this.view = view;\n this.handleDOMChange = handleDOMChange;\n this.queue = [];\n this.flushingSoon = -1;\n this.observer = null;\n this.currentSelection = new SelectionState();\n this.onCharData = null;\n this.suppressingSelectionUpdates = false;\n this.lastChangedTextNode = null;\n this.observer = window.MutationObserver && new window.MutationObserver(function (mutations) {\n for (var i = 0; i < mutations.length; i++) _this11.queue.push(mutations[i]);\n if (ie && ie_version <= 11 && mutations.some(function (m) {\n return m.type == \"childList\" && m.removedNodes.length || m.type == \"characterData\" && m.oldValue.length > m.target.nodeValue.length;\n })) _this11.flushSoon();else _this11.flush();\n });\n if (useCharData) {\n this.onCharData = function (e) {\n _this11.queue.push({\n target: e.target,\n type: \"characterData\",\n oldValue: e.prevValue\n });\n _this11.flushSoon();\n };\n }\n this.onSelectionChange = this.onSelectionChange.bind(this);\n }\n _createClass(DOMObserver, [{\n key: \"flushSoon\",\n value: function flushSoon() {\n var _this12 = this;\n if (this.flushingSoon < 0) this.flushingSoon = window.setTimeout(function () {\n _this12.flushingSoon = -1;\n _this12.flush();\n }, 20);\n }\n }, {\n key: \"forceFlush\",\n value: function forceFlush() {\n if (this.flushingSoon > -1) {\n window.clearTimeout(this.flushingSoon);\n this.flushingSoon = -1;\n this.flush();\n }\n }\n }, {\n key: \"start\",\n value: function start() {\n if (this.observer) {\n this.observer.takeRecords();\n this.observer.observe(this.view.dom, observeOptions);\n }\n if (this.onCharData) this.view.dom.addEventListener(\"DOMCharacterDataModified\", this.onCharData);\n this.connectSelection();\n }\n }, {\n key: \"stop\",\n value: function stop() {\n var _this13 = this;\n if (this.observer) {\n var take = this.observer.takeRecords();\n if (take.length) {\n for (var i = 0; i < take.length; i++) this.queue.push(take[i]);\n window.setTimeout(function () {\n return _this13.flush();\n }, 20);\n }\n this.observer.disconnect();\n }\n if (this.onCharData) this.view.dom.removeEventListener(\"DOMCharacterDataModified\", this.onCharData);\n this.disconnectSelection();\n }\n }, {\n key: \"connectSelection\",\n value: function connectSelection() {\n this.view.dom.ownerDocument.addEventListener(\"selectionchange\", this.onSelectionChange);\n }\n }, {\n key: \"disconnectSelection\",\n value: function disconnectSelection() {\n this.view.dom.ownerDocument.removeEventListener(\"selectionchange\", this.onSelectionChange);\n }\n }, {\n key: \"suppressSelectionUpdates\",\n value: function suppressSelectionUpdates() {\n var _this14 = this;\n this.suppressingSelectionUpdates = true;\n setTimeout(function () {\n return _this14.suppressingSelectionUpdates = false;\n }, 50);\n }\n }, {\n key: \"onSelectionChange\",\n value: function onSelectionChange() {\n if (!hasFocusAndSelection(this.view)) return;\n if (this.suppressingSelectionUpdates) return selectionToDOM(this.view);\n if (ie && ie_version <= 11 && !this.view.state.selection.empty) {\n var sel = this.view.domSelectionRange();\n if (sel.focusNode && isEquivalentPosition(sel.focusNode, sel.focusOffset, sel.anchorNode, sel.anchorOffset)) return this.flushSoon();\n }\n this.flush();\n }\n }, {\n key: \"setCurSelection\",\n value: function setCurSelection() {\n this.currentSelection.set(this.view.domSelectionRange());\n }\n }, {\n key: \"ignoreSelectionChange\",\n value: function ignoreSelectionChange(sel) {\n if (!sel.focusNode) return true;\n var ancestors = new Set(),\n container;\n for (var scan = sel.focusNode; scan; scan = parentNode(scan)) ancestors.add(scan);\n for (var _scan = sel.anchorNode; _scan; _scan = parentNode(_scan)) if (ancestors.has(_scan)) {\n container = _scan;\n break;\n }\n var desc = container && this.view.docView.nearestDesc(container);\n if (desc && desc.ignoreMutation({\n type: \"selection\",\n target: container.nodeType == 3 ? container.parentNode : container\n })) {\n this.setCurSelection();\n return true;\n }\n }\n }, {\n key: \"pendingRecords\",\n value: function pendingRecords() {\n if (this.observer) {\n var _iterator2 = _createForOfIteratorHelper(this.observer.takeRecords()),\n _step2;\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var mut = _step2.value;\n this.queue.push(mut);\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n }\n return this.queue;\n }\n }, {\n key: \"flush\",\n value: function flush() {\n var view = this.view;\n if (!view.docView || this.flushingSoon > -1) return;\n var mutations = this.pendingRecords();\n if (mutations.length) this.queue = [];\n var sel = view.domSelectionRange();\n var newSel = !this.suppressingSelectionUpdates && !this.currentSelection.eq(sel) && hasFocusAndSelection(view) && !this.ignoreSelectionChange(sel);\n var from = -1,\n to = -1,\n typeOver = false,\n added = [];\n if (view.editable) {\n for (var i = 0; i < mutations.length; i++) {\n var result = this.registerMutation(mutations[i], added);\n if (result) {\n from = from < 0 ? result.from : Math.min(result.from, from);\n to = to < 0 ? result.to : Math.max(result.to, to);\n if (result.typeOver) typeOver = true;\n }\n }\n }\n if (gecko && added.length) {\n var brs = added.filter(function (n) {\n return n.nodeName == \"BR\";\n });\n if (brs.length == 2) {\n var _brs = _slicedToArray(brs, 2),\n a = _brs[0],\n b = _brs[1];\n if (a.parentNode && a.parentNode.parentNode == b.parentNode) b.remove();else a.remove();\n } else {\n var focusNode = this.currentSelection.focusNode;\n var _iterator3 = _createForOfIteratorHelper(brs),\n _step3;\n try {\n for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n var br = _step3.value;\n var parent = br.parentNode;\n if (parent && parent.nodeName == \"LI\" && (!focusNode || blockParent(view, focusNode) != parent)) br.remove();\n }\n } catch (err) {\n _iterator3.e(err);\n } finally {\n _iterator3.f();\n }\n }\n }\n var readSel = null;\n if (from < 0 && newSel && view.input.lastFocus > Date.now() - 200 && Math.max(view.input.lastTouch, view.input.lastClick.time) < Date.now() - 300 && selectionCollapsed(sel) && (readSel = selectionFromDOM(view)) && readSel.eq(prosemirrorState.Selection.near(view.state.doc.resolve(0), 1))) {\n view.input.lastFocus = 0;\n selectionToDOM(view);\n this.currentSelection.set(sel);\n view.scrollToSelection();\n } else if (from > -1 || newSel) {\n if (from > -1) {\n view.docView.markDirty(from, to);\n checkCSS(view);\n }\n this.handleDOMChange(from, to, typeOver, added);\n if (view.docView && view.docView.dirty) view.updateState(view.state);else if (!this.currentSelection.eq(sel)) selectionToDOM(view);\n this.currentSelection.set(sel);\n }\n }\n }, {\n key: \"registerMutation\",\n value: function registerMutation(mut, added) {\n if (added.indexOf(mut.target) > -1) return null;\n var desc = this.view.docView.nearestDesc(mut.target);\n if (mut.type == \"attributes\" && (desc == this.view.docView || mut.attributeName == \"contenteditable\" || mut.attributeName == \"style\" && !mut.oldValue && !mut.target.getAttribute(\"style\"))) return null;\n if (!desc || desc.ignoreMutation(mut)) return null;\n if (mut.type == \"childList\") {\n for (var i = 0; i < mut.addedNodes.length; i++) {\n var node = mut.addedNodes[i];\n added.push(node);\n if (node.nodeType == 3) this.lastChangedTextNode = node;\n }\n if (desc.contentDOM && desc.contentDOM != desc.dom && !desc.contentDOM.contains(mut.target)) return {\n from: desc.posBefore,\n to: desc.posAfter\n };\n var prev = mut.previousSibling,\n next = mut.nextSibling;\n if (ie && ie_version <= 11 && mut.addedNodes.length) {\n for (var _i14 = 0; _i14 < mut.addedNodes.length; _i14++) {\n var _mut$addedNodes$_i = mut.addedNodes[_i14],\n previousSibling = _mut$addedNodes$_i.previousSibling,\n nextSibling = _mut$addedNodes$_i.nextSibling;\n if (!previousSibling || Array.prototype.indexOf.call(mut.addedNodes, previousSibling) < 0) prev = previousSibling;\n if (!nextSibling || Array.prototype.indexOf.call(mut.addedNodes, nextSibling) < 0) next = nextSibling;\n }\n }\n var fromOffset = prev && prev.parentNode == mut.target ? domIndex(prev) + 1 : 0;\n var from = desc.localPosFromDOM(mut.target, fromOffset, -1);\n var toOffset = next && next.parentNode == mut.target ? domIndex(next) : mut.target.childNodes.length;\n var to = desc.localPosFromDOM(mut.target, toOffset, 1);\n return {\n from: from,\n to: to\n };\n } else if (mut.type == \"attributes\") {\n return {\n from: desc.posAtStart - desc.border,\n to: desc.posAtEnd + desc.border\n };\n } else {\n this.lastChangedTextNode = mut.target;\n return {\n from: desc.posAtStart,\n to: desc.posAtEnd,\n typeOver: mut.target.nodeValue == mut.oldValue\n };\n }\n }\n }]);\n return DOMObserver;\n}();\nvar cssChecked = new WeakMap();\nvar cssCheckWarned = false;\nfunction checkCSS(view) {\n if (cssChecked.has(view)) return;\n cssChecked.set(view, null);\n if (['normal', 'nowrap', 'pre-line'].indexOf(getComputedStyle(view.dom).whiteSpace) !== -1) {\n view.requiresGeckoHackNode = gecko;\n if (cssCheckWarned) return;\n console[\"warn\"](\"ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package.\");\n cssCheckWarned = true;\n }\n}\nfunction rangeToSelectionRange(view, range) {\n var anchorNode = range.startContainer,\n anchorOffset = range.startOffset;\n var focusNode = range.endContainer,\n focusOffset = range.endOffset;\n var currentAnchor = view.domAtPos(view.state.selection.anchor);\n if (isEquivalentPosition(currentAnchor.node, currentAnchor.offset, focusNode, focusOffset)) {\n var _ref5 = [focusNode, focusOffset, anchorNode, anchorOffset];\n anchorNode = _ref5[0];\n anchorOffset = _ref5[1];\n focusNode = _ref5[2];\n focusOffset = _ref5[3];\n }\n return {\n anchorNode: anchorNode,\n anchorOffset: anchorOffset,\n focusNode: focusNode,\n focusOffset: focusOffset\n };\n}\nfunction safariShadowSelectionRange(view, selection) {\n if (selection.getComposedRanges) {\n var range = selection.getComposedRanges(view.root)[0];\n if (range) return rangeToSelectionRange(view, range);\n }\n var found;\n function read(event) {\n event.preventDefault();\n event.stopImmediatePropagation();\n found = event.getTargetRanges()[0];\n }\n view.dom.addEventListener(\"beforeinput\", read, true);\n document.execCommand(\"indent\");\n view.dom.removeEventListener(\"beforeinput\", read, true);\n return found ? rangeToSelectionRange(view, found) : null;\n}\nfunction blockParent(view, node) {\n for (var p = node.parentNode; p && p != view.dom; p = p.parentNode) {\n var desc = view.docView.nearestDesc(p, true);\n if (desc && desc.node.isBlock) return p;\n }\n return null;\n}\nfunction parseBetween(view, from_, to_) {\n var _view$docView$parseRa = view.docView.parseRange(from_, to_),\n parent = _view$docView$parseRa.node,\n fromOffset = _view$docView$parseRa.fromOffset,\n toOffset = _view$docView$parseRa.toOffset,\n from = _view$docView$parseRa.from,\n to = _view$docView$parseRa.to;\n var domSel = view.domSelectionRange();\n var find;\n var anchor = domSel.anchorNode;\n if (anchor && view.dom.contains(anchor.nodeType == 1 ? anchor : anchor.parentNode)) {\n find = [{\n node: anchor,\n offset: domSel.anchorOffset\n }];\n if (!selectionCollapsed(domSel)) find.push({\n node: domSel.focusNode,\n offset: domSel.focusOffset\n });\n }\n if (chrome && view.input.lastKeyCode === 8) {\n for (var off = toOffset; off > fromOffset; off--) {\n var node = parent.childNodes[off - 1],\n desc = node.pmViewDesc;\n if (node.nodeName == \"BR\" && !desc) {\n toOffset = off;\n break;\n }\n if (!desc || desc.size) break;\n }\n }\n var startDoc = view.state.doc;\n var parser = view.someProp(\"domParser\") || prosemirrorModel.DOMParser.fromSchema(view.state.schema);\n var $from = startDoc.resolve(from);\n var sel = null,\n doc = parser.parse(parent, {\n topNode: $from.parent,\n topMatch: $from.parent.contentMatchAt($from.index()),\n topOpen: true,\n from: fromOffset,\n to: toOffset,\n preserveWhitespace: $from.parent.type.whitespace == \"pre\" ? \"full\" : true,\n findPositions: find,\n ruleFromNode: ruleFromNode,\n context: $from\n });\n if (find && find[0].pos != null) {\n var _anchor = find[0].pos,\n head = find[1] && find[1].pos;\n if (head == null) head = _anchor;\n sel = {\n anchor: _anchor + from,\n head: head + from\n };\n }\n return {\n doc: doc,\n sel: sel,\n from: from,\n to: to\n };\n}\nfunction ruleFromNode(dom) {\n var desc = dom.pmViewDesc;\n if (desc) {\n return desc.parseRule();\n } else if (dom.nodeName == \"BR\" && dom.parentNode) {\n if (safari && /^(ul|ol)$/i.test(dom.parentNode.nodeName)) {\n var skip = document.createElement(\"div\");\n skip.appendChild(document.createElement(\"li\"));\n return {\n skip: skip\n };\n } else if (dom.parentNode.lastChild == dom || safari && /^(tr|table)$/i.test(dom.parentNode.nodeName)) {\n return {\n ignore: true\n };\n }\n } else if (dom.nodeName == \"IMG\" && dom.getAttribute(\"mark-placeholder\")) {\n return {\n ignore: true\n };\n }\n return null;\n}\nvar isInline = /^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;\nfunction readDOMChange(view, from, to, typeOver, addedNodes) {\n var compositionID = view.input.compositionPendingChanges || (view.composing ? view.input.compositionID : 0);\n view.input.compositionPendingChanges = 0;\n if (from < 0) {\n var origin = view.input.lastSelectionTime > Date.now() - 50 ? view.input.lastSelectionOrigin : null;\n var newSel = selectionFromDOM(view, origin);\n if (newSel && !view.state.selection.eq(newSel)) {\n if (chrome && android && view.input.lastKeyCode === 13 && Date.now() - 100 < view.input.lastKeyCodeTime && view.someProp(\"handleKeyDown\", function (f) {\n return f(view, keyEvent(13, \"Enter\"));\n })) return;\n var _tr = view.state.tr.setSelection(newSel);\n if (origin == \"pointer\") _tr.setMeta(\"pointer\", true);else if (origin == \"key\") _tr.scrollIntoView();\n if (compositionID) _tr.setMeta(\"composition\", compositionID);\n view.dispatch(_tr);\n }\n return;\n }\n var $before = view.state.doc.resolve(from);\n var shared = $before.sharedDepth(to);\n from = $before.before(shared + 1);\n to = view.state.doc.resolve(to).after(shared + 1);\n var sel = view.state.selection;\n var parse = parseBetween(view, from, to);\n var doc = view.state.doc,\n compare = doc.slice(parse.from, parse.to);\n var preferredPos, preferredSide;\n if (view.input.lastKeyCode === 8 && Date.now() - 100 < view.input.lastKeyCodeTime) {\n preferredPos = view.state.selection.to;\n preferredSide = \"end\";\n } else {\n preferredPos = view.state.selection.from;\n preferredSide = \"start\";\n }\n view.input.lastKeyCode = null;\n var change = findDiff(compare.content, parse.doc.content, parse.from, preferredPos, preferredSide);\n if (change) view.input.domChangeCount++;\n if ((ios && view.input.lastIOSEnter > Date.now() - 225 || android) && addedNodes.some(function (n) {\n return n.nodeType == 1 && !isInline.test(n.nodeName);\n }) && (!change || change.endA >= change.endB) && view.someProp(\"handleKeyDown\", function (f) {\n return f(view, keyEvent(13, \"Enter\"));\n })) {\n view.input.lastIOSEnter = 0;\n return;\n }\n if (!change) {\n if (typeOver && sel instanceof prosemirrorState.TextSelection && !sel.empty && sel.$head.sameParent(sel.$anchor) && !view.composing && !(parse.sel && parse.sel.anchor != parse.sel.head)) {\n change = {\n start: sel.from,\n endA: sel.to,\n endB: sel.to\n };\n } else {\n if (parse.sel) {\n var _sel2 = resolveSelection(view, view.state.doc, parse.sel);\n if (_sel2 && !_sel2.eq(view.state.selection)) {\n var _tr2 = view.state.tr.setSelection(_sel2);\n if (compositionID) _tr2.setMeta(\"composition\", compositionID);\n view.dispatch(_tr2);\n }\n }\n return;\n }\n }\n if (view.state.selection.from < view.state.selection.to && change.start == change.endB && view.state.selection instanceof prosemirrorState.TextSelection) {\n if (change.start > view.state.selection.from && change.start <= view.state.selection.from + 2 && view.state.selection.from >= parse.from) {\n change.start = view.state.selection.from;\n } else if (change.endA < view.state.selection.to && change.endA >= view.state.selection.to - 2 && view.state.selection.to <= parse.to) {\n change.endB += view.state.selection.to - change.endA;\n change.endA = view.state.selection.to;\n }\n }\n if (ie && ie_version <= 11 && change.endB == change.start + 1 && change.endA == change.start && change.start > parse.from && parse.doc.textBetween(change.start - parse.from - 1, change.start - parse.from + 1) == \" \\xA0\") {\n change.start--;\n change.endA--;\n change.endB--;\n }\n var $from = parse.doc.resolveNoCache(change.start - parse.from);\n var $to = parse.doc.resolveNoCache(change.endB - parse.from);\n var $fromA = doc.resolve(change.start);\n var inlineChange = $from.sameParent($to) && $from.parent.inlineContent && $fromA.end() >= change.endA;\n var nextSel;\n if ((ios && view.input.lastIOSEnter > Date.now() - 225 && (!inlineChange || addedNodes.some(function (n) {\n return n.nodeName == \"DIV\" || n.nodeName == \"P\";\n })) || !inlineChange && $from.pos < parse.doc.content.size && !$from.sameParent($to) && (nextSel = prosemirrorState.Selection.findFrom(parse.doc.resolve($from.pos + 1), 1, true)) && nextSel.head == $to.pos) && view.someProp(\"handleKeyDown\", function (f) {\n return f(view, keyEvent(13, \"Enter\"));\n })) {\n view.input.lastIOSEnter = 0;\n return;\n }\n if (view.state.selection.anchor > change.start && looksLikeBackspace(doc, change.start, change.endA, $from, $to) && view.someProp(\"handleKeyDown\", function (f) {\n return f(view, keyEvent(8, \"Backspace\"));\n })) {\n if (android && chrome) view.domObserver.suppressSelectionUpdates();\n return;\n }\n if (chrome && android && change.endB == change.start) view.input.lastAndroidDelete = Date.now();\n if (android && !inlineChange && $from.start() != $to.start() && $to.parentOffset == 0 && $from.depth == $to.depth && parse.sel && parse.sel.anchor == parse.sel.head && parse.sel.head == change.endA) {\n change.endB -= 2;\n $to = parse.doc.resolveNoCache(change.endB - parse.from);\n setTimeout(function () {\n view.someProp(\"handleKeyDown\", function (f) {\n return f(view, keyEvent(13, \"Enter\"));\n });\n }, 20);\n }\n var chFrom = change.start,\n chTo = change.endA;\n var tr, storedMarks, markChange;\n if (inlineChange) {\n if ($from.pos == $to.pos) {\n if (ie && ie_version <= 11 && $from.parentOffset == 0) {\n view.domObserver.suppressSelectionUpdates();\n setTimeout(function () {\n return selectionToDOM(view);\n }, 20);\n }\n tr = view.state.tr[\"delete\"](chFrom, chTo);\n storedMarks = doc.resolve(change.start).marksAcross(doc.resolve(change.endA));\n } else if (change.endA == change.endB && (markChange = isMarkChange($from.parent.content.cut($from.parentOffset, $to.parentOffset), $fromA.parent.content.cut($fromA.parentOffset, change.endA - $fromA.start())))) {\n tr = view.state.tr;\n if (markChange.type == \"add\") tr.addMark(chFrom, chTo, markChange.mark);else tr.removeMark(chFrom, chTo, markChange.mark);\n } else if ($from.parent.child($from.index()).isText && $from.index() == $to.index() - ($to.textOffset ? 0 : 1)) {\n var text = $from.parent.textBetween($from.parentOffset, $to.parentOffset);\n if (view.someProp(\"handleTextInput\", function (f) {\n return f(view, chFrom, chTo, text);\n })) return;\n tr = view.state.tr.insertText(text, chFrom, chTo);\n }\n }\n if (!tr) tr = view.state.tr.replace(chFrom, chTo, parse.doc.slice(change.start - parse.from, change.endB - parse.from));\n if (parse.sel) {\n var _sel3 = resolveSelection(view, tr.doc, parse.sel);\n if (_sel3 && !(chrome && android && view.composing && _sel3.empty && (change.start != change.endB || view.input.lastAndroidDelete < Date.now() - 100) && (_sel3.head == chFrom || _sel3.head == tr.mapping.map(chTo) - 1) || ie && _sel3.empty && _sel3.head == chFrom)) tr.setSelection(_sel3);\n }\n if (storedMarks) tr.ensureMarks(storedMarks);\n if (compositionID) tr.setMeta(\"composition\", compositionID);\n view.dispatch(tr.scrollIntoView());\n}\nfunction resolveSelection(view, doc, parsedSel) {\n if (Math.max(parsedSel.anchor, parsedSel.head) > doc.content.size) return null;\n return selectionBetween(view, doc.resolve(parsedSel.anchor), doc.resolve(parsedSel.head));\n}\nfunction isMarkChange(cur, prev) {\n var curMarks = cur.firstChild.marks,\n prevMarks = prev.firstChild.marks;\n var added = curMarks,\n removed = prevMarks,\n type,\n mark,\n update;\n for (var i = 0; i < prevMarks.length; i++) added = prevMarks[i].removeFromSet(added);\n for (var _i15 = 0; _i15 < curMarks.length; _i15++) removed = curMarks[_i15].removeFromSet(removed);\n if (added.length == 1 && removed.length == 0) {\n mark = added[0];\n type = \"add\";\n update = function update(node) {\n return node.mark(mark.addToSet(node.marks));\n };\n } else if (added.length == 0 && removed.length == 1) {\n mark = removed[0];\n type = \"remove\";\n update = function update(node) {\n return node.mark(mark.removeFromSet(node.marks));\n };\n } else {\n return null;\n }\n var updated = [];\n for (var _i16 = 0; _i16 < prev.childCount; _i16++) updated.push(update(prev.child(_i16)));\n if (prosemirrorModel.Fragment.from(updated).eq(cur)) return {\n mark: mark,\n type: type\n };\n}\nfunction looksLikeBackspace(old, start, end, $newStart, $newEnd) {\n if (end - start <= $newEnd.pos - $newStart.pos || skipClosingAndOpening($newStart, true, false) < $newEnd.pos) return false;\n var $start = old.resolve(start);\n if (!$newStart.parent.isTextblock) {\n var after = $start.nodeAfter;\n return after != null && end == start + after.nodeSize;\n }\n if ($start.parentOffset < $start.parent.content.size || !$start.parent.isTextblock) return false;\n var $next = old.resolve(skipClosingAndOpening($start, true, true));\n if (!$next.parent.isTextblock || $next.pos > end || skipClosingAndOpening($next, true, false) < end) return false;\n return $newStart.parent.content.cut($newStart.parentOffset).eq($next.parent.content);\n}\nfunction skipClosingAndOpening($pos, fromEnd, mayOpen) {\n var depth = $pos.depth,\n end = fromEnd ? $pos.end() : $pos.pos;\n while (depth > 0 && (fromEnd || $pos.indexAfter(depth) == $pos.node(depth).childCount)) {\n depth--;\n end++;\n fromEnd = false;\n }\n if (mayOpen) {\n var next = $pos.node(depth).maybeChild($pos.indexAfter(depth));\n while (next && !next.isLeaf) {\n next = next.firstChild;\n end++;\n }\n }\n return end;\n}\nfunction findDiff(a, b, pos, preferredPos, preferredSide) {\n var start = a.findDiffStart(b, pos);\n if (start == null) return null;\n var _a$findDiffEnd = a.findDiffEnd(b, pos + a.size, pos + b.size),\n endA = _a$findDiffEnd.a,\n endB = _a$findDiffEnd.b;\n if (preferredSide == \"end\") {\n var adjust = Math.max(0, start - Math.min(endA, endB));\n preferredPos -= endA + adjust - start;\n }\n if (endA < start && a.size < b.size) {\n var move = preferredPos <= start && preferredPos >= endA ? start - preferredPos : 0;\n start -= move;\n if (start && start < b.size && isSurrogatePair(b.textBetween(start - 1, start + 1))) start += move ? 1 : -1;\n endB = start + (endB - endA);\n endA = start;\n } else if (endB < start) {\n var _move = preferredPos <= start && preferredPos >= endB ? start - preferredPos : 0;\n start -= _move;\n if (start && start < a.size && isSurrogatePair(a.textBetween(start - 1, start + 1))) start += _move ? 1 : -1;\n endA = start + (endA - endB);\n endB = start;\n }\n return {\n start: start,\n endA: endA,\n endB: endB\n };\n}\nfunction isSurrogatePair(str) {\n if (str.length != 2) return false;\n var a = str.charCodeAt(0),\n b = str.charCodeAt(1);\n return a >= 0xDC00 && a <= 0xDFFF && b >= 0xD800 && b <= 0xDBFF;\n}\nvar __serializeForClipboard = serializeForClipboard;\nvar __parseFromClipboard = parseFromClipboard;\nvar __endComposition = endComposition;\nvar EditorView = function () {\n function EditorView(place, props) {\n var _this15 = this;\n _classCallCheck(this, EditorView);\n this._root = null;\n this.focused = false;\n this.trackWrites = null;\n this.mounted = false;\n this.markCursor = null;\n this.cursorWrapper = null;\n this.lastSelectedViewDesc = undefined;\n this.input = new InputState();\n this.prevDirectPlugins = [];\n this.pluginViews = [];\n this.requiresGeckoHackNode = false;\n this.dragging = null;\n this._props = props;\n this.state = props.state;\n this.directPlugins = props.plugins || [];\n this.directPlugins.forEach(checkStateComponent);\n this.dispatch = this.dispatch.bind(this);\n this.dom = place && place.mount || document.createElement(\"div\");\n if (place) {\n if (place.appendChild) place.appendChild(this.dom);else if (typeof place == \"function\") place(this.dom);else if (place.mount) this.mounted = true;\n }\n this.editable = getEditable(this);\n updateCursorWrapper(this);\n this.nodeViews = buildNodeViews(this);\n this.docView = docViewDesc(this.state.doc, computeDocDeco(this), viewDecorations(this), this.dom, this);\n this.domObserver = new DOMObserver(this, function (from, to, typeOver, added) {\n return readDOMChange(_this15, from, to, typeOver, added);\n });\n this.domObserver.start();\n initInput(this);\n this.updatePluginViews();\n }\n _createClass(EditorView, [{\n key: \"composing\",\n get: function get() {\n return this.input.composing;\n }\n }, {\n key: \"props\",\n get: function get() {\n if (this._props.state != this.state) {\n var prev = this._props;\n this._props = {};\n for (var name in prev) this._props[name] = prev[name];\n this._props.state = this.state;\n }\n return this._props;\n }\n }, {\n key: \"update\",\n value: function update(props) {\n if (props.handleDOMEvents != this._props.handleDOMEvents) ensureListeners(this);\n var prevProps = this._props;\n this._props = props;\n if (props.plugins) {\n props.plugins.forEach(checkStateComponent);\n this.directPlugins = props.plugins;\n }\n this.updateStateInner(props.state, prevProps);\n }\n }, {\n key: \"setProps\",\n value: function setProps(props) {\n var updated = {};\n for (var name in this._props) updated[name] = this._props[name];\n updated.state = this.state;\n for (var _name2 in props) updated[_name2] = props[_name2];\n this.update(updated);\n }\n }, {\n key: \"updateState\",\n value: function updateState(state) {\n this.updateStateInner(state, this._props);\n }\n }, {\n key: \"updateStateInner\",\n value: function updateStateInner(state, prevProps) {\n var _a;\n var prev = this.state,\n redraw = false,\n updateSel = false;\n if (state.storedMarks && this.composing) {\n clearComposition(this);\n updateSel = true;\n }\n this.state = state;\n var pluginsChanged = prev.plugins != state.plugins || this._props.plugins != prevProps.plugins;\n if (pluginsChanged || this._props.plugins != prevProps.plugins || this._props.nodeViews != prevProps.nodeViews) {\n var nodeViews = buildNodeViews(this);\n if (changedNodeViews(nodeViews, this.nodeViews)) {\n this.nodeViews = nodeViews;\n redraw = true;\n }\n }\n if (pluginsChanged || prevProps.handleDOMEvents != this._props.handleDOMEvents) {\n ensureListeners(this);\n }\n this.editable = getEditable(this);\n updateCursorWrapper(this);\n var innerDeco = viewDecorations(this),\n outerDeco = computeDocDeco(this);\n var scroll = prev.plugins != state.plugins && !prev.doc.eq(state.doc) ? \"reset\" : state.scrollToSelection > prev.scrollToSelection ? \"to selection\" : \"preserve\";\n var updateDoc = redraw || !this.docView.matchesNode(state.doc, outerDeco, innerDeco);\n if (updateDoc || !state.selection.eq(prev.selection)) updateSel = true;\n var oldScrollPos = scroll == \"preserve\" && updateSel && this.dom.style.overflowAnchor == null && storeScrollPos(this);\n if (updateSel) {\n this.domObserver.stop();\n var forceSelUpdate = updateDoc && (ie || chrome) && !this.composing && !prev.selection.empty && !state.selection.empty && selectionContextChanged(prev.selection, state.selection);\n if (updateDoc) {\n var chromeKludge = chrome ? this.trackWrites = this.domSelectionRange().focusNode : null;\n if (this.composing) this.input.compositionNode = findCompositionNode(this);\n if (redraw || !this.docView.update(state.doc, outerDeco, innerDeco, this)) {\n this.docView.updateOuterDeco(outerDeco);\n this.docView.destroy();\n this.docView = docViewDesc(state.doc, outerDeco, innerDeco, this.dom, this);\n }\n if (chromeKludge && !this.trackWrites) forceSelUpdate = true;\n }\n if (forceSelUpdate || !(this.input.mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) && anchorInRightPlace(this))) {\n selectionToDOM(this, forceSelUpdate);\n } else {\n syncNodeSelection(this, state.selection);\n this.domObserver.setCurSelection();\n }\n this.domObserver.start();\n }\n this.updatePluginViews(prev);\n if (((_a = this.dragging) === null || _a === void 0 ? void 0 : _a.node) && !prev.doc.eq(state.doc)) this.updateDraggedNode(this.dragging, prev);\n if (scroll == \"reset\") {\n this.dom.scrollTop = 0;\n } else if (scroll == \"to selection\") {\n this.scrollToSelection();\n } else if (oldScrollPos) {\n resetScrollPos(oldScrollPos);\n }\n }\n }, {\n key: \"scrollToSelection\",\n value: function scrollToSelection() {\n var _this16 = this;\n var startDOM = this.domSelectionRange().focusNode;\n if (this.someProp(\"handleScrollToSelection\", function (f) {\n return f(_this16);\n })) ;else if (this.state.selection instanceof prosemirrorState.NodeSelection) {\n var target = this.docView.domAfterPos(this.state.selection.from);\n if (target.nodeType == 1) scrollRectIntoView(this, target.getBoundingClientRect(), startDOM);\n } else {\n scrollRectIntoView(this, this.coordsAtPos(this.state.selection.head, 1), startDOM);\n }\n }\n }, {\n key: \"destroyPluginViews\",\n value: function destroyPluginViews() {\n var view;\n while (view = this.pluginViews.pop()) if (view.destroy) view.destroy();\n }\n }, {\n key: \"updatePluginViews\",\n value: function updatePluginViews(prevState) {\n if (!prevState || prevState.plugins != this.state.plugins || this.directPlugins != this.prevDirectPlugins) {\n this.prevDirectPlugins = this.directPlugins;\n this.destroyPluginViews();\n for (var i = 0; i < this.directPlugins.length; i++) {\n var plugin = this.directPlugins[i];\n if (plugin.spec.view) this.pluginViews.push(plugin.spec.view(this));\n }\n for (var _i17 = 0; _i17 < this.state.plugins.length; _i17++) {\n var _plugin = this.state.plugins[_i17];\n if (_plugin.spec.view) this.pluginViews.push(_plugin.spec.view(this));\n }\n } else {\n for (var _i18 = 0; _i18 < this.pluginViews.length; _i18++) {\n var pluginView = this.pluginViews[_i18];\n if (pluginView.update) pluginView.update(this, prevState);\n }\n }\n }\n }, {\n key: \"updateDraggedNode\",\n value: function updateDraggedNode(dragging, prev) {\n var sel = dragging.node,\n found = -1;\n if (this.state.doc.nodeAt(sel.from) == sel.node) {\n found = sel.from;\n } else {\n var movedPos = sel.from + (this.state.doc.content.size - prev.doc.content.size);\n var moved = movedPos > 0 && this.state.doc.nodeAt(movedPos);\n if (moved == sel.node) found = movedPos;\n }\n this.dragging = new Dragging(dragging.slice, dragging.move, found < 0 ? undefined : prosemirrorState.NodeSelection.create(this.state.doc, found));\n }\n }, {\n key: \"someProp\",\n value: function someProp(propName, f) {\n var prop = this._props && this._props[propName],\n value;\n if (prop != null && (value = f ? f(prop) : prop)) return value;\n for (var i = 0; i < this.directPlugins.length; i++) {\n var _prop = this.directPlugins[i].props[propName];\n if (_prop != null && (value = f ? f(_prop) : _prop)) return value;\n }\n var plugins = this.state.plugins;\n if (plugins) for (var _i19 = 0; _i19 < plugins.length; _i19++) {\n var _prop2 = plugins[_i19].props[propName];\n if (_prop2 != null && (value = f ? f(_prop2) : _prop2)) return value;\n }\n }\n }, {\n key: \"hasFocus\",\n value: function hasFocus() {\n if (ie) {\n var node = this.root.activeElement;\n if (node == this.dom) return true;\n if (!node || !this.dom.contains(node)) return false;\n while (node && this.dom != node && this.dom.contains(node)) {\n if (node.contentEditable == 'false') return false;\n node = node.parentElement;\n }\n return true;\n }\n return this.root.activeElement == this.dom;\n }\n }, {\n key: \"focus\",\n value: function focus() {\n this.domObserver.stop();\n if (this.editable) focusPreventScroll(this.dom);\n selectionToDOM(this);\n this.domObserver.start();\n }\n }, {\n key: \"root\",\n get: function get() {\n var _this17 = this;\n var cached = this._root;\n if (cached == null) {\n var _loop5 = function _loop5(search) {\n if (search.nodeType == 9 || search.nodeType == 11 && search.host) {\n if (!search.getSelection) Object.getPrototypeOf(search).getSelection = function () {\n return search.ownerDocument.getSelection();\n };\n return {\n v: _this17._root = search\n };\n }\n },\n _ret3;\n for (var search = this.dom.parentNode; search; search = search.parentNode) {\n _ret3 = _loop5(search);\n if (_ret3) return _ret3.v;\n }\n }\n return cached || document;\n }\n }, {\n key: \"updateRoot\",\n value: function updateRoot() {\n this._root = null;\n }\n }, {\n key: \"posAtCoords\",\n value: function posAtCoords(coords) {\n return _posAtCoords(this, coords);\n }\n }, {\n key: \"coordsAtPos\",\n value: function coordsAtPos(pos) {\n var side = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n return _coordsAtPos(this, pos, side);\n }\n }, {\n key: \"domAtPos\",\n value: function domAtPos(pos) {\n var side = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n return this.docView.domFromPos(pos, side);\n }\n }, {\n key: \"nodeDOM\",\n value: function nodeDOM(pos) {\n var desc = this.docView.descAt(pos);\n return desc ? desc.nodeDOM : null;\n }\n }, {\n key: \"posAtDOM\",\n value: function posAtDOM(node, offset) {\n var bias = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : -1;\n var pos = this.docView.posFromDOM(node, offset, bias);\n if (pos == null) throw new RangeError(\"DOM position not inside the editor\");\n return pos;\n }\n }, {\n key: \"endOfTextblock\",\n value: function endOfTextblock(dir, state) {\n return _endOfTextblock(this, state || this.state, dir);\n }\n }, {\n key: \"pasteHTML\",\n value: function pasteHTML(html, event) {\n return doPaste(this, \"\", html, false, event || new ClipboardEvent(\"paste\"));\n }\n }, {\n key: \"pasteText\",\n value: function pasteText(text, event) {\n return doPaste(this, text, null, true, event || new ClipboardEvent(\"paste\"));\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n if (!this.docView) return;\n destroyInput(this);\n this.destroyPluginViews();\n if (this.mounted) {\n this.docView.update(this.state.doc, [], viewDecorations(this), this);\n this.dom.textContent = \"\";\n } else if (this.dom.parentNode) {\n this.dom.parentNode.removeChild(this.dom);\n }\n this.docView.destroy();\n this.docView = null;\n clearReusedRange();\n }\n }, {\n key: \"isDestroyed\",\n get: function get() {\n return this.docView == null;\n }\n }, {\n key: \"dispatchEvent\",\n value: function dispatchEvent(event) {\n return _dispatchEvent(this, event);\n }\n }, {\n key: \"dispatch\",\n value: function dispatch(tr) {\n var dispatchTransaction = this._props.dispatchTransaction;\n if (dispatchTransaction) dispatchTransaction.call(this, tr);else this.updateState(this.state.apply(tr));\n }\n }, {\n key: \"domSelectionRange\",\n value: function domSelectionRange() {\n var sel = this.domSelection();\n if (!sel) return {\n focusNode: null,\n focusOffset: 0,\n anchorNode: null,\n anchorOffset: 0\n };\n return safari && this.root.nodeType === 11 && deepActiveElement(this.dom.ownerDocument) == this.dom && safariShadowSelectionRange(this, sel) || sel;\n }\n }, {\n key: \"domSelection\",\n value: function domSelection() {\n return this.root.getSelection();\n }\n }]);\n return EditorView;\n}();\nfunction computeDocDeco(view) {\n var attrs = Object.create(null);\n attrs[\"class\"] = \"ProseMirror\";\n attrs.contenteditable = String(view.editable);\n view.someProp(\"attributes\", function (value) {\n if (typeof value == \"function\") value = value(view.state);\n if (value) for (var attr in value) {\n if (attr == \"class\") attrs[\"class\"] += \" \" + value[attr];else if (attr == \"style\") attrs.style = (attrs.style ? attrs.style + \";\" : \"\") + value[attr];else if (!attrs[attr] && attr != \"contenteditable\" && attr != \"nodeName\") attrs[attr] = String(value[attr]);\n }\n });\n if (!attrs.translate) attrs.translate = \"no\";\n return [Decoration.node(0, view.state.doc.content.size, attrs)];\n}\nfunction updateCursorWrapper(view) {\n if (view.markCursor) {\n var dom = document.createElement(\"img\");\n dom.className = \"ProseMirror-separator\";\n dom.setAttribute(\"mark-placeholder\", \"true\");\n dom.setAttribute(\"alt\", \"\");\n view.cursorWrapper = {\n dom: dom,\n deco: Decoration.widget(view.state.selection.from, dom, {\n raw: true,\n marks: view.markCursor\n })\n };\n } else {\n view.cursorWrapper = null;\n }\n}\nfunction getEditable(view) {\n return !view.someProp(\"editable\", function (value) {\n return value(view.state) === false;\n });\n}\nfunction selectionContextChanged(sel1, sel2) {\n var depth = Math.min(sel1.$anchor.sharedDepth(sel1.head), sel2.$anchor.sharedDepth(sel2.head));\n return sel1.$anchor.start(depth) != sel2.$anchor.start(depth);\n}\nfunction buildNodeViews(view) {\n var result = Object.create(null);\n function add(obj) {\n for (var _prop3 in obj) if (!Object.prototype.hasOwnProperty.call(result, _prop3)) result[_prop3] = obj[_prop3];\n }\n view.someProp(\"nodeViews\", add);\n view.someProp(\"markViews\", add);\n return result;\n}\nfunction changedNodeViews(a, b) {\n var nA = 0,\n nB = 0;\n for (var _prop4 in a) {\n if (a[_prop4] != b[_prop4]) return true;\n nA++;\n }\n for (var _ in b) nB++;\n return nA != nB;\n}\nfunction checkStateComponent(plugin) {\n if (plugin.spec.state || plugin.spec.filterTransaction || plugin.spec.appendTransaction) throw new RangeError(\"Plugins passed directly to the view must not have a state component\");\n}\nexports.Decoration = Decoration;\nexports.DecorationSet = DecorationSet;\nexports.EditorView = EditorView;\nexports.__endComposition = __endComposition;\nexports.__parseFromClipboard = __parseFromClipboard;\nexports.__serializeForClipboard = __serializeForClipboard;\n"],"names":["_slicedToArray","arr","i","Array","isArray","_arrayWithHoles","r","l","t","Symbol","iterator","e","n","u","a","f","o","call","next","done","push","value","length","Object","_iterableToArrayLimit","_unsupportedIterableToArray","TypeError","_nonIterableRest","_createForOfIteratorHelper","allowArrayLike","it","F","s","_e","err","normalCompletion","didErr","step","_e2","minLen","_arrayLikeToArray","prototype","toString","slice","constructor","name","from","test","len","arr2","_get","Reflect","get","bind","target","property","receiver","base","object","hasOwnProperty","_getPrototypeOf","_superPropBase","desc","getOwnPropertyDescriptor","arguments","apply","this","_inherits","subClass","superClass","create","writable","configurable","defineProperty","_setPrototypeOf","p","setPrototypeOf","__proto__","_createSuper","Derived","hasNativeReflectConstruct","construct","sham","Proxy","Boolean","valueOf","_isNativeReflectConstruct","result","Super","NewTarget","self","_typeof","_assertThisInitialized","_possibleConstructorReturn","ReferenceError","getPrototypeOf","_classCallCheck","instance","Constructor","_defineProperties","props","descriptor","enumerable","arg","key","input","hint","prim","toPrimitive","undefined","res","_toPrimitive","String","_createClass","protoProps","staticProps","prosemirrorState","require$$0","prosemirrorModel","require$$1","prosemirrorTransform","require$$2","domIndex","node","index","previousSibling","parentNode","parent","assignedSlot","nodeType","host","reusedRange","textRange","to","range","document","createRange","setEnd","nodeValue","setStart","isEquivalentPosition","off","targetNode","targetOff","scanFor","atomElements","dir","nodeSize","hasBlockDesc","nodeName","contentEditable","childNodes","dom","cur","pmViewDesc","isBlock","contentDOM","selectionCollapsed","domSel","focusNode","focusOffset","anchorNode","anchorOffset","keyEvent","keyCode","event","createEvent","initEvent","code","nav","navigator","doc","agent","userAgent","ie_edge","exec","ie_upto10","ie_11up","ie","ie_version","documentMode","gecko","_chrome","chrome","chrome_version","safari","vendor","ios","maxTouchPoints","mac","platform","windows","android","webkit","documentElement","style","webkit_version","windowRect","vp","defaultView","visualViewport","left","right","width","top","bottom","height","clientWidth","clientHeight","getSide","side","clientRect","rect","getBoundingClientRect","scaleX","offsetWidth","scaleY","offsetHeight","scrollRectIntoView","view","startDOM","scrollThreshold","someProp","scrollMargin","ownerDocument","elt","atTop","body","bounding","moveX","moveY","scrollBy","startX","scrollLeft","startY","scrollTop","dX","dY","getComputedStyle","position","scrollStack","stack","restoreScrollStack","dTop","_stack$i","preventScrollSupported","findOffsetInNode","coords","closest","coordsClosest","firstBelow","coordsBelow","dxClosest","offset","rowBot","rowTop","child","firstChild","childIndex","nextSibling","rects","getClientRects","Math","max","min","dx","singleRect","inRect","findOffsetInText","elementFromPoint","element","box","startI","floor","j","_posAtCoords","caret","x","y","caretPositionFromPoint","pos","offsetNode","_","caretRangeFromPoint","startContainer","startOffset","caretFromPoint","root","contains","draggable","targetKludge","_box","prev","lastChild","state","content","size","outsideBlock","sawBlock","docView","nearestDesc","posBefore","posAfter","isText","posFromDOM","posFromCaret","_findOffsetInNode","bias","posFromElement","inside","posAtStart","border","nonZero","first","find","BIDI","_coordsAtPos","_view$docView$domFrom","domFromPos","atom","supportEmptyRange","takeSide","flattenV","rectBefore","rectAfter","resolve","inlineContent","before","flattenH","after","_before","_after","ignoreForCoords","_target","withFlushedState","viewState","active","activeElement","updateState","focus","maybeRTL","cachedState","cachedDir","cachedResult","_endOfTextblock","sel","selection","$pos","$from","$to","nearest","boxes","endOfTextblockVertical","$head","isTextblock","parentOffset","atStart","atEnd","domSelection","textContent","modify","_view$domSelectionRan","domSelectionRange","oldNode","oldOff","oldBidiLevel","caretBidiLevel","parentDOM","depth","domAfterPos","_view$domSelectionRan2","newNode","newOff","collapse","extend","start","end","endOfTextblockHorizontal","ViewDesc","children","dirty","widget","mark","outerDeco","innerDeco","destroy","posBeforeChild","domBefore","domAfter","_desc","posAtEnd","compareDocumentPosition","search","_search","onlyNodes","getDesc","nodeDOM","scan","localPosFromDOM","descAt","curPos","TrailingHackViewDesc","WidgetViewDesc","_prev","enter","domAtom","_enter","fromOffset","toOffset","childBase","parseRange","emptyChildAt","_j","_this$domFromPos","RangeError","anchor","head","force","setSelection","anchorDOM","headDOM","getSelection","brKludge","_anchorDOM","_offset","_after2","domSelExtended","tmp","removeAllRanges","addRange","mutation","type","startInside","endInside","contentLost","markDirty","level","text","_ViewDesc","_super","_this","toDOM","spec","raw","wrap","createElement","appendChild","classList","add","eq","ignore","stop","stopEvent","ignoreSelection","CompositionViewDesc","_ViewDesc2","_super2","textDOM","_this2","mut","oldValue","MarkViewDesc","_ViewDesc3","_super3","_this3","reparseInView","attrs","contentElement","copy","nodes","replaceNodes","inline","custom","nodeViews","DOMSerializer","renderSpec","NodeViewDesc","_ViewDesc4","_super4","_this4","_this5","rule","whitespace","preserveWhitespace","getContent","Fragment","empty","sameOuterDeco","isLeaf","_this6","composition","composing","localCompositionInfo","localComposition","compositionInChild","updater","ViewTreeUpdater","deco","onWidget","onNode","locals","childCount","forChild","decoIndex","restNode","parentIndex","widgets","sort","compareSide","_i2","_child","_i3","splice","cutAt","_i4","cut","isInline","filter","d","iterDeco","insideNode","marks","syncToMarks","Mark","none","placeWidget","compIndex","findNodeMatch","findIndexWithChild","updateNodeAt","updateNextNode","addNode","addTextblockHacks","destroyRest","changed","protectLocalComposition","renderDescs","oldCSS","cssText","window","listStyle","iosHacks","_view$state$selection","TextSelection","textNode","compositionNode","textPos","frag","childStart","str","found","lastIndexOf","findTextInFragment","_ref2","topNode","removeChild","compositionNodes","sameMarkup","updateInner","updateOuterDeco","updateChildren","needsWrap","oldDOM","patchOuterDeco","computeOuterDeco","remove","removeAttribute","isAtom","descObj","createTextNode","_spec","hasAttribute","applyOuterDeco","CustomNodeViewDesc","TextViewDesc","docViewDesc","_NodeViewDesc","_super5","skip","pmIsDeco","inParent","trackWrites","_ViewDesc5","_super6","_NodeViewDesc2","_super7","_this7","update","multiType","selectNode","deselectNode","ignoreMutation","descs","written","childDOM","rm","insertBefore","OuterDecoLevel","noDeco","val","outerDOM","prevComputed","curComputed","curDOM","toLowerCase","patchAttributes","_name","setAttribute","prevList","split","curList","indexOf","_i","m","prop","removeProperty","b","lock","preMatch","parentDesc","curDesc","descI","fI","matched","Map","matches","outer","set","reverse","destroyBetween","keep","maxKeep","matchesMark","spanning","pop","isLocked","markDesc","targetDesc","matchesNode","has","domNode","_preMatch","nextDOM","updated","locked","recreateWrapper","wrapper","_step","_iterator","matchesWidget","requiresGeckoHackNode","addHackNode","matchesHack","className","alt","hack","replacement","selectionFromDOM","origin","inWidget","nearestDescNode","NodeSelection","isSelectable","isOnEdge","Selection","rangeCount","getRangeAt","endContainer","endOffset","_ref4","$anchor","selectionBetween","editorOwnsSelection","editable","hasFocus","hasSelection","selectionToDOM","syncNodeSelection","mouseDown","allowDefault","curSel","domObserver","currentSelection","delayedSelectionSync","setCurSelection","disconnectSelection","cursorWrapper","img","visible","disabled","selectCursorWrapper","resetEditableFrom","resetEditableTo","brokenSelectBetweenUneditable","temporarilyEditableNear","resetEditable","removeEventListener","hideSelectionGuard","addEventListener","setTimeout","removeClassOnSelectionChange","connectSelection","_view$docView$domFrom3","setEditable","wasDraggable","lastSelectedViewDesc","clearNodeSelection","between","hasFocusAndSelection","moveSelectionBlock","_state$selection","$side","$start","findFrom","dispatch","tr","scrollIntoView","selectHorizontally","mods","_next","textOffset","nodeBefore","nodeAfter","$newHead","endOfTextblock","_$head","_node","nodePos","nodeLen","isIgnorable","skipIgnoredNodes","moveNode","moveOffset","isBlockNode","setSelFocus","skipIgnoredNodesBefore","skipIgnoredNodesAfter","textNodeAfter","textNodeBefore","findDirection","coordsAtPos","mid","abs","_mid","direction","selectVertically","beyond","AllSelection","near","stopNativeHorizontalDelete","_view$state$selection2","sameParent","nextNode","switchEditable","captureKeyDown","ctrlKey","metaKey","altKey","shiftKey","getMods","_dir","_view$domSelectionRan3","safariDownArrowBug","serializeForClipboard","context","_slice","openStart","openEnd","defaultAttrs","serializer","fromSchema","schema","detachedDoc","serializeFragment","wrappers","wrapMap","concat","JSON","stringify","textBetween","parseFromClipboard","html","plainText","$context","inCode","asText","Slice","replace","parsed","forEach","block","serializeNode","metas","firstTag","map","join","innerHTML","trustedTypes","createPolicy","createHTML","maybeWrapTrusted","querySelector","readHTML","querySelectorAll","replaceChild","restoreReplacedSpaces","contextNode","sliceData","getAttribute","parser","DOMParser","parseSlice","ruleFromNode","inlineParents","array","parse","hasRequiredAttrs","addContext","closeSlice","maxOpen","fragment","_ret","_loop","lastWrap","match","contentMatchAt","inLast","findWrapping","addToSibling","closeRight","wrapped","withWrappers","matchType","v","normalizeSiblings","isolating","_node2","sibling","inner","append","fill","fillBefore","closeRange","thead","tbody","tfoot","caption","colgroup","col","td","th","_detachedDoc","implementation","createHTMLDocument","handlers","editHandlers","passiveHandlers","touchstart","touchmove","InputState","lastKeyCode","lastKeyCodeTime","lastClick","time","lastSelectionOrigin","lastSelectionTime","lastIOSEnter","lastIOSEnterFallbackTimeout","lastFocus","lastTouch","lastAndroidDelete","composingTimeout","compositionEndedAt","compositionID","compositionPendingChanges","domChangeCount","eventHandlers","setSelectionOrigin","Date","now","ensureListeners","currentHandlers","runCustomHandler","handler","defaultPrevented","eventCoords","clientX","clientY","runHandlerOnContext","propName","_ret2","_loop3","updateSelection","focused","setMeta","handleSingleClick","selectedNode","selectAt","selectClickedNode","selectClickedLeaf","handleDoubleClick","handleTripleClick","button","defaultTripleClick","forceDOMFlush","endComposition","keydown","_event","inOrNearComposition","forceFlush","preventDefault","keyup","keypress","charCode","fromCharCode","insertText","selectNodeModifier","mousedown","flushed","click","dy","isNear","posAtCoords","MouseDown","targetPos","_this8","mightDrag","startDoc","nodeAt","selectable","addAttr","setUneditable","up","move","_this9","updateAllowDefault","buttons","timeStamp","contextmenu","timeoutComposition","scheduleComposeEnd","delay","clearTimeout","clearComposition","markParentsDirty","findCompositionNode","textBefore","textNodeBefore$1","textAfter","textNodeAfter$1","descAfter","lastChanged","lastChangedTextNode","descBefore","restarting","flushingSoon","markCursor","deleteSelection","compositionstart","compositionupdate","flush","storedMarks","some","inclusive","_sel","compositionend","pendingRecords","Promise","then","brokenClipboardAPI","doPaste","preferPlain","singleNode","sliceSingleNode","replaceSelectionWith","replaceSelection","getText","clipboardData","getData","uris","data","_serializeForClipboar","clearData","setData","selectNodeContents","blur","captureCopy","paste","plain","capturePaste","Dragging","dragCopyModifier","dragstart","dataTransfer","_serializeForClipboar2","files","effectAllowed","dragging","dragend","dragover","dragenter","drop","eventPos","$mouse","insertPos","dropPoint","mapping","isNode","beforeInsert","replaceRangeWith","replaceRange","maps","_from","_to","_newFrom","newTo","relatedTarget","clear","beforeinput","inputType","flushSoon","$cursor","compareObjs","_p","WidgetType","noSpec","span","oldOffset","_mapping$mapResult","mapResult","deleted","Decoration","other","InlineType","inclusiveStart","inclusiveEnd","NodeType","_node$content$findInd","findIndex","DecorationSet","local","predicate","findInner","_i5","childOff","options","mapInner","newLocal","mapped","valid","onRemove","mapChildren","byPos","decorations","addInner","_this10","childNode","childOffset","baseOffset","takeSpansForNode","buildTree","moveSpans","withoutNulls","removeInner","removed","_span","_i6","_j2","_i7","dec","localSet","DecorationGroup","_i8","removeOverlap","localsInner","is","members","mappedDecos","member","sorted","forEachSet","every","reduce","oldChildren","_loop4","_baseOffset","moved","oldStart","oldEnd","newStart","newEnd","dSize","_i12","mustRebuild","_i9","fromLocal","toLocal","_node$content$findInd2","maybeChild","gather","_i13","mapAndGatherRemainingDecorations","built","_i10","_i11","_from2","spans","hasNulls","localStart","subtree","working","insertAhead","viewDecorations","observeOptions","childList","characterData","characterDataOldValue","attributes","attributeOldValue","useCharData","SelectionState","DOMObserver","handleDOMChange","_this11","queue","observer","onCharData","suppressingSelectionUpdates","MutationObserver","mutations","removedNodes","prevValue","onSelectionChange","_this12","takeRecords","observe","_this13","take","disconnect","_this14","container","ancestors","Set","_scan","_step2","_iterator2","newSel","ignoreSelectionChange","typeOver","added","registerMutation","brs","_brs","_step3","_iterator3","br","blockParent","readSel","scrollToSelection","cssChecked","whiteSpace","cssCheckWarned","console","checkCSS","attributeName","addedNodes","_i14","_mut$addedNodes$_i","WeakMap","rangeToSelectionRange","currentAnchor","domAtPos","_ref5","parseRule","readDOMChange","_tr","$before","shared","sharedDepth","preferredPos","preferredSide","from_","to_","_view$docView$parseRa","topMatch","topOpen","findPositions","_anchor","parseBetween","compare","change","findDiffStart","_a$findDiffEnd","findDiffEnd","endA","endB","isSurrogatePair","_move","findDiff","_sel2","resolveSelection","_tr2","nextSel","resolveNoCache","$fromA","inlineChange","old","$newStart","$newEnd","skipClosingAndOpening","$next","looksLikeBackspace","suppressSelectionUpdates","markChange","chFrom","chTo","marksAcross","curMarks","prevMarks","removeFromSet","_i15","addToSet","_i16","isMarkChange","addMark","removeMark","_sel3","ensureMarks","parsedSel","fromEnd","mayOpen","indexAfter","charCodeAt","__serializeForClipboard","__parseFromClipboard","__endComposition","EditorView","place","_this15","_root","mounted","prevDirectPlugins","pluginViews","_props","directPlugins","plugins","checkStateComponent","mount","getEditable","updateCursorWrapper","buildNodeViews","computeDocDeco","_loop2","bubbles","eventBelongsToView","passive","initInput","updatePluginViews","handleDOMEvents","prevProps","updateStateInner","_name2","_a","redraw","updateSel","pluginsChanged","nA","nB","_prop4","changedNodeViews","scroll","updateDoc","sel1","sel2","_ref","refDOM","refTop","newRefTop","oldScrollPos","overflowAnchor","innerHeight","localRect","storeScrollPos","forceSelUpdate","chromeKludge","updateDraggedNode","_this16","prevState","_i18","pluginView","destroyPluginViews","plugin","_i17","_plugin","movedPos","_prop","_i19","_prop2","parentElement","setActive","stored","preventScroll","focusPreventScroll","_this17","cached","_ret3","_loop5","ClipboardEvent","destroyInput","_dispatchEvent","dispatchTransaction","shadowRoot","deepActiveElement","getComposedRanges","read","stopImmediatePropagation","getTargetRanges","execCommand","safariShadowSelectionRange","contenteditable","attr","translate","obj","_prop3","filterTransaction","appendTransaction","dist"],"mappings":"wSAEA,SAASA,EAAeC,EAAKC,GAAK,OAGlC,SAAyBD,GAAO,GAAIE,MAAMC,QAAQH,GAAM,OAAOA,CAAI,CAH1BI,CAAgBJ,IAEzD,SAA+BK,EAAGC,GAAK,IAAIC,EAAI,MAAQF,EAAI,KAAO,oBAAsBG,QAAUH,EAAEG,OAAOC,WAAaJ,EAAE,cAAe,GAAI,MAAQE,EAAG,CAAE,IAAIG,EAAGC,EAAGV,EAAGW,EAAGC,EAAI,GAAIC,GAAI,EAAIC,GAAI,EAAI,IAAM,GAAId,GAAKM,EAAIA,EAAES,KAAKX,IAAIY,KAAM,IAAMX,QAAiD,OAASQ,GAAKJ,EAAIT,EAAEe,KAAKT,IAAIW,QAAUL,EAAEM,KAAKT,EAAEU,OAAQP,EAAEQ,SAAWf,GAAIQ,GAAI,GAAI,CAAG,MAAOT,GAAKU,GAAI,EAAIJ,EAAIN,CAAE,SAAa,IAAM,IAAKS,GAAK,MAAQP,EAAU,SAAMK,EAAIL,EAAU,SAAKe,OAAOV,KAAOA,GAAI,MAAO,SAAa,GAAIG,EAAG,MAAMJ,CAAE,EAAK,OAAOE,CAAI,CAAA,CAFvdU,CAAsBvB,EAAKC,IAAMuB,EAA4BxB,EAAKC,IACnI,WAA8B,MAAM,IAAIwB,UAAU,4IAA6I,CADtDC,EAAmB,CAI5J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