@lotte-innovate/ui-component-test 0.1.76 → 0.1.78
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 +7 -6
- package/public/tinymce/CHANGELOG.md +3453 -0
- package/public/tinymce/README.md +73 -0
- package/public/tinymce/bower.json +27 -0
- package/public/tinymce/composer.json +52 -0
- package/public/tinymce/icons/default/icons.js +194 -0
- package/public/tinymce/icons/default/icons.min.js +1 -0
- package/public/tinymce/icons/default/index.js +7 -0
- package/public/tinymce/license.txt +21 -0
- package/public/tinymce/models/dom/index.js +7 -0
- package/public/tinymce/models/dom/model.js +8040 -0
- package/public/tinymce/models/dom/model.min.js +4 -0
- package/public/tinymce/package.json +32 -0
- package/public/tinymce/plugins/advlist/index.js +7 -0
- package/public/tinymce/plugins/advlist/plugin.js +259 -0
- package/public/tinymce/plugins/advlist/plugin.min.js +4 -0
- package/public/tinymce/plugins/autolink/index.js +7 -0
- package/public/tinymce/plugins/autolink/plugin.js +228 -0
- package/public/tinymce/plugins/autolink/plugin.min.js +4 -0
- package/public/tinymce/plugins/code/index.js +7 -0
- package/public/tinymce/plugins/code/plugin.js +85 -0
- package/public/tinymce/plugins/code/plugin.min.js +4 -0
- package/public/tinymce/plugins/codesample/index.js +7 -0
- package/public/tinymce/plugins/codesample/plugin.js +2463 -0
- package/public/tinymce/plugins/codesample/plugin.min.js +4 -0
- package/public/tinymce/plugins/image/index.js +7 -0
- package/public/tinymce/plugins/image/plugin.js +1505 -0
- package/public/tinymce/plugins/image/plugin.min.js +4 -0
- package/public/tinymce/plugins/link/index.js +7 -0
- package/public/tinymce/plugins/link/plugin.js +1242 -0
- package/public/tinymce/plugins/link/plugin.min.js +4 -0
- package/public/tinymce/plugins/lists/index.js +7 -0
- package/public/tinymce/plugins/lists/plugin.js +2172 -0
- package/public/tinymce/plugins/lists/plugin.min.js +4 -0
- package/public/tinymce/plugins/table/index.js +7 -0
- package/public/tinymce/plugins/table/plugin.js +3462 -0
- package/public/tinymce/plugins/table/plugin.min.js +4 -0
- package/public/tinymce/skins/content/dark/content.css +66 -0
- package/public/tinymce/skins/content/dark/content.js +2 -0
- package/public/tinymce/skins/content/dark/content.min.css +1 -0
- package/public/tinymce/skins/content/default/content.css +61 -0
- package/public/tinymce/skins/content/default/content.js +2 -0
- package/public/tinymce/skins/content/default/content.min.css +1 -0
- package/public/tinymce/skins/content/document/content.js +2 -0
- package/public/tinymce/skins/content/document/content.min.css +1 -0
- package/public/tinymce/skins/content/tinymce-5/content.js +2 -0
- package/public/tinymce/skins/content/tinymce-5/content.min.css +1 -0
- package/public/tinymce/skins/content/tinymce-5-dark/content.js +2 -0
- package/public/tinymce/skins/content/tinymce-5-dark/content.min.css +1 -0
- package/public/tinymce/skins/content/writer/content.js +2 -0
- package/public/tinymce/skins/content/writer/content.min.css +1 -0
- package/public/tinymce/skins/ui/oxide/content.css +785 -0
- package/public/tinymce/skins/ui/oxide/content.inline.css +779 -0
- package/public/tinymce/skins/ui/oxide/content.inline.js +2 -0
- package/public/tinymce/skins/ui/oxide/content.inline.min.css +1 -0
- package/public/tinymce/skins/ui/oxide/content.js +2 -0
- package/public/tinymce/skins/ui/oxide/content.min.css +1 -0
- package/public/tinymce/skins/ui/oxide/skin.css +3763 -0
- package/public/tinymce/skins/ui/oxide/skin.js +2 -0
- package/public/tinymce/skins/ui/oxide/skin.min.css +1 -0
- package/public/tinymce/skins/ui/oxide/skin.shadowdom.css +30 -0
- package/public/tinymce/skins/ui/oxide/skin.shadowdom.js +2 -0
- package/public/tinymce/skins/ui/oxide/skin.shadowdom.min.css +1 -0
- package/public/tinymce/skins/ui/oxide-dark/content.css +766 -0
- package/public/tinymce/skins/ui/oxide-dark/content.inline.css +779 -0
- package/public/tinymce/skins/ui/oxide-dark/content.inline.js +2 -0
- package/public/tinymce/skins/ui/oxide-dark/content.inline.min.css +1 -0
- package/public/tinymce/skins/ui/oxide-dark/content.js +2 -0
- package/public/tinymce/skins/ui/oxide-dark/content.min.css +1 -0
- package/public/tinymce/skins/ui/oxide-dark/skin.css +3766 -0
- package/public/tinymce/skins/ui/oxide-dark/skin.js +2 -0
- package/public/tinymce/skins/ui/oxide-dark/skin.min.css +1 -0
- package/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.css +30 -0
- package/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.js +2 -0
- package/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css +1 -0
- package/public/tinymce/skins/ui/tinymce-5/content.inline.js +2 -0
- package/public/tinymce/skins/ui/tinymce-5/content.inline.min.css +1 -0
- package/public/tinymce/skins/ui/tinymce-5/content.js +2 -0
- package/public/tinymce/skins/ui/tinymce-5/content.min.css +1 -0
- package/public/tinymce/skins/ui/tinymce-5/skin.js +2 -0
- package/public/tinymce/skins/ui/tinymce-5/skin.min.css +1 -0
- package/public/tinymce/skins/ui/tinymce-5/skin.shadowdom.js +2 -0
- package/public/tinymce/skins/ui/tinymce-5/skin.shadowdom.min.css +1 -0
- package/public/tinymce/skins/ui/tinymce-5-dark/content.inline.js +2 -0
- package/public/tinymce/skins/ui/tinymce-5-dark/content.inline.min.css +1 -0
- package/public/tinymce/skins/ui/tinymce-5-dark/content.js +2 -0
- package/public/tinymce/skins/ui/tinymce-5-dark/content.min.css +1 -0
- package/public/tinymce/skins/ui/tinymce-5-dark/skin.js +2 -0
- package/public/tinymce/skins/ui/tinymce-5-dark/skin.min.css +1 -0
- package/public/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.js +2 -0
- package/public/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.min.css +1 -0
- package/public/tinymce/themes/silver/index.js +7 -0
- package/public/tinymce/themes/silver/theme.js +30775 -0
- package/public/tinymce/themes/silver/theme.min.js +384 -0
- package/public/tinymce/tinymce.d.ts +3238 -0
- package/public/tinymce/tinymce.js +31779 -0
- package/public/tinymce/tinymce.min.js +384 -0
- 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-transform/dist/index.js"],"sourcesContent":["import { ReplaceError, Slice, Fragment, MarkType, Mark } from 'prosemirror-model';\n\n// Recovery values encode a range index and an offset. They are\n// represented as numbers, because tons of them will be created when\n// mapping, for example, a large number of decorations. The number's\n// lower 16 bits provide the index, the remaining bits the offset.\n//\n// Note: We intentionally don't use bit shift operators to en- and\n// decode these, since those clip to 32 bits, which we might in rare\n// cases want to overflow. A 64-bit float can represent 48-bit\n// integers precisely.\nconst lower16 = 0xffff;\nconst factor16 = Math.pow(2, 16);\nfunction makeRecover(index, offset) { return index + offset * factor16; }\nfunction recoverIndex(value) { return value & lower16; }\nfunction recoverOffset(value) { return (value - (value & lower16)) / factor16; }\nconst DEL_BEFORE = 1, DEL_AFTER = 2, DEL_ACROSS = 4, DEL_SIDE = 8;\n/**\nAn object representing a mapped position with extra\ninformation.\n*/\nclass MapResult {\n /**\n @internal\n */\n constructor(\n /**\n The mapped version of the position.\n */\n pos, \n /**\n @internal\n */\n delInfo, \n /**\n @internal\n */\n recover) {\n this.pos = pos;\n this.delInfo = delInfo;\n this.recover = recover;\n }\n /**\n Tells you whether the position was deleted, that is, whether the\n step removed the token on the side queried (via the `assoc`)\n argument from the document.\n */\n get deleted() { return (this.delInfo & DEL_SIDE) > 0; }\n /**\n Tells you whether the token before the mapped position was deleted.\n */\n get deletedBefore() { return (this.delInfo & (DEL_BEFORE | DEL_ACROSS)) > 0; }\n /**\n True when the token after the mapped position was deleted.\n */\n get deletedAfter() { return (this.delInfo & (DEL_AFTER | DEL_ACROSS)) > 0; }\n /**\n Tells whether any of the steps mapped through deletes across the\n position (including both the token before and after the\n position).\n */\n get deletedAcross() { return (this.delInfo & DEL_ACROSS) > 0; }\n}\n/**\nA map describing the deletions and insertions made by a step, which\ncan be used to find the correspondence between positions in the\npre-step version of a document and the same position in the\npost-step version.\n*/\nclass StepMap {\n /**\n Create a position map. The modifications to the document are\n represented as an array of numbers, in which each group of three\n represents a modified chunk as `[start, oldSize, newSize]`.\n */\n constructor(\n /**\n @internal\n */\n ranges, \n /**\n @internal\n */\n inverted = false) {\n this.ranges = ranges;\n this.inverted = inverted;\n if (!ranges.length && StepMap.empty)\n return StepMap.empty;\n }\n /**\n @internal\n */\n recover(value) {\n let diff = 0, index = recoverIndex(value);\n if (!this.inverted)\n for (let i = 0; i < index; i++)\n diff += this.ranges[i * 3 + 2] - this.ranges[i * 3 + 1];\n return this.ranges[index * 3] + diff + recoverOffset(value);\n }\n mapResult(pos, assoc = 1) { return this._map(pos, assoc, false); }\n map(pos, assoc = 1) { return this._map(pos, assoc, true); }\n /**\n @internal\n */\n _map(pos, assoc, simple) {\n let diff = 0, oldIndex = this.inverted ? 2 : 1, newIndex = this.inverted ? 1 : 2;\n for (let i = 0; i < this.ranges.length; i += 3) {\n let start = this.ranges[i] - (this.inverted ? diff : 0);\n if (start > pos)\n break;\n let oldSize = this.ranges[i + oldIndex], newSize = this.ranges[i + newIndex], end = start + oldSize;\n if (pos <= end) {\n let side = !oldSize ? assoc : pos == start ? -1 : pos == end ? 1 : assoc;\n let result = start + diff + (side < 0 ? 0 : newSize);\n if (simple)\n return result;\n let recover = pos == (assoc < 0 ? start : end) ? null : makeRecover(i / 3, pos - start);\n let del = pos == start ? DEL_AFTER : pos == end ? DEL_BEFORE : DEL_ACROSS;\n if (assoc < 0 ? pos != start : pos != end)\n del |= DEL_SIDE;\n return new MapResult(result, del, recover);\n }\n diff += newSize - oldSize;\n }\n return simple ? pos + diff : new MapResult(pos + diff, 0, null);\n }\n /**\n @internal\n */\n touches(pos, recover) {\n let diff = 0, index = recoverIndex(recover);\n let oldIndex = this.inverted ? 2 : 1, newIndex = this.inverted ? 1 : 2;\n for (let i = 0; i < this.ranges.length; i += 3) {\n let start = this.ranges[i] - (this.inverted ? diff : 0);\n if (start > pos)\n break;\n let oldSize = this.ranges[i + oldIndex], end = start + oldSize;\n if (pos <= end && i == index * 3)\n return true;\n diff += this.ranges[i + newIndex] - oldSize;\n }\n return false;\n }\n /**\n Calls the given function on each of the changed ranges included in\n this map.\n */\n forEach(f) {\n let oldIndex = this.inverted ? 2 : 1, newIndex = this.inverted ? 1 : 2;\n for (let i = 0, diff = 0; i < this.ranges.length; i += 3) {\n let start = this.ranges[i], oldStart = start - (this.inverted ? diff : 0), newStart = start + (this.inverted ? 0 : diff);\n let oldSize = this.ranges[i + oldIndex], newSize = this.ranges[i + newIndex];\n f(oldStart, oldStart + oldSize, newStart, newStart + newSize);\n diff += newSize - oldSize;\n }\n }\n /**\n Create an inverted version of this map. The result can be used to\n map positions in the post-step document to the pre-step document.\n */\n invert() {\n return new StepMap(this.ranges, !this.inverted);\n }\n /**\n @internal\n */\n toString() {\n return (this.inverted ? \"-\" : \"\") + JSON.stringify(this.ranges);\n }\n /**\n Create a map that moves all positions by offset `n` (which may be\n negative). This can be useful when applying steps meant for a\n sub-document to a larger document, or vice-versa.\n */\n static offset(n) {\n return n == 0 ? StepMap.empty : new StepMap(n < 0 ? [0, -n, 0] : [0, 0, n]);\n }\n}\n/**\nA StepMap that contains no changed ranges.\n*/\nStepMap.empty = new StepMap([]);\n/**\nA mapping represents a pipeline of zero or more [step\nmaps](https://prosemirror.net/docs/ref/#transform.StepMap). It has special provisions for losslessly\nhandling mapping positions through a series of steps in which some\nsteps are inverted versions of earlier steps. (This comes up when\n‘[rebasing](/docs/guide/#transform.rebasing)’ steps for\ncollaboration or history management.)\n*/\nclass Mapping {\n /**\n Create a new mapping with the given position maps.\n */\n constructor(\n /**\n The step maps in this mapping.\n */\n maps = [], \n /**\n @internal\n */\n mirror, \n /**\n The starting position in the `maps` array, used when `map` or\n `mapResult` is called.\n */\n from = 0, \n /**\n The end position in the `maps` array.\n */\n to = maps.length) {\n this.maps = maps;\n this.mirror = mirror;\n this.from = from;\n this.to = to;\n }\n /**\n Create a mapping that maps only through a part of this one.\n */\n slice(from = 0, to = this.maps.length) {\n return new Mapping(this.maps, this.mirror, from, to);\n }\n /**\n @internal\n */\n copy() {\n return new Mapping(this.maps.slice(), this.mirror && this.mirror.slice(), this.from, this.to);\n }\n /**\n Add a step map to the end of this mapping. If `mirrors` is\n given, it should be the index of the step map that is the mirror\n image of this one.\n */\n appendMap(map, mirrors) {\n this.to = this.maps.push(map);\n if (mirrors != null)\n this.setMirror(this.maps.length - 1, mirrors);\n }\n /**\n Add all the step maps in a given mapping to this one (preserving\n mirroring information).\n */\n appendMapping(mapping) {\n for (let i = 0, startSize = this.maps.length; i < mapping.maps.length; i++) {\n let mirr = mapping.getMirror(i);\n this.appendMap(mapping.maps[i], mirr != null && mirr < i ? startSize + mirr : undefined);\n }\n }\n /**\n Finds the offset of the step map that mirrors the map at the\n given offset, in this mapping (as per the second argument to\n `appendMap`).\n */\n getMirror(n) {\n if (this.mirror)\n for (let i = 0; i < this.mirror.length; i++)\n if (this.mirror[i] == n)\n return this.mirror[i + (i % 2 ? -1 : 1)];\n }\n /**\n @internal\n */\n setMirror(n, m) {\n if (!this.mirror)\n this.mirror = [];\n this.mirror.push(n, m);\n }\n /**\n Append the inverse of the given mapping to this one.\n */\n appendMappingInverted(mapping) {\n for (let i = mapping.maps.length - 1, totalSize = this.maps.length + mapping.maps.length; i >= 0; i--) {\n let mirr = mapping.getMirror(i);\n this.appendMap(mapping.maps[i].invert(), mirr != null && mirr > i ? totalSize - mirr - 1 : undefined);\n }\n }\n /**\n Create an inverted version of this mapping.\n */\n invert() {\n let inverse = new Mapping;\n inverse.appendMappingInverted(this);\n return inverse;\n }\n /**\n Map a position through this mapping.\n */\n map(pos, assoc = 1) {\n if (this.mirror)\n return this._map(pos, assoc, true);\n for (let i = this.from; i < this.to; i++)\n pos = this.maps[i].map(pos, assoc);\n return pos;\n }\n /**\n Map a position through this mapping, returning a mapping\n result.\n */\n mapResult(pos, assoc = 1) { return this._map(pos, assoc, false); }\n /**\n @internal\n */\n _map(pos, assoc, simple) {\n let delInfo = 0;\n for (let i = this.from; i < this.to; i++) {\n let map = this.maps[i], result = map.mapResult(pos, assoc);\n if (result.recover != null) {\n let corr = this.getMirror(i);\n if (corr != null && corr > i && corr < this.to) {\n i = corr;\n pos = this.maps[corr].recover(result.recover);\n continue;\n }\n }\n delInfo |= result.delInfo;\n pos = result.pos;\n }\n return simple ? pos : new MapResult(pos, delInfo, null);\n }\n}\n\nconst stepsByID = Object.create(null);\n/**\nA step object represents an atomic change. It generally applies\nonly to the document it was created for, since the positions\nstored in it will only make sense for that document.\n\nNew steps are defined by creating classes that extend `Step`,\noverriding the `apply`, `invert`, `map`, `getMap` and `fromJSON`\nmethods, and registering your class with a unique\nJSON-serialization identifier using\n[`Step.jsonID`](https://prosemirror.net/docs/ref/#transform.Step^jsonID).\n*/\nclass Step {\n /**\n Get the step map that represents the changes made by this step,\n and which can be used to transform between positions in the old\n and the new document.\n */\n getMap() { return StepMap.empty; }\n /**\n Try to merge this step with another one, to be applied directly\n after it. Returns the merged step when possible, null if the\n steps can't be merged.\n */\n merge(other) { return null; }\n /**\n Deserialize a step from its JSON representation. Will call\n through to the step class' own implementation of this method.\n */\n static fromJSON(schema, json) {\n if (!json || !json.stepType)\n throw new RangeError(\"Invalid input for Step.fromJSON\");\n let type = stepsByID[json.stepType];\n if (!type)\n throw new RangeError(`No step type ${json.stepType} defined`);\n return type.fromJSON(schema, json);\n }\n /**\n To be able to serialize steps to JSON, each step needs a string\n ID to attach to its JSON representation. Use this method to\n register an ID for your step classes. Try to pick something\n that's unlikely to clash with steps from other modules.\n */\n static jsonID(id, stepClass) {\n if (id in stepsByID)\n throw new RangeError(\"Duplicate use of step JSON ID \" + id);\n stepsByID[id] = stepClass;\n stepClass.prototype.jsonID = id;\n return stepClass;\n }\n}\n/**\nThe result of [applying](https://prosemirror.net/docs/ref/#transform.Step.apply) a step. Contains either a\nnew document or a failure value.\n*/\nclass StepResult {\n /**\n @internal\n */\n constructor(\n /**\n The transformed document, if successful.\n */\n doc, \n /**\n The failure message, if unsuccessful.\n */\n failed) {\n this.doc = doc;\n this.failed = failed;\n }\n /**\n Create a successful step result.\n */\n static ok(doc) { return new StepResult(doc, null); }\n /**\n Create a failed step result.\n */\n static fail(message) { return new StepResult(null, message); }\n /**\n Call [`Node.replace`](https://prosemirror.net/docs/ref/#model.Node.replace) with the given\n arguments. Create a successful result if it succeeds, and a\n failed one if it throws a `ReplaceError`.\n */\n static fromReplace(doc, from, to, slice) {\n try {\n return StepResult.ok(doc.replace(from, to, slice));\n }\n catch (e) {\n if (e instanceof ReplaceError)\n return StepResult.fail(e.message);\n throw e;\n }\n }\n}\n\nfunction mapFragment(fragment, f, parent) {\n let mapped = [];\n for (let i = 0; i < fragment.childCount; i++) {\n let child = fragment.child(i);\n if (child.content.size)\n child = child.copy(mapFragment(child.content, f, child));\n if (child.isInline)\n child = f(child, parent, i);\n mapped.push(child);\n }\n return Fragment.fromArray(mapped);\n}\n/**\nAdd a mark to all inline content between two positions.\n*/\nclass AddMarkStep extends Step {\n /**\n Create a mark step.\n */\n constructor(\n /**\n The start of the marked range.\n */\n from, \n /**\n The end of the marked range.\n */\n to, \n /**\n The mark to add.\n */\n mark) {\n super();\n this.from = from;\n this.to = to;\n this.mark = mark;\n }\n apply(doc) {\n let oldSlice = doc.slice(this.from, this.to), $from = doc.resolve(this.from);\n let parent = $from.node($from.sharedDepth(this.to));\n let slice = new Slice(mapFragment(oldSlice.content, (node, parent) => {\n if (!node.isAtom || !parent.type.allowsMarkType(this.mark.type))\n return node;\n return node.mark(this.mark.addToSet(node.marks));\n }, parent), oldSlice.openStart, oldSlice.openEnd);\n return StepResult.fromReplace(doc, this.from, this.to, slice);\n }\n invert() {\n return new RemoveMarkStep(this.from, this.to, this.mark);\n }\n map(mapping) {\n let from = mapping.mapResult(this.from, 1), to = mapping.mapResult(this.to, -1);\n if (from.deleted && to.deleted || from.pos >= to.pos)\n return null;\n return new AddMarkStep(from.pos, to.pos, this.mark);\n }\n merge(other) {\n if (other instanceof AddMarkStep &&\n other.mark.eq(this.mark) &&\n this.from <= other.to && this.to >= other.from)\n return new AddMarkStep(Math.min(this.from, other.from), Math.max(this.to, other.to), this.mark);\n return null;\n }\n toJSON() {\n return { stepType: \"addMark\", mark: this.mark.toJSON(),\n from: this.from, to: this.to };\n }\n /**\n @internal\n */\n static fromJSON(schema, json) {\n if (typeof json.from != \"number\" || typeof json.to != \"number\")\n throw new RangeError(\"Invalid input for AddMarkStep.fromJSON\");\n return new AddMarkStep(json.from, json.to, schema.markFromJSON(json.mark));\n }\n}\nStep.jsonID(\"addMark\", AddMarkStep);\n/**\nRemove a mark from all inline content between two positions.\n*/\nclass RemoveMarkStep extends Step {\n /**\n Create a mark-removing step.\n */\n constructor(\n /**\n The start of the unmarked range.\n */\n from, \n /**\n The end of the unmarked range.\n */\n to, \n /**\n The mark to remove.\n */\n mark) {\n super();\n this.from = from;\n this.to = to;\n this.mark = mark;\n }\n apply(doc) {\n let oldSlice = doc.slice(this.from, this.to);\n let slice = new Slice(mapFragment(oldSlice.content, node => {\n return node.mark(this.mark.removeFromSet(node.marks));\n }, doc), oldSlice.openStart, oldSlice.openEnd);\n return StepResult.fromReplace(doc, this.from, this.to, slice);\n }\n invert() {\n return new AddMarkStep(this.from, this.to, this.mark);\n }\n map(mapping) {\n let from = mapping.mapResult(this.from, 1), to = mapping.mapResult(this.to, -1);\n if (from.deleted && to.deleted || from.pos >= to.pos)\n return null;\n return new RemoveMarkStep(from.pos, to.pos, this.mark);\n }\n merge(other) {\n if (other instanceof RemoveMarkStep &&\n other.mark.eq(this.mark) &&\n this.from <= other.to && this.to >= other.from)\n return new RemoveMarkStep(Math.min(this.from, other.from), Math.max(this.to, other.to), this.mark);\n return null;\n }\n toJSON() {\n return { stepType: \"removeMark\", mark: this.mark.toJSON(),\n from: this.from, to: this.to };\n }\n /**\n @internal\n */\n static fromJSON(schema, json) {\n if (typeof json.from != \"number\" || typeof json.to != \"number\")\n throw new RangeError(\"Invalid input for RemoveMarkStep.fromJSON\");\n return new RemoveMarkStep(json.from, json.to, schema.markFromJSON(json.mark));\n }\n}\nStep.jsonID(\"removeMark\", RemoveMarkStep);\n/**\nAdd a mark to a specific node.\n*/\nclass AddNodeMarkStep extends Step {\n /**\n Create a node mark step.\n */\n constructor(\n /**\n The position of the target node.\n */\n pos, \n /**\n The mark to add.\n */\n mark) {\n super();\n this.pos = pos;\n this.mark = mark;\n }\n apply(doc) {\n let node = doc.nodeAt(this.pos);\n if (!node)\n return StepResult.fail(\"No node at mark step's position\");\n let updated = node.type.create(node.attrs, null, this.mark.addToSet(node.marks));\n return StepResult.fromReplace(doc, this.pos, this.pos + 1, new Slice(Fragment.from(updated), 0, node.isLeaf ? 0 : 1));\n }\n invert(doc) {\n let node = doc.nodeAt(this.pos);\n if (node) {\n let newSet = this.mark.addToSet(node.marks);\n if (newSet.length == node.marks.length) {\n for (let i = 0; i < node.marks.length; i++)\n if (!node.marks[i].isInSet(newSet))\n return new AddNodeMarkStep(this.pos, node.marks[i]);\n return new AddNodeMarkStep(this.pos, this.mark);\n }\n }\n return new RemoveNodeMarkStep(this.pos, this.mark);\n }\n map(mapping) {\n let pos = mapping.mapResult(this.pos, 1);\n return pos.deletedAfter ? null : new AddNodeMarkStep(pos.pos, this.mark);\n }\n toJSON() {\n return { stepType: \"addNodeMark\", pos: this.pos, mark: this.mark.toJSON() };\n }\n /**\n @internal\n */\n static fromJSON(schema, json) {\n if (typeof json.pos != \"number\")\n throw new RangeError(\"Invalid input for AddNodeMarkStep.fromJSON\");\n return new AddNodeMarkStep(json.pos, schema.markFromJSON(json.mark));\n }\n}\nStep.jsonID(\"addNodeMark\", AddNodeMarkStep);\n/**\nRemove a mark from a specific node.\n*/\nclass RemoveNodeMarkStep extends Step {\n /**\n Create a mark-removing step.\n */\n constructor(\n /**\n The position of the target node.\n */\n pos, \n /**\n The mark to remove.\n */\n mark) {\n super();\n this.pos = pos;\n this.mark = mark;\n }\n apply(doc) {\n let node = doc.nodeAt(this.pos);\n if (!node)\n return StepResult.fail(\"No node at mark step's position\");\n let updated = node.type.create(node.attrs, null, this.mark.removeFromSet(node.marks));\n return StepResult.fromReplace(doc, this.pos, this.pos + 1, new Slice(Fragment.from(updated), 0, node.isLeaf ? 0 : 1));\n }\n invert(doc) {\n let node = doc.nodeAt(this.pos);\n if (!node || !this.mark.isInSet(node.marks))\n return this;\n return new AddNodeMarkStep(this.pos, this.mark);\n }\n map(mapping) {\n let pos = mapping.mapResult(this.pos, 1);\n return pos.deletedAfter ? null : new RemoveNodeMarkStep(pos.pos, this.mark);\n }\n toJSON() {\n return { stepType: \"removeNodeMark\", pos: this.pos, mark: this.mark.toJSON() };\n }\n /**\n @internal\n */\n static fromJSON(schema, json) {\n if (typeof json.pos != \"number\")\n throw new RangeError(\"Invalid input for RemoveNodeMarkStep.fromJSON\");\n return new RemoveNodeMarkStep(json.pos, schema.markFromJSON(json.mark));\n }\n}\nStep.jsonID(\"removeNodeMark\", RemoveNodeMarkStep);\n\n/**\nReplace a part of the document with a slice of new content.\n*/\nclass ReplaceStep extends Step {\n /**\n The given `slice` should fit the 'gap' between `from` and\n `to`—the depths must line up, and the surrounding nodes must be\n able to be joined with the open sides of the slice. When\n `structure` is true, the step will fail if the content between\n from and to is not just a sequence of closing and then opening\n tokens (this is to guard against rebased replace steps\n overwriting something they weren't supposed to).\n */\n constructor(\n /**\n The start position of the replaced range.\n */\n from, \n /**\n The end position of the replaced range.\n */\n to, \n /**\n The slice to insert.\n */\n slice, \n /**\n @internal\n */\n structure = false) {\n super();\n this.from = from;\n this.to = to;\n this.slice = slice;\n this.structure = structure;\n }\n apply(doc) {\n if (this.structure && contentBetween(doc, this.from, this.to))\n return StepResult.fail(\"Structure replace would overwrite content\");\n return StepResult.fromReplace(doc, this.from, this.to, this.slice);\n }\n getMap() {\n return new StepMap([this.from, this.to - this.from, this.slice.size]);\n }\n invert(doc) {\n return new ReplaceStep(this.from, this.from + this.slice.size, doc.slice(this.from, this.to));\n }\n map(mapping) {\n let from = mapping.mapResult(this.from, 1), to = mapping.mapResult(this.to, -1);\n if (from.deletedAcross && to.deletedAcross)\n return null;\n return new ReplaceStep(from.pos, Math.max(from.pos, to.pos), this.slice);\n }\n merge(other) {\n if (!(other instanceof ReplaceStep) || other.structure || this.structure)\n return null;\n if (this.from + this.slice.size == other.from && !this.slice.openEnd && !other.slice.openStart) {\n let slice = this.slice.size + other.slice.size == 0 ? Slice.empty\n : new Slice(this.slice.content.append(other.slice.content), this.slice.openStart, other.slice.openEnd);\n return new ReplaceStep(this.from, this.to + (other.to - other.from), slice, this.structure);\n }\n else if (other.to == this.from && !this.slice.openStart && !other.slice.openEnd) {\n let slice = this.slice.size + other.slice.size == 0 ? Slice.empty\n : new Slice(other.slice.content.append(this.slice.content), other.slice.openStart, this.slice.openEnd);\n return new ReplaceStep(other.from, this.to, slice, this.structure);\n }\n else {\n return null;\n }\n }\n toJSON() {\n let json = { stepType: \"replace\", from: this.from, to: this.to };\n if (this.slice.size)\n json.slice = this.slice.toJSON();\n if (this.structure)\n json.structure = true;\n return json;\n }\n /**\n @internal\n */\n static fromJSON(schema, json) {\n if (typeof json.from != \"number\" || typeof json.to != \"number\")\n throw new RangeError(\"Invalid input for ReplaceStep.fromJSON\");\n return new ReplaceStep(json.from, json.to, Slice.fromJSON(schema, json.slice), !!json.structure);\n }\n}\nStep.jsonID(\"replace\", ReplaceStep);\n/**\nReplace a part of the document with a slice of content, but\npreserve a range of the replaced content by moving it into the\nslice.\n*/\nclass ReplaceAroundStep extends Step {\n /**\n Create a replace-around step with the given range and gap.\n `insert` should be the point in the slice into which the content\n of the gap should be moved. `structure` has the same meaning as\n it has in the [`ReplaceStep`](https://prosemirror.net/docs/ref/#transform.ReplaceStep) class.\n */\n constructor(\n /**\n The start position of the replaced range.\n */\n from, \n /**\n The end position of the replaced range.\n */\n to, \n /**\n The start of preserved range.\n */\n gapFrom, \n /**\n The end of preserved range.\n */\n gapTo, \n /**\n The slice to insert.\n */\n slice, \n /**\n The position in the slice where the preserved range should be\n inserted.\n */\n insert, \n /**\n @internal\n */\n structure = false) {\n super();\n this.from = from;\n this.to = to;\n this.gapFrom = gapFrom;\n this.gapTo = gapTo;\n this.slice = slice;\n this.insert = insert;\n this.structure = structure;\n }\n apply(doc) {\n if (this.structure && (contentBetween(doc, this.from, this.gapFrom) ||\n contentBetween(doc, this.gapTo, this.to)))\n return StepResult.fail(\"Structure gap-replace would overwrite content\");\n let gap = doc.slice(this.gapFrom, this.gapTo);\n if (gap.openStart || gap.openEnd)\n return StepResult.fail(\"Gap is not a flat range\");\n let inserted = this.slice.insertAt(this.insert, gap.content);\n if (!inserted)\n return StepResult.fail(\"Content does not fit in gap\");\n return StepResult.fromReplace(doc, this.from, this.to, inserted);\n }\n getMap() {\n return new StepMap([this.from, this.gapFrom - this.from, this.insert,\n this.gapTo, this.to - this.gapTo, this.slice.size - this.insert]);\n }\n invert(doc) {\n let gap = this.gapTo - this.gapFrom;\n return new ReplaceAroundStep(this.from, this.from + this.slice.size + gap, this.from + this.insert, this.from + this.insert + gap, doc.slice(this.from, this.to).removeBetween(this.gapFrom - this.from, this.gapTo - this.from), this.gapFrom - this.from, this.structure);\n }\n map(mapping) {\n let from = mapping.mapResult(this.from, 1), to = mapping.mapResult(this.to, -1);\n let gapFrom = this.from == this.gapFrom ? from.pos : mapping.map(this.gapFrom, -1);\n let gapTo = this.to == this.gapTo ? to.pos : mapping.map(this.gapTo, 1);\n if ((from.deletedAcross && to.deletedAcross) || gapFrom < from.pos || gapTo > to.pos)\n return null;\n return new ReplaceAroundStep(from.pos, to.pos, gapFrom, gapTo, this.slice, this.insert, this.structure);\n }\n toJSON() {\n let json = { stepType: \"replaceAround\", from: this.from, to: this.to,\n gapFrom: this.gapFrom, gapTo: this.gapTo, insert: this.insert };\n if (this.slice.size)\n json.slice = this.slice.toJSON();\n if (this.structure)\n json.structure = true;\n return json;\n }\n /**\n @internal\n */\n static fromJSON(schema, json) {\n if (typeof json.from != \"number\" || typeof json.to != \"number\" ||\n typeof json.gapFrom != \"number\" || typeof json.gapTo != \"number\" || typeof json.insert != \"number\")\n throw new RangeError(\"Invalid input for ReplaceAroundStep.fromJSON\");\n return new ReplaceAroundStep(json.from, json.to, json.gapFrom, json.gapTo, Slice.fromJSON(schema, json.slice), json.insert, !!json.structure);\n }\n}\nStep.jsonID(\"replaceAround\", ReplaceAroundStep);\nfunction contentBetween(doc, from, to) {\n let $from = doc.resolve(from), dist = to - from, depth = $from.depth;\n while (dist > 0 && depth > 0 && $from.indexAfter(depth) == $from.node(depth).childCount) {\n depth--;\n dist--;\n }\n if (dist > 0) {\n let next = $from.node(depth).maybeChild($from.indexAfter(depth));\n while (dist > 0) {\n if (!next || next.isLeaf)\n return true;\n next = next.firstChild;\n dist--;\n }\n }\n return false;\n}\n\nfunction addMark(tr, from, to, mark) {\n let removed = [], added = [];\n let removing, adding;\n tr.doc.nodesBetween(from, to, (node, pos, parent) => {\n if (!node.isInline)\n return;\n let marks = node.marks;\n if (!mark.isInSet(marks) && parent.type.allowsMarkType(mark.type)) {\n let start = Math.max(pos, from), end = Math.min(pos + node.nodeSize, to);\n let newSet = mark.addToSet(marks);\n for (let i = 0; i < marks.length; i++) {\n if (!marks[i].isInSet(newSet)) {\n if (removing && removing.to == start && removing.mark.eq(marks[i]))\n removing.to = end;\n else\n removed.push(removing = new RemoveMarkStep(start, end, marks[i]));\n }\n }\n if (adding && adding.to == start)\n adding.to = end;\n else\n added.push(adding = new AddMarkStep(start, end, mark));\n }\n });\n removed.forEach(s => tr.step(s));\n added.forEach(s => tr.step(s));\n}\nfunction removeMark(tr, from, to, mark) {\n let matched = [], step = 0;\n tr.doc.nodesBetween(from, to, (node, pos) => {\n if (!node.isInline)\n return;\n step++;\n let toRemove = null;\n if (mark instanceof MarkType) {\n let set = node.marks, found;\n while (found = mark.isInSet(set)) {\n (toRemove || (toRemove = [])).push(found);\n set = found.removeFromSet(set);\n }\n }\n else if (mark) {\n if (mark.isInSet(node.marks))\n toRemove = [mark];\n }\n else {\n toRemove = node.marks;\n }\n if (toRemove && toRemove.length) {\n let end = Math.min(pos + node.nodeSize, to);\n for (let i = 0; i < toRemove.length; i++) {\n let style = toRemove[i], found;\n for (let j = 0; j < matched.length; j++) {\n let m = matched[j];\n if (m.step == step - 1 && style.eq(matched[j].style))\n found = m;\n }\n if (found) {\n found.to = end;\n found.step = step;\n }\n else {\n matched.push({ style, from: Math.max(pos, from), to: end, step });\n }\n }\n }\n });\n matched.forEach(m => tr.step(new RemoveMarkStep(m.from, m.to, m.style)));\n}\nfunction clearIncompatible(tr, pos, parentType, match = parentType.contentMatch, clearNewlines = true) {\n let node = tr.doc.nodeAt(pos);\n let replSteps = [], cur = pos + 1;\n for (let i = 0; i < node.childCount; i++) {\n let child = node.child(i), end = cur + child.nodeSize;\n let allowed = match.matchType(child.type);\n if (!allowed) {\n replSteps.push(new ReplaceStep(cur, end, Slice.empty));\n }\n else {\n match = allowed;\n for (let j = 0; j < child.marks.length; j++)\n if (!parentType.allowsMarkType(child.marks[j].type))\n tr.step(new RemoveMarkStep(cur, end, child.marks[j]));\n if (clearNewlines && child.isText && parentType.whitespace != \"pre\") {\n let m, newline = /\\r?\\n|\\r/g, slice;\n while (m = newline.exec(child.text)) {\n if (!slice)\n slice = new Slice(Fragment.from(parentType.schema.text(\" \", parentType.allowedMarks(child.marks))), 0, 0);\n replSteps.push(new ReplaceStep(cur + m.index, cur + m.index + m[0].length, slice));\n }\n }\n }\n cur = end;\n }\n if (!match.validEnd) {\n let fill = match.fillBefore(Fragment.empty, true);\n tr.replace(cur, cur, new Slice(fill, 0, 0));\n }\n for (let i = replSteps.length - 1; i >= 0; i--)\n tr.step(replSteps[i]);\n}\n\nfunction canCut(node, start, end) {\n return (start == 0 || node.canReplace(start, node.childCount)) &&\n (end == node.childCount || node.canReplace(0, end));\n}\n/**\nTry to find a target depth to which the content in the given range\ncan be lifted. Will not go across\n[isolating](https://prosemirror.net/docs/ref/#model.NodeSpec.isolating) parent nodes.\n*/\nfunction liftTarget(range) {\n let parent = range.parent;\n let content = parent.content.cutByIndex(range.startIndex, range.endIndex);\n for (let depth = range.depth;; --depth) {\n let node = range.$from.node(depth);\n let index = range.$from.index(depth), endIndex = range.$to.indexAfter(depth);\n if (depth < range.depth && node.canReplace(index, endIndex, content))\n return depth;\n if (depth == 0 || node.type.spec.isolating || !canCut(node, index, endIndex))\n break;\n }\n return null;\n}\nfunction lift(tr, range, target) {\n let { $from, $to, depth } = range;\n let gapStart = $from.before(depth + 1), gapEnd = $to.after(depth + 1);\n let start = gapStart, end = gapEnd;\n let before = Fragment.empty, openStart = 0;\n for (let d = depth, splitting = false; d > target; d--)\n if (splitting || $from.index(d) > 0) {\n splitting = true;\n before = Fragment.from($from.node(d).copy(before));\n openStart++;\n }\n else {\n start--;\n }\n let after = Fragment.empty, openEnd = 0;\n for (let d = depth, splitting = false; d > target; d--)\n if (splitting || $to.after(d + 1) < $to.end(d)) {\n splitting = true;\n after = Fragment.from($to.node(d).copy(after));\n openEnd++;\n }\n else {\n end++;\n }\n tr.step(new ReplaceAroundStep(start, end, gapStart, gapEnd, new Slice(before.append(after), openStart, openEnd), before.size - openStart, true));\n}\n/**\nTry to find a valid way to wrap the content in the given range in a\nnode of the given type. May introduce extra nodes around and inside\nthe wrapper node, if necessary. Returns null if no valid wrapping\ncould be found. When `innerRange` is given, that range's content is\nused as the content to fit into the wrapping, instead of the\ncontent of `range`.\n*/\nfunction findWrapping(range, nodeType, attrs = null, innerRange = range) {\n let around = findWrappingOutside(range, nodeType);\n let inner = around && findWrappingInside(innerRange, nodeType);\n if (!inner)\n return null;\n return around.map(withAttrs)\n .concat({ type: nodeType, attrs }).concat(inner.map(withAttrs));\n}\nfunction withAttrs(type) { return { type, attrs: null }; }\nfunction findWrappingOutside(range, type) {\n let { parent, startIndex, endIndex } = range;\n let around = parent.contentMatchAt(startIndex).findWrapping(type);\n if (!around)\n return null;\n let outer = around.length ? around[0] : type;\n return parent.canReplaceWith(startIndex, endIndex, outer) ? around : null;\n}\nfunction findWrappingInside(range, type) {\n let { parent, startIndex, endIndex } = range;\n let inner = parent.child(startIndex);\n let inside = type.contentMatch.findWrapping(inner.type);\n if (!inside)\n return null;\n let lastType = inside.length ? inside[inside.length - 1] : type;\n let innerMatch = lastType.contentMatch;\n for (let i = startIndex; innerMatch && i < endIndex; i++)\n innerMatch = innerMatch.matchType(parent.child(i).type);\n if (!innerMatch || !innerMatch.validEnd)\n return null;\n return inside;\n}\nfunction wrap(tr, range, wrappers) {\n let content = Fragment.empty;\n for (let i = wrappers.length - 1; i >= 0; i--) {\n if (content.size) {\n let match = wrappers[i].type.contentMatch.matchFragment(content);\n if (!match || !match.validEnd)\n throw new RangeError(\"Wrapper type given to Transform.wrap does not form valid content of its parent wrapper\");\n }\n content = Fragment.from(wrappers[i].type.create(wrappers[i].attrs, content));\n }\n let start = range.start, end = range.end;\n tr.step(new ReplaceAroundStep(start, end, start, end, new Slice(content, 0, 0), wrappers.length, true));\n}\nfunction setBlockType(tr, from, to, type, attrs) {\n if (!type.isTextblock)\n throw new RangeError(\"Type given to setBlockType should be a textblock\");\n let mapFrom = tr.steps.length;\n tr.doc.nodesBetween(from, to, (node, pos) => {\n let attrsHere = typeof attrs == \"function\" ? attrs(node) : attrs;\n if (node.isTextblock && !node.hasMarkup(type, attrsHere) &&\n canChangeType(tr.doc, tr.mapping.slice(mapFrom).map(pos), type)) {\n let convertNewlines = null;\n if (type.schema.linebreakReplacement) {\n let pre = type.whitespace == \"pre\", supportLinebreak = !!type.contentMatch.matchType(type.schema.linebreakReplacement);\n if (pre && !supportLinebreak)\n convertNewlines = false;\n else if (!pre && supportLinebreak)\n convertNewlines = true;\n }\n // Ensure all markup that isn't allowed in the new node type is cleared\n if (convertNewlines === false)\n replaceLinebreaks(tr, node, pos, mapFrom);\n clearIncompatible(tr, tr.mapping.slice(mapFrom).map(pos, 1), type, undefined, convertNewlines === null);\n let mapping = tr.mapping.slice(mapFrom);\n let startM = mapping.map(pos, 1), endM = mapping.map(pos + node.nodeSize, 1);\n tr.step(new ReplaceAroundStep(startM, endM, startM + 1, endM - 1, new Slice(Fragment.from(type.create(attrsHere, null, node.marks)), 0, 0), 1, true));\n if (convertNewlines === true)\n replaceNewlines(tr, node, pos, mapFrom);\n return false;\n }\n });\n}\nfunction replaceNewlines(tr, node, pos, mapFrom) {\n node.forEach((child, offset) => {\n if (child.isText) {\n let m, newline = /\\r?\\n|\\r/g;\n while (m = newline.exec(child.text)) {\n let start = tr.mapping.slice(mapFrom).map(pos + 1 + offset + m.index);\n tr.replaceWith(start, start + 1, node.type.schema.linebreakReplacement.create());\n }\n }\n });\n}\nfunction replaceLinebreaks(tr, node, pos, mapFrom) {\n node.forEach((child, offset) => {\n if (child.type == child.type.schema.linebreakReplacement) {\n let start = tr.mapping.slice(mapFrom).map(pos + 1 + offset);\n tr.replaceWith(start, start + 1, node.type.schema.text(\"\\n\"));\n }\n });\n}\nfunction canChangeType(doc, pos, type) {\n let $pos = doc.resolve(pos), index = $pos.index();\n return $pos.parent.canReplaceWith(index, index + 1, type);\n}\n/**\nChange the type, attributes, and/or marks of the node at `pos`.\nWhen `type` isn't given, the existing node type is preserved,\n*/\nfunction setNodeMarkup(tr, pos, type, attrs, marks) {\n let node = tr.doc.nodeAt(pos);\n if (!node)\n throw new RangeError(\"No node at given position\");\n if (!type)\n type = node.type;\n let newNode = type.create(attrs, null, marks || node.marks);\n if (node.isLeaf)\n return tr.replaceWith(pos, pos + node.nodeSize, newNode);\n if (!type.validContent(node.content))\n throw new RangeError(\"Invalid content for node type \" + type.name);\n tr.step(new ReplaceAroundStep(pos, pos + node.nodeSize, pos + 1, pos + node.nodeSize - 1, new Slice(Fragment.from(newNode), 0, 0), 1, true));\n}\n/**\nCheck whether splitting at the given position is allowed.\n*/\nfunction canSplit(doc, pos, depth = 1, typesAfter) {\n let $pos = doc.resolve(pos), base = $pos.depth - depth;\n let innerType = (typesAfter && typesAfter[typesAfter.length - 1]) || $pos.parent;\n if (base < 0 || $pos.parent.type.spec.isolating ||\n !$pos.parent.canReplace($pos.index(), $pos.parent.childCount) ||\n !innerType.type.validContent($pos.parent.content.cutByIndex($pos.index(), $pos.parent.childCount)))\n return false;\n for (let d = $pos.depth - 1, i = depth - 2; d > base; d--, i--) {\n let node = $pos.node(d), index = $pos.index(d);\n if (node.type.spec.isolating)\n return false;\n let rest = node.content.cutByIndex(index, node.childCount);\n let overrideChild = typesAfter && typesAfter[i + 1];\n if (overrideChild)\n rest = rest.replaceChild(0, overrideChild.type.create(overrideChild.attrs));\n let after = (typesAfter && typesAfter[i]) || node;\n if (!node.canReplace(index + 1, node.childCount) || !after.type.validContent(rest))\n return false;\n }\n let index = $pos.indexAfter(base);\n let baseType = typesAfter && typesAfter[0];\n return $pos.node(base).canReplaceWith(index, index, baseType ? baseType.type : $pos.node(base + 1).type);\n}\nfunction split(tr, pos, depth = 1, typesAfter) {\n let $pos = tr.doc.resolve(pos), before = Fragment.empty, after = Fragment.empty;\n for (let d = $pos.depth, e = $pos.depth - depth, i = depth - 1; d > e; d--, i--) {\n before = Fragment.from($pos.node(d).copy(before));\n let typeAfter = typesAfter && typesAfter[i];\n after = Fragment.from(typeAfter ? typeAfter.type.create(typeAfter.attrs, after) : $pos.node(d).copy(after));\n }\n tr.step(new ReplaceStep(pos, pos, new Slice(before.append(after), depth, depth), true));\n}\n/**\nTest whether the blocks before and after a given position can be\njoined.\n*/\nfunction canJoin(doc, pos) {\n let $pos = doc.resolve(pos), index = $pos.index();\n return joinable($pos.nodeBefore, $pos.nodeAfter) &&\n $pos.parent.canReplace(index, index + 1);\n}\nfunction canAppendWithSubstitutedLinebreaks(a, b) {\n if (!b.content.size)\n a.type.compatibleContent(b.type);\n let match = a.contentMatchAt(a.childCount);\n let { linebreakReplacement } = a.type.schema;\n for (let i = 0; i < b.childCount; i++) {\n let child = b.child(i);\n let type = child.type == linebreakReplacement ? a.type.schema.nodes.text : child.type;\n match = match.matchType(type);\n if (!match)\n return false;\n if (!a.type.allowsMarks(child.marks))\n return false;\n }\n return match.validEnd;\n}\nfunction joinable(a, b) {\n return !!(a && b && !a.isLeaf && canAppendWithSubstitutedLinebreaks(a, b));\n}\n/**\nFind an ancestor of the given position that can be joined to the\nblock before (or after if `dir` is positive). Returns the joinable\npoint, if any.\n*/\nfunction joinPoint(doc, pos, dir = -1) {\n let $pos = doc.resolve(pos);\n for (let d = $pos.depth;; d--) {\n let before, after, index = $pos.index(d);\n if (d == $pos.depth) {\n before = $pos.nodeBefore;\n after = $pos.nodeAfter;\n }\n else if (dir > 0) {\n before = $pos.node(d + 1);\n index++;\n after = $pos.node(d).maybeChild(index);\n }\n else {\n before = $pos.node(d).maybeChild(index - 1);\n after = $pos.node(d + 1);\n }\n if (before && !before.isTextblock && joinable(before, after) &&\n $pos.node(d).canReplace(index, index + 1))\n return pos;\n if (d == 0)\n break;\n pos = dir < 0 ? $pos.before(d) : $pos.after(d);\n }\n}\nfunction join(tr, pos, depth) {\n let convertNewlines = null;\n let { linebreakReplacement } = tr.doc.type.schema;\n let $before = tr.doc.resolve(pos - depth), beforeType = $before.node().type;\n if (linebreakReplacement && beforeType.inlineContent) {\n let pre = beforeType.whitespace == \"pre\";\n let supportLinebreak = !!beforeType.contentMatch.matchType(linebreakReplacement);\n if (pre && !supportLinebreak)\n convertNewlines = false;\n else if (!pre && supportLinebreak)\n convertNewlines = true;\n }\n let mapFrom = tr.steps.length;\n if (convertNewlines === false) {\n let $after = tr.doc.resolve(pos + depth);\n replaceLinebreaks(tr, $after.node(), $after.before(), mapFrom);\n }\n if (beforeType.inlineContent)\n clearIncompatible(tr, pos + depth - 1, beforeType, $before.node().contentMatchAt($before.index()), convertNewlines == null);\n let mapping = tr.mapping.slice(mapFrom), start = mapping.map(pos - depth);\n tr.step(new ReplaceStep(start, mapping.map(pos + depth, -1), Slice.empty, true));\n if (convertNewlines === true) {\n let $full = tr.doc.resolve(start);\n replaceNewlines(tr, $full.node(), $full.before(), tr.steps.length);\n }\n return tr;\n}\n/**\nTry to find a point where a node of the given type can be inserted\nnear `pos`, by searching up the node hierarchy when `pos` itself\nisn't a valid place but is at the start or end of a node. Return\nnull if no position was found.\n*/\nfunction insertPoint(doc, pos, nodeType) {\n let $pos = doc.resolve(pos);\n if ($pos.parent.canReplaceWith($pos.index(), $pos.index(), nodeType))\n return pos;\n if ($pos.parentOffset == 0)\n for (let d = $pos.depth - 1; d >= 0; d--) {\n let index = $pos.index(d);\n if ($pos.node(d).canReplaceWith(index, index, nodeType))\n return $pos.before(d + 1);\n if (index > 0)\n return null;\n }\n if ($pos.parentOffset == $pos.parent.content.size)\n for (let d = $pos.depth - 1; d >= 0; d--) {\n let index = $pos.indexAfter(d);\n if ($pos.node(d).canReplaceWith(index, index, nodeType))\n return $pos.after(d + 1);\n if (index < $pos.node(d).childCount)\n return null;\n }\n return null;\n}\n/**\nFinds a position at or around the given position where the given\nslice can be inserted. Will look at parent nodes' nearest boundary\nand try there, even if the original position wasn't directly at the\nstart or end of that node. Returns null when no position was found.\n*/\nfunction dropPoint(doc, pos, slice) {\n let $pos = doc.resolve(pos);\n if (!slice.content.size)\n return pos;\n let content = slice.content;\n for (let i = 0; i < slice.openStart; i++)\n content = content.firstChild.content;\n for (let pass = 1; pass <= (slice.openStart == 0 && slice.size ? 2 : 1); pass++) {\n for (let d = $pos.depth; d >= 0; d--) {\n let bias = d == $pos.depth ? 0 : $pos.pos <= ($pos.start(d + 1) + $pos.end(d + 1)) / 2 ? -1 : 1;\n let insertPos = $pos.index(d) + (bias > 0 ? 1 : 0);\n let parent = $pos.node(d), fits = false;\n if (pass == 1) {\n fits = parent.canReplace(insertPos, insertPos, content);\n }\n else {\n let wrapping = parent.contentMatchAt(insertPos).findWrapping(content.firstChild.type);\n fits = wrapping && parent.canReplaceWith(insertPos, insertPos, wrapping[0]);\n }\n if (fits)\n return bias == 0 ? $pos.pos : bias < 0 ? $pos.before(d + 1) : $pos.after(d + 1);\n }\n }\n return null;\n}\n\n/**\n‘Fit’ a slice into a given position in the document, producing a\n[step](https://prosemirror.net/docs/ref/#transform.Step) that inserts it. Will return null if\nthere's no meaningful way to insert the slice here, or inserting it\nwould be a no-op (an empty slice over an empty range).\n*/\nfunction replaceStep(doc, from, to = from, slice = Slice.empty) {\n if (from == to && !slice.size)\n return null;\n let $from = doc.resolve(from), $to = doc.resolve(to);\n // Optimization -- avoid work if it's obvious that it's not needed.\n if (fitsTrivially($from, $to, slice))\n return new ReplaceStep(from, to, slice);\n return new Fitter($from, $to, slice).fit();\n}\nfunction fitsTrivially($from, $to, slice) {\n return !slice.openStart && !slice.openEnd && $from.start() == $to.start() &&\n $from.parent.canReplace($from.index(), $to.index(), slice.content);\n}\n// Algorithm for 'placing' the elements of a slice into a gap:\n//\n// We consider the content of each node that is open to the left to be\n// independently placeable. I.e. in <p(\"foo\"), p(\"bar\")>, when the\n// paragraph on the left is open, \"foo\" can be placed (somewhere on\n// the left side of the replacement gap) independently from p(\"bar\").\n//\n// This class tracks the state of the placement progress in the\n// following properties:\n//\n// - `frontier` holds a stack of `{type, match}` objects that\n// represent the open side of the replacement. It starts at\n// `$from`, then moves forward as content is placed, and is finally\n// reconciled with `$to`.\n//\n// - `unplaced` is a slice that represents the content that hasn't\n// been placed yet.\n//\n// - `placed` is a fragment of placed content. Its open-start value\n// is implicit in `$from`, and its open-end value in `frontier`.\nclass Fitter {\n constructor($from, $to, unplaced) {\n this.$from = $from;\n this.$to = $to;\n this.unplaced = unplaced;\n this.frontier = [];\n this.placed = Fragment.empty;\n for (let i = 0; i <= $from.depth; i++) {\n let node = $from.node(i);\n this.frontier.push({\n type: node.type,\n match: node.contentMatchAt($from.indexAfter(i))\n });\n }\n for (let i = $from.depth; i > 0; i--)\n this.placed = Fragment.from($from.node(i).copy(this.placed));\n }\n get depth() { return this.frontier.length - 1; }\n fit() {\n // As long as there's unplaced content, try to place some of it.\n // If that fails, either increase the open score of the unplaced\n // slice, or drop nodes from it, and then try again.\n while (this.unplaced.size) {\n let fit = this.findFittable();\n if (fit)\n this.placeNodes(fit);\n else\n this.openMore() || this.dropNode();\n }\n // When there's inline content directly after the frontier _and_\n // directly after `this.$to`, we must generate a `ReplaceAround`\n // step that pulls that content into the node after the frontier.\n // That means the fitting must be done to the end of the textblock\n // node after `this.$to`, not `this.$to` itself.\n let moveInline = this.mustMoveInline(), placedSize = this.placed.size - this.depth - this.$from.depth;\n let $from = this.$from, $to = this.close(moveInline < 0 ? this.$to : $from.doc.resolve(moveInline));\n if (!$to)\n return null;\n // If closing to `$to` succeeded, create a step\n let content = this.placed, openStart = $from.depth, openEnd = $to.depth;\n while (openStart && openEnd && content.childCount == 1) { // Normalize by dropping open parent nodes\n content = content.firstChild.content;\n openStart--;\n openEnd--;\n }\n let slice = new Slice(content, openStart, openEnd);\n if (moveInline > -1)\n return new ReplaceAroundStep($from.pos, moveInline, this.$to.pos, this.$to.end(), slice, placedSize);\n if (slice.size || $from.pos != this.$to.pos) // Don't generate no-op steps\n return new ReplaceStep($from.pos, $to.pos, slice);\n return null;\n }\n // Find a position on the start spine of `this.unplaced` that has\n // content that can be moved somewhere on the frontier. Returns two\n // depths, one for the slice and one for the frontier.\n findFittable() {\n let startDepth = this.unplaced.openStart;\n for (let cur = this.unplaced.content, d = 0, openEnd = this.unplaced.openEnd; d < startDepth; d++) {\n let node = cur.firstChild;\n if (cur.childCount > 1)\n openEnd = 0;\n if (node.type.spec.isolating && openEnd <= d) {\n startDepth = d;\n break;\n }\n cur = node.content;\n }\n // Only try wrapping nodes (pass 2) after finding a place without\n // wrapping failed.\n for (let pass = 1; pass <= 2; pass++) {\n for (let sliceDepth = pass == 1 ? startDepth : this.unplaced.openStart; sliceDepth >= 0; sliceDepth--) {\n let fragment, parent = null;\n if (sliceDepth) {\n parent = contentAt(this.unplaced.content, sliceDepth - 1).firstChild;\n fragment = parent.content;\n }\n else {\n fragment = this.unplaced.content;\n }\n let first = fragment.firstChild;\n for (let frontierDepth = this.depth; frontierDepth >= 0; frontierDepth--) {\n let { type, match } = this.frontier[frontierDepth], wrap, inject = null;\n // In pass 1, if the next node matches, or there is no next\n // node but the parents look compatible, we've found a\n // place.\n if (pass == 1 && (first ? match.matchType(first.type) || (inject = match.fillBefore(Fragment.from(first), false))\n : parent && type.compatibleContent(parent.type)))\n return { sliceDepth, frontierDepth, parent, inject };\n // In pass 2, look for a set of wrapping nodes that make\n // `first` fit here.\n else if (pass == 2 && first && (wrap = match.findWrapping(first.type)))\n return { sliceDepth, frontierDepth, parent, wrap };\n // Don't continue looking further up if the parent node\n // would fit here.\n if (parent && match.matchType(parent.type))\n break;\n }\n }\n }\n }\n openMore() {\n let { content, openStart, openEnd } = this.unplaced;\n let inner = contentAt(content, openStart);\n if (!inner.childCount || inner.firstChild.isLeaf)\n return false;\n this.unplaced = new Slice(content, openStart + 1, Math.max(openEnd, inner.size + openStart >= content.size - openEnd ? openStart + 1 : 0));\n return true;\n }\n dropNode() {\n let { content, openStart, openEnd } = this.unplaced;\n let inner = contentAt(content, openStart);\n if (inner.childCount <= 1 && openStart > 0) {\n let openAtEnd = content.size - openStart <= openStart + inner.size;\n this.unplaced = new Slice(dropFromFragment(content, openStart - 1, 1), openStart - 1, openAtEnd ? openStart - 1 : openEnd);\n }\n else {\n this.unplaced = new Slice(dropFromFragment(content, openStart, 1), openStart, openEnd);\n }\n }\n // Move content from the unplaced slice at `sliceDepth` to the\n // frontier node at `frontierDepth`. Close that frontier node when\n // applicable.\n placeNodes({ sliceDepth, frontierDepth, parent, inject, wrap }) {\n while (this.depth > frontierDepth)\n this.closeFrontierNode();\n if (wrap)\n for (let i = 0; i < wrap.length; i++)\n this.openFrontierNode(wrap[i]);\n let slice = this.unplaced, fragment = parent ? parent.content : slice.content;\n let openStart = slice.openStart - sliceDepth;\n let taken = 0, add = [];\n let { match, type } = this.frontier[frontierDepth];\n if (inject) {\n for (let i = 0; i < inject.childCount; i++)\n add.push(inject.child(i));\n match = match.matchFragment(inject);\n }\n // Computes the amount of (end) open nodes at the end of the\n // fragment. When 0, the parent is open, but no more. When\n // negative, nothing is open.\n let openEndCount = (fragment.size + sliceDepth) - (slice.content.size - slice.openEnd);\n // Scan over the fragment, fitting as many child nodes as\n // possible.\n while (taken < fragment.childCount) {\n let next = fragment.child(taken), matches = match.matchType(next.type);\n if (!matches)\n break;\n taken++;\n if (taken > 1 || openStart == 0 || next.content.size) { // Drop empty open nodes\n match = matches;\n add.push(closeNodeStart(next.mark(type.allowedMarks(next.marks)), taken == 1 ? openStart : 0, taken == fragment.childCount ? openEndCount : -1));\n }\n }\n let toEnd = taken == fragment.childCount;\n if (!toEnd)\n openEndCount = -1;\n this.placed = addToFragment(this.placed, frontierDepth, Fragment.from(add));\n this.frontier[frontierDepth].match = match;\n // If the parent types match, and the entire node was moved, and\n // it's not open, close this frontier node right away.\n if (toEnd && openEndCount < 0 && parent && parent.type == this.frontier[this.depth].type && this.frontier.length > 1)\n this.closeFrontierNode();\n // Add new frontier nodes for any open nodes at the end.\n for (let i = 0, cur = fragment; i < openEndCount; i++) {\n let node = cur.lastChild;\n this.frontier.push({ type: node.type, match: node.contentMatchAt(node.childCount) });\n cur = node.content;\n }\n // Update `this.unplaced`. Drop the entire node from which we\n // placed it we got to its end, otherwise just drop the placed\n // nodes.\n this.unplaced = !toEnd ? new Slice(dropFromFragment(slice.content, sliceDepth, taken), slice.openStart, slice.openEnd)\n : sliceDepth == 0 ? Slice.empty\n : new Slice(dropFromFragment(slice.content, sliceDepth - 1, 1), sliceDepth - 1, openEndCount < 0 ? slice.openEnd : sliceDepth - 1);\n }\n mustMoveInline() {\n if (!this.$to.parent.isTextblock)\n return -1;\n let top = this.frontier[this.depth], level;\n if (!top.type.isTextblock || !contentAfterFits(this.$to, this.$to.depth, top.type, top.match, false) ||\n (this.$to.depth == this.depth && (level = this.findCloseLevel(this.$to)) && level.depth == this.depth))\n return -1;\n let { depth } = this.$to, after = this.$to.after(depth);\n while (depth > 1 && after == this.$to.end(--depth))\n ++after;\n return after;\n }\n findCloseLevel($to) {\n scan: for (let i = Math.min(this.depth, $to.depth); i >= 0; i--) {\n let { match, type } = this.frontier[i];\n let dropInner = i < $to.depth && $to.end(i + 1) == $to.pos + ($to.depth - (i + 1));\n let fit = contentAfterFits($to, i, type, match, dropInner);\n if (!fit)\n continue;\n for (let d = i - 1; d >= 0; d--) {\n let { match, type } = this.frontier[d];\n let matches = contentAfterFits($to, d, type, match, true);\n if (!matches || matches.childCount)\n continue scan;\n }\n return { depth: i, fit, move: dropInner ? $to.doc.resolve($to.after(i + 1)) : $to };\n }\n }\n close($to) {\n let close = this.findCloseLevel($to);\n if (!close)\n return null;\n while (this.depth > close.depth)\n this.closeFrontierNode();\n if (close.fit.childCount)\n this.placed = addToFragment(this.placed, close.depth, close.fit);\n $to = close.move;\n for (let d = close.depth + 1; d <= $to.depth; d++) {\n let node = $to.node(d), add = node.type.contentMatch.fillBefore(node.content, true, $to.index(d));\n this.openFrontierNode(node.type, node.attrs, add);\n }\n return $to;\n }\n openFrontierNode(type, attrs = null, content) {\n let top = this.frontier[this.depth];\n top.match = top.match.matchType(type);\n this.placed = addToFragment(this.placed, this.depth, Fragment.from(type.create(attrs, content)));\n this.frontier.push({ type, match: type.contentMatch });\n }\n closeFrontierNode() {\n let open = this.frontier.pop();\n let add = open.match.fillBefore(Fragment.empty, true);\n if (add.childCount)\n this.placed = addToFragment(this.placed, this.frontier.length, add);\n }\n}\nfunction dropFromFragment(fragment, depth, count) {\n if (depth == 0)\n return fragment.cutByIndex(count, fragment.childCount);\n return fragment.replaceChild(0, fragment.firstChild.copy(dropFromFragment(fragment.firstChild.content, depth - 1, count)));\n}\nfunction addToFragment(fragment, depth, content) {\n if (depth == 0)\n return fragment.append(content);\n return fragment.replaceChild(fragment.childCount - 1, fragment.lastChild.copy(addToFragment(fragment.lastChild.content, depth - 1, content)));\n}\nfunction contentAt(fragment, depth) {\n for (let i = 0; i < depth; i++)\n fragment = fragment.firstChild.content;\n return fragment;\n}\nfunction closeNodeStart(node, openStart, openEnd) {\n if (openStart <= 0)\n return node;\n let frag = node.content;\n if (openStart > 1)\n frag = frag.replaceChild(0, closeNodeStart(frag.firstChild, openStart - 1, frag.childCount == 1 ? openEnd - 1 : 0));\n if (openStart > 0) {\n frag = node.type.contentMatch.fillBefore(frag).append(frag);\n if (openEnd <= 0)\n frag = frag.append(node.type.contentMatch.matchFragment(frag).fillBefore(Fragment.empty, true));\n }\n return node.copy(frag);\n}\nfunction contentAfterFits($to, depth, type, match, open) {\n let node = $to.node(depth), index = open ? $to.indexAfter(depth) : $to.index(depth);\n if (index == node.childCount && !type.compatibleContent(node.type))\n return null;\n let fit = match.fillBefore(node.content, true, index);\n return fit && !invalidMarks(type, node.content, index) ? fit : null;\n}\nfunction invalidMarks(type, fragment, start) {\n for (let i = start; i < fragment.childCount; i++)\n if (!type.allowsMarks(fragment.child(i).marks))\n return true;\n return false;\n}\nfunction definesContent(type) {\n return type.spec.defining || type.spec.definingForContent;\n}\nfunction replaceRange(tr, from, to, slice) {\n if (!slice.size)\n return tr.deleteRange(from, to);\n let $from = tr.doc.resolve(from), $to = tr.doc.resolve(to);\n if (fitsTrivially($from, $to, slice))\n return tr.step(new ReplaceStep(from, to, slice));\n let targetDepths = coveredDepths($from, tr.doc.resolve(to));\n // Can't replace the whole document, so remove 0 if it's present\n if (targetDepths[targetDepths.length - 1] == 0)\n targetDepths.pop();\n // Negative numbers represent not expansion over the whole node at\n // that depth, but replacing from $from.before(-D) to $to.pos.\n let preferredTarget = -($from.depth + 1);\n targetDepths.unshift(preferredTarget);\n // This loop picks a preferred target depth, if one of the covering\n // depths is not outside of a defining node, and adds negative\n // depths for any depth that has $from at its start and does not\n // cross a defining node.\n for (let d = $from.depth, pos = $from.pos - 1; d > 0; d--, pos--) {\n let spec = $from.node(d).type.spec;\n if (spec.defining || spec.definingAsContext || spec.isolating)\n break;\n if (targetDepths.indexOf(d) > -1)\n preferredTarget = d;\n else if ($from.before(d) == pos)\n targetDepths.splice(1, 0, -d);\n }\n // Try to fit each possible depth of the slice into each possible\n // target depth, starting with the preferred depths.\n let preferredTargetIndex = targetDepths.indexOf(preferredTarget);\n let leftNodes = [], preferredDepth = slice.openStart;\n for (let content = slice.content, i = 0;; i++) {\n let node = content.firstChild;\n leftNodes.push(node);\n if (i == slice.openStart)\n break;\n content = node.content;\n }\n // Back up preferredDepth to cover defining textblocks directly\n // above it, possibly skipping a non-defining textblock.\n for (let d = preferredDepth - 1; d >= 0; d--) {\n let leftNode = leftNodes[d], def = definesContent(leftNode.type);\n if (def && !leftNode.sameMarkup($from.node(Math.abs(preferredTarget) - 1)))\n preferredDepth = d;\n else if (def || !leftNode.type.isTextblock)\n break;\n }\n for (let j = slice.openStart; j >= 0; j--) {\n let openDepth = (j + preferredDepth + 1) % (slice.openStart + 1);\n let insert = leftNodes[openDepth];\n if (!insert)\n continue;\n for (let i = 0; i < targetDepths.length; i++) {\n // Loop over possible expansion levels, starting with the\n // preferred one\n let targetDepth = targetDepths[(i + preferredTargetIndex) % targetDepths.length], expand = true;\n if (targetDepth < 0) {\n expand = false;\n targetDepth = -targetDepth;\n }\n let parent = $from.node(targetDepth - 1), index = $from.index(targetDepth - 1);\n if (parent.canReplaceWith(index, index, insert.type, insert.marks))\n return tr.replace($from.before(targetDepth), expand ? $to.after(targetDepth) : to, new Slice(closeFragment(slice.content, 0, slice.openStart, openDepth), openDepth, slice.openEnd));\n }\n }\n let startSteps = tr.steps.length;\n for (let i = targetDepths.length - 1; i >= 0; i--) {\n tr.replace(from, to, slice);\n if (tr.steps.length > startSteps)\n break;\n let depth = targetDepths[i];\n if (depth < 0)\n continue;\n from = $from.before(depth);\n to = $to.after(depth);\n }\n}\nfunction closeFragment(fragment, depth, oldOpen, newOpen, parent) {\n if (depth < oldOpen) {\n let first = fragment.firstChild;\n fragment = fragment.replaceChild(0, first.copy(closeFragment(first.content, depth + 1, oldOpen, newOpen, first)));\n }\n if (depth > newOpen) {\n let match = parent.contentMatchAt(0);\n let start = match.fillBefore(fragment).append(fragment);\n fragment = start.append(match.matchFragment(start).fillBefore(Fragment.empty, true));\n }\n return fragment;\n}\nfunction replaceRangeWith(tr, from, to, node) {\n if (!node.isInline && from == to && tr.doc.resolve(from).parent.content.size) {\n let point = insertPoint(tr.doc, from, node.type);\n if (point != null)\n from = to = point;\n }\n tr.replaceRange(from, to, new Slice(Fragment.from(node), 0, 0));\n}\nfunction deleteRange(tr, from, to) {\n let $from = tr.doc.resolve(from), $to = tr.doc.resolve(to);\n let covered = coveredDepths($from, $to);\n for (let i = 0; i < covered.length; i++) {\n let depth = covered[i], last = i == covered.length - 1;\n if ((last && depth == 0) || $from.node(depth).type.contentMatch.validEnd)\n return tr.delete($from.start(depth), $to.end(depth));\n if (depth > 0 && (last || $from.node(depth - 1).canReplace($from.index(depth - 1), $to.indexAfter(depth - 1))))\n return tr.delete($from.before(depth), $to.after(depth));\n }\n for (let d = 1; d <= $from.depth && d <= $to.depth; d++) {\n if (from - $from.start(d) == $from.depth - d && to > $from.end(d) && $to.end(d) - to != $to.depth - d &&\n $from.start(d - 1) == $to.start(d - 1) && $from.node(d - 1).canReplace($from.index(d - 1), $to.index(d - 1)))\n return tr.delete($from.before(d), to);\n }\n tr.delete(from, to);\n}\n// Returns an array of all depths for which $from - $to spans the\n// whole content of the nodes at that depth.\nfunction coveredDepths($from, $to) {\n let result = [], minDepth = Math.min($from.depth, $to.depth);\n for (let d = minDepth; d >= 0; d--) {\n let start = $from.start(d);\n if (start < $from.pos - ($from.depth - d) ||\n $to.end(d) > $to.pos + ($to.depth - d) ||\n $from.node(d).type.spec.isolating ||\n $to.node(d).type.spec.isolating)\n break;\n if (start == $to.start(d) ||\n (d == $from.depth && d == $to.depth && $from.parent.inlineContent && $to.parent.inlineContent &&\n d && $to.start(d - 1) == start - 1))\n result.push(d);\n }\n return result;\n}\n\n/**\nUpdate an attribute in a specific node.\n*/\nclass AttrStep extends Step {\n /**\n Construct an attribute step.\n */\n constructor(\n /**\n The position of the target node.\n */\n pos, \n /**\n The attribute to set.\n */\n attr, \n // The attribute's new value.\n value) {\n super();\n this.pos = pos;\n this.attr = attr;\n this.value = value;\n }\n apply(doc) {\n let node = doc.nodeAt(this.pos);\n if (!node)\n return StepResult.fail(\"No node at attribute step's position\");\n let attrs = Object.create(null);\n for (let name in node.attrs)\n attrs[name] = node.attrs[name];\n attrs[this.attr] = this.value;\n let updated = node.type.create(attrs, null, node.marks);\n return StepResult.fromReplace(doc, this.pos, this.pos + 1, new Slice(Fragment.from(updated), 0, node.isLeaf ? 0 : 1));\n }\n getMap() {\n return StepMap.empty;\n }\n invert(doc) {\n return new AttrStep(this.pos, this.attr, doc.nodeAt(this.pos).attrs[this.attr]);\n }\n map(mapping) {\n let pos = mapping.mapResult(this.pos, 1);\n return pos.deletedAfter ? null : new AttrStep(pos.pos, this.attr, this.value);\n }\n toJSON() {\n return { stepType: \"attr\", pos: this.pos, attr: this.attr, value: this.value };\n }\n static fromJSON(schema, json) {\n if (typeof json.pos != \"number\" || typeof json.attr != \"string\")\n throw new RangeError(\"Invalid input for AttrStep.fromJSON\");\n return new AttrStep(json.pos, json.attr, json.value);\n }\n}\nStep.jsonID(\"attr\", AttrStep);\n/**\nUpdate an attribute in the doc node.\n*/\nclass DocAttrStep extends Step {\n /**\n Construct an attribute step.\n */\n constructor(\n /**\n The attribute to set.\n */\n attr, \n // The attribute's new value.\n value) {\n super();\n this.attr = attr;\n this.value = value;\n }\n apply(doc) {\n let attrs = Object.create(null);\n for (let name in doc.attrs)\n attrs[name] = doc.attrs[name];\n attrs[this.attr] = this.value;\n let updated = doc.type.create(attrs, doc.content, doc.marks);\n return StepResult.ok(updated);\n }\n getMap() {\n return StepMap.empty;\n }\n invert(doc) {\n return new DocAttrStep(this.attr, doc.attrs[this.attr]);\n }\n map(mapping) {\n return this;\n }\n toJSON() {\n return { stepType: \"docAttr\", attr: this.attr, value: this.value };\n }\n static fromJSON(schema, json) {\n if (typeof json.attr != \"string\")\n throw new RangeError(\"Invalid input for DocAttrStep.fromJSON\");\n return new DocAttrStep(json.attr, json.value);\n }\n}\nStep.jsonID(\"docAttr\", DocAttrStep);\n\n/**\n@internal\n*/\nlet TransformError = class extends Error {\n};\nTransformError = function TransformError(message) {\n let err = Error.call(this, message);\n err.__proto__ = TransformError.prototype;\n return err;\n};\nTransformError.prototype = Object.create(Error.prototype);\nTransformError.prototype.constructor = TransformError;\nTransformError.prototype.name = \"TransformError\";\n/**\nAbstraction to build up and track an array of\n[steps](https://prosemirror.net/docs/ref/#transform.Step) representing a document transformation.\n\nMost transforming methods return the `Transform` object itself, so\nthat they can be chained.\n*/\nclass Transform {\n /**\n Create a transform that starts with the given document.\n */\n constructor(\n /**\n The current document (the result of applying the steps in the\n transform).\n */\n doc) {\n this.doc = doc;\n /**\n The steps in this transform.\n */\n this.steps = [];\n /**\n The documents before each of the steps.\n */\n this.docs = [];\n /**\n A mapping with the maps for each of the steps in this transform.\n */\n this.mapping = new Mapping;\n }\n /**\n The starting document.\n */\n get before() { return this.docs.length ? this.docs[0] : this.doc; }\n /**\n Apply a new step in this transform, saving the result. Throws an\n error when the step fails.\n */\n step(step) {\n let result = this.maybeStep(step);\n if (result.failed)\n throw new TransformError(result.failed);\n return this;\n }\n /**\n Try to apply a step in this transformation, ignoring it if it\n fails. Returns the step result.\n */\n maybeStep(step) {\n let result = step.apply(this.doc);\n if (!result.failed)\n this.addStep(step, result.doc);\n return result;\n }\n /**\n True when the document has been changed (when there are any\n steps).\n */\n get docChanged() {\n return this.steps.length > 0;\n }\n /**\n @internal\n */\n addStep(step, doc) {\n this.docs.push(this.doc);\n this.steps.push(step);\n this.mapping.appendMap(step.getMap());\n this.doc = doc;\n }\n /**\n Replace the part of the document between `from` and `to` with the\n given `slice`.\n */\n replace(from, to = from, slice = Slice.empty) {\n let step = replaceStep(this.doc, from, to, slice);\n if (step)\n this.step(step);\n return this;\n }\n /**\n Replace the given range with the given content, which may be a\n fragment, node, or array of nodes.\n */\n replaceWith(from, to, content) {\n return this.replace(from, to, new Slice(Fragment.from(content), 0, 0));\n }\n /**\n Delete the content between the given positions.\n */\n delete(from, to) {\n return this.replace(from, to, Slice.empty);\n }\n /**\n Insert the given content at the given position.\n */\n insert(pos, content) {\n return this.replaceWith(pos, pos, content);\n }\n /**\n Replace a range of the document with a given slice, using\n `from`, `to`, and the slice's\n [`openStart`](https://prosemirror.net/docs/ref/#model.Slice.openStart) property as hints, rather\n than fixed start and end points. This method may grow the\n replaced area or close open nodes in the slice in order to get a\n fit that is more in line with WYSIWYG expectations, by dropping\n fully covered parent nodes of the replaced region when they are\n marked [non-defining as\n context](https://prosemirror.net/docs/ref/#model.NodeSpec.definingAsContext), or including an\n open parent node from the slice that _is_ marked as [defining\n its content](https://prosemirror.net/docs/ref/#model.NodeSpec.definingForContent).\n \n This is the method, for example, to handle paste. The similar\n [`replace`](https://prosemirror.net/docs/ref/#transform.Transform.replace) method is a more\n primitive tool which will _not_ move the start and end of its given\n range, and is useful in situations where you need more precise\n control over what happens.\n */\n replaceRange(from, to, slice) {\n replaceRange(this, from, to, slice);\n return this;\n }\n /**\n Replace the given range with a node, but use `from` and `to` as\n hints, rather than precise positions. When from and to are the same\n and are at the start or end of a parent node in which the given\n node doesn't fit, this method may _move_ them out towards a parent\n that does allow the given node to be placed. When the given range\n completely covers a parent node, this method may completely replace\n that parent node.\n */\n replaceRangeWith(from, to, node) {\n replaceRangeWith(this, from, to, node);\n return this;\n }\n /**\n Delete the given range, expanding it to cover fully covered\n parent nodes until a valid replace is found.\n */\n deleteRange(from, to) {\n deleteRange(this, from, to);\n return this;\n }\n /**\n Split the content in the given range off from its parent, if there\n is sibling content before or after it, and move it up the tree to\n the depth specified by `target`. You'll probably want to use\n [`liftTarget`](https://prosemirror.net/docs/ref/#transform.liftTarget) to compute `target`, to make\n sure the lift is valid.\n */\n lift(range, target) {\n lift(this, range, target);\n return this;\n }\n /**\n Join the blocks around the given position. If depth is 2, their\n last and first siblings are also joined, and so on.\n */\n join(pos, depth = 1) {\n join(this, pos, depth);\n return this;\n }\n /**\n Wrap the given [range](https://prosemirror.net/docs/ref/#model.NodeRange) in the given set of wrappers.\n The wrappers are assumed to be valid in this position, and should\n probably be computed with [`findWrapping`](https://prosemirror.net/docs/ref/#transform.findWrapping).\n */\n wrap(range, wrappers) {\n wrap(this, range, wrappers);\n return this;\n }\n /**\n Set the type of all textblocks (partly) between `from` and `to` to\n the given node type with the given attributes.\n */\n setBlockType(from, to = from, type, attrs = null) {\n setBlockType(this, from, to, type, attrs);\n return this;\n }\n /**\n Change the type, attributes, and/or marks of the node at `pos`.\n When `type` isn't given, the existing node type is preserved,\n */\n setNodeMarkup(pos, type, attrs = null, marks) {\n setNodeMarkup(this, pos, type, attrs, marks);\n return this;\n }\n /**\n Set a single attribute on a given node to a new value.\n The `pos` addresses the document content. Use `setDocAttribute`\n to set attributes on the document itself.\n */\n setNodeAttribute(pos, attr, value) {\n this.step(new AttrStep(pos, attr, value));\n return this;\n }\n /**\n Set a single attribute on the document to a new value.\n */\n setDocAttribute(attr, value) {\n this.step(new DocAttrStep(attr, value));\n return this;\n }\n /**\n Add a mark to the node at position `pos`.\n */\n addNodeMark(pos, mark) {\n this.step(new AddNodeMarkStep(pos, mark));\n return this;\n }\n /**\n Remove a mark (or a mark of the given type) from the node at\n position `pos`.\n */\n removeNodeMark(pos, mark) {\n if (!(mark instanceof Mark)) {\n let node = this.doc.nodeAt(pos);\n if (!node)\n throw new RangeError(\"No node at position \" + pos);\n mark = mark.isInSet(node.marks);\n if (!mark)\n return this;\n }\n this.step(new RemoveNodeMarkStep(pos, mark));\n return this;\n }\n /**\n Split the node at the given position, and optionally, if `depth` is\n greater than one, any number of nodes above that. By default, the\n parts split off will inherit the node type of the original node.\n This can be changed by passing an array of types and attributes to\n use after the split.\n */\n split(pos, depth = 1, typesAfter) {\n split(this, pos, depth, typesAfter);\n return this;\n }\n /**\n Add the given mark to the inline content between `from` and `to`.\n */\n addMark(from, to, mark) {\n addMark(this, from, to, mark);\n return this;\n }\n /**\n Remove marks from inline nodes between `from` and `to`. When\n `mark` is a single mark, remove precisely that mark. When it is\n a mark type, remove all marks of that type. When it is null,\n remove all marks of any type.\n */\n removeMark(from, to, mark) {\n removeMark(this, from, to, mark);\n return this;\n }\n /**\n Removes all marks and nodes from the content of the node at\n `pos` that don't match the given new parent node type. Accepts\n an optional starting [content match](https://prosemirror.net/docs/ref/#model.ContentMatch) as\n third argument.\n */\n clearIncompatible(pos, parentType, match) {\n clearIncompatible(this, pos, parentType, match);\n return this;\n }\n}\n\nexport { AddMarkStep, AddNodeMarkStep, AttrStep, DocAttrStep, MapResult, Mapping, RemoveMarkStep, RemoveNodeMarkStep, ReplaceAroundStep, ReplaceStep, Step, StepMap, StepResult, Transform, TransformError, canJoin, canSplit, dropPoint, findWrapping, insertPoint, joinPoint, liftTarget, replaceStep };\n"],"names":["factor16","Math","pow","recoverIndex","value","MapResult","constructor","pos","delInfo","recover","this","deleted","deletedBefore","deletedAfter","deletedAcross","StepMap","ranges","inverted","length","empty","diff","index","i","recoverOffset","mapResult","assoc","_map","map","simple","oldIndex","newIndex","start","oldSize","newSize","end","result","del","touches","forEach","f","oldStart","newStart","invert","toString","JSON","stringify","offset","n","Mapping","maps","mirror","from","to","slice","copy","appendMap","mirrors","push","setMirror","appendMapping","mapping","startSize","mirr","getMirror","undefined","m","appendMappingInverted","totalSize","inverse","corr","stepsByID","Object","create","Step","getMap","merge","other","fromJSON","schema","json","stepType","RangeError","type","jsonID","id","stepClass","prototype","StepResult","doc","failed","ok","fail","message","fromReplace","replace","e","ReplaceError","mapFragment","fragment","parent","mapped","childCount","child","content","size","isInline","Fragment","fromArray","AddMarkStep","mark","super","apply","oldSlice","$from","resolve","node","sharedDepth","Slice","isAtom","allowsMarkType","addToSet","marks","openStart","openEnd","RemoveMarkStep","eq","min","max","toJSON","markFromJSON","removeFromSet","AddNodeMarkStep","nodeAt","updated","attrs","isLeaf","newSet","isInSet","RemoveNodeMarkStep","ReplaceStep","structure","contentBetween","append","ReplaceAroundStep","gapFrom","gapTo","insert","gap","inserted","insertAt","removeBetween","dist","depth","indexAfter","next","maybeChild","firstChild","clearIncompatible","tr","parentType","match","contentMatch","clearNewlines","replSteps","cur","nodeSize","allowed","matchType","j","step","isText","whitespace","newline","exec","text","allowedMarks","validEnd","fill","fillBefore","canCut","canReplace","liftTarget","range","cutByIndex","startIndex","endIndex","$to","spec","isolating","findWrapping","nodeType","innerRange","around","contentMatchAt","outer","canReplaceWith","findWrappingOutside","inner","inside","innerMatch","findWrappingInside","withAttrs","concat","replaceNewlines","mapFrom","replaceWith","linebreakReplacement","replaceLinebreaks","canSplit","typesAfter","$pos","base","innerType","validContent","d","rest","overrideChild","replaceChild","after","baseType","canJoin","a","nodeBefore","b","nodeAfter","compatibleContent","nodes","allowsMarks","canAppendWithSubstitutedLinebreaks","insertPoint","parentOffset","before","dropPoint","pass","bias","insertPos","fits","wrapping","replaceStep","fitsTrivially","Fitter","fit","unplaced","frontier","placed","findFittable","placeNodes","openMore","dropNode","moveInline","mustMoveInline","placedSize","close","startDepth","sliceDepth","contentAt","first","frontierDepth","wrap","inject","openAtEnd","dropFromFragment","closeFrontierNode","openFrontierNode","taken","add","matchFragment","openEndCount","matches","closeNodeStart","toEnd","addToFragment","lastChild","isTextblock","level","top","contentAfterFits","findCloseLevel","scan","dropInner","move","pop","count","frag","open","invalidMarks","closeFragment","oldOpen","newOpen","coveredDepths","inlineContent","AttrStep","attr","name","DocAttrStep","TransformError","Error","err","call","__proto__","Transform","steps","docs","maybeStep","addStep","docChanged","replaceRange","deleteRange","targetDepths","preferredTarget","unshift","defining","definingAsContext","indexOf","splice","preferredTargetIndex","leftNodes","preferredDepth","leftNode","def","definingForContent","sameMarkup","abs","openDepth","targetDepth","expand","startSteps","replaceRangeWith","point","covered","last","delete","lift","target","gapStart","gapEnd","splitting","join","convertNewlines","$before","beforeType","pre","supportLinebreak","$after","$full","wrappers","setBlockType","nodesBetween","attrsHere","hasMarkup","canChangeType","startM","endM","setNodeMarkup","newNode","setNodeAttribute","setDocAttribute","addNodeMark","removeNodeMark","Mark","split","typeAfter","addMark","removing","adding","removed","added","s","removeMark","matched","toRemove","MarkType","found","set","style"],"mappings":"wHAWA,MACMA,EAAWC,KAAKC,IAAI,EAAG,IAE7B,SAASC,EAAaC,GAAS,OAHf,MAGsBA,CAAgB,CAOtD,MAAMC,EAIF,WAAAC,CAIAC,EAIAC,EAIAC,GACIC,KAAKH,IAAMA,EACXG,KAAKF,QAAUA,EACfE,KAAKD,QAAUA,CACvB,CAMI,WAAIE,GAAY,OA/B4C,EA+BpCD,KAAKF,SAAsB,CAAE,CAIrD,iBAAII,GAAkB,OAAoB,EAAZF,KAAKF,SAAuC,CAAE,CAI5E,gBAAIK,GAAiB,OAAoB,EAAZH,KAAKF,SAAsC,CAAE,CAM1E,iBAAIM,GAAkB,OA7CwB,EA6ChBJ,KAAKF,SAAwB,CAAE,EAQjE,MAAMO,EAMF,WAAAT,CAIAU,EAIAC,GAAW,GAGP,GAFAP,KAAKM,OAASA,EACdN,KAAKO,SAAWA,GACXD,EAAOE,QAAUH,EAAQI,MAC1B,OAAOJ,EAAQI,KAC3B,CAII,OAAAV,CAAQL,GACJ,IAAIgB,EAAO,EAAGC,EAAQlB,EAAaC,GACnC,IAAKM,KAAKO,SACN,IAAK,IAAIK,EAAI,EAAGA,EAAID,EAAOC,IACvBF,GAAQV,KAAKM,OAAW,EAAJM,EAAQ,GAAKZ,KAAKM,OAAW,EAAJM,EAAQ,GAC7D,OAAOZ,KAAKM,OAAe,EAARK,GAAaD,EAlFxC,SAAuBhB,GAAS,OAAQA,GAJxB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AIlB,EAAKuI,QAE9E,CACA,KAEIwM,EAAQ3U,SAAQ2B,GAAK6F,EAAGW,KAAK,IAAI7C,EAAe3D,EAAEd,KAAMc,EAAEb,GAAIa,EAAEqT,SACpE,CA2qCQN,CAAWtW,KAAMyC,EAAMC,EAAIyD,GACpBnG,IACf,CAOI,iBAAAmJ,CAAkBtJ,EAAKwJ,EAAYC,GAE/B,OADAH,EAAkBnJ,KAAMH,EAAKwJ,EAAYC,GAClCtJ,IACf","x_google_ignoreList":[0]}
|
@@ -1,2 +0,0 @@
|
|
1
|
-
import{__exports as e}from"../../../_virtual/index6.mjs";import{__require as t}from"../../prosemirror-model/dist/index.mjs";var r;function n(){return r||(r=1,function(e){function r(e){var t="function"==typeof Map?new Map:void 0;return r=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return n(e,arguments,u(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),o(r,e)},r(e)}function n(e,t,r){return n=s()?Reflect.construct.bind():function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Function.bind.apply(e,n));return r&&o(i,r.prototype),i},n.apply(null,arguments)}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&o(e,t)}function o(e,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},o(e,t)}function a(e){var t=s();return function(){var r,n=u(e);if(t){var i=u(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===l(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function s(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(i=n.key,o=void 0,o=function(e,t){if("object"!==l(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!==l(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(i,"string"),"symbol"===l(o)?o:String(o)),n)}var i,o}function f(e,t,r){return t&&c(e.prototype,t),r&&c(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var h=t(),d=Math.pow(2,16);function v(e){return 65535&e}var m=function(){function e(t,r,n){p(this,e),this.pos=t,this.delInfo=r,this.recover=n}return f(e,[{key:"deleted",get:function(){return(8&this.delInfo)>0}},{key:"deletedBefore",get:function(){return(5&this.delInfo)>0}},{key:"deletedAfter",get:function(){return(6&this.delInfo)>0}},{key:"deletedAcross",get:function(){return(4&this.delInfo)>0}}]),e}(),y=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(p(this,e),this.ranges=t,this.inverted=r,!t.length&&e.empty)return e.empty}return f(e,[{key:"recover",value:function(e){var t=0,r=v(e);if(!this.inverted)for(var n=0;n<r;n++)t+=this.ranges[3*n+2]-this.ranges[3*n+1];return this.ranges[3*r]+t+function(e){return(e-(65535&e))/d}(e)}},{key:"mapResult",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this._map(e,t,!1)}},{key:"map",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this._map(e,t,!0)}},{key:"_map",value:function(e,t,r){for(var n=0,i=this.inverted?2:1,o=this.inverted?1:2,a=0;a<this.ranges.length;a+=3){var s=this.ranges[a]-(this.inverted?n:0);if(s>e)break;var u=this.ranges[a+i],l=this.ranges[a+o],p=s+u;if(e<=p){var c=s+n+((u?e==s?-1:e==p?1:t:t)<0?0:l);if(r)return c;var f=e==(t<0?s:p)?null:a/3+(e-s)*d,h=e==s?2:e==p?1:4;return(t<0?e!=s:e!=p)&&(h|=8),new m(c,h,f)}n+=l-u}return r?e+n:new m(e+n,0,null)}},{key:"touches",value:function(e,t){for(var r=0,n=v(t),i=this.inverted?2:1,o=this.inverted?1:2,a=0;a<this.ranges.length;a+=3){var s=this.ranges[a]-(this.inverted?r:0);if(s>e)break;var u=this.ranges[a+i];if(e<=s+u&&a==3*n)return!0;r+=this.ranges[a+o]-u}return!1}},{key:"forEach",value:function(e){for(var t=this.inverted?2:1,r=this.inverted?1:2,n=0,i=0;n<this.ranges.length;n+=3){var o=this.ranges[n],a=o-(this.inverted?i:0),s=o+(this.inverted?0:i),u=this.ranges[n+t],l=this.ranges[n+r];e(a,a+u,s,s+l),i+=l-u}}},{key:"invert",value:function(){return new e(this.ranges,!this.inverted)}},{key:"toString",value:function(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}}],[{key:"offset",value:function(t){return 0==t?e.empty:new e(t<0?[0,-t,0]:[0,0,t])}}]),e}();y.empty=new y([]);var g=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.length;p(this,e),this.maps=t,this.mirror=r,this.from=n,this.to=i}return f(e,[{key:"slice",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.maps.length;return new e(this.maps,this.mirror,t,r)}},{key:"copy",value:function(){return new e(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}},{key:"appendMap",value:function(e,t){this.to=this.maps.push(e),null!=t&&this.setMirror(this.maps.length-1,t)}},{key:"appendMapping",value:function(e){for(var t=0,r=this.maps.length;t<e.maps.length;t++){var n=e.getMirror(t);this.appendMap(e.maps[t],null!=n&&n<t?r+n:void 0)}}},{key:"getMirror",value:function(e){if(this.mirror)for(var t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}},{key:"setMirror",value:function(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}},{key:"appendMappingInverted",value:function(e){for(var t=e.maps.length-1,r=this.maps.length+e.maps.length;t>=0;t--){var n=e.getMirror(t);this.appendMap(e.maps[t].invert(),null!=n&&n>t?r-n-1:void 0)}}},{key:"invert",value:function(){var t=new e;return t.appendMappingInverted(this),t}},{key:"map",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(this.mirror)return this._map(e,t,!0);for(var r=this.from;r<this.to;r++)e=this.maps[r].map(e,t);return e}},{key:"mapResult",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this._map(e,t,!1)}},{key:"_map",value:function(e,t,r){for(var n=0,i=this.from;i<this.to;i++){var o=this.maps[i].mapResult(e,t);if(null!=o.recover){var a=this.getMirror(i);if(null!=a&&a>i&&a<this.to){i=a,e=this.maps[a].recover(o.recover);continue}}n|=o.delInfo,e=o.pos}return r?e:new m(e,n,null)}}]),e}(),k=Object.create(null),w=function(){function e(){p(this,e)}return f(e,[{key:"getMap",value:function(){return y.empty}},{key:"merge",value:function(e){return null}}],[{key:"fromJSON",value:function(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");var r=k[t.stepType];if(!r)throw new RangeError("No step type ".concat(t.stepType," defined"));return r.fromJSON(e,t)}},{key:"jsonID",value:function(e,t){if(e in k)throw new RangeError("Duplicate use of step JSON ID "+e);return k[e]=t,t.prototype.jsonID=e,t}}]),e}(),S=function(){function e(t,r){p(this,e),this.doc=t,this.failed=r}return f(e,null,[{key:"ok",value:function(t){return new e(t,null)}},{key:"fail",value:function(t){return new e(null,t)}},{key:"fromReplace",value:function(t,r,n,i){try{return e.ok(t.replace(r,n,i))}catch(t){if(t instanceof h.ReplaceError)return e.fail(t.message);throw t}}}]),e}();function b(e,t,r){for(var n=[],i=0;i<e.childCount;i++){var o=e.child(i);o.content.size&&(o=o.copy(b(o.content,t,o))),o.isInline&&(o=t(o,r,i)),n.push(o)}return h.Fragment.fromArray(n)}var M=function(e){i(r,e);var t=a(r);function r(e,n,i){var o;return p(this,r),(o=t.call(this)).from=e,o.to=n,o.mark=i,o}return f(r,[{key:"apply",value:function(e){var t=this,r=e.slice(this.from,this.to),n=e.resolve(this.from),i=n.node(n.sharedDepth(this.to)),o=new h.Slice(b(r.content,(function(e,r){return e.isAtom&&r.type.allowsMarkType(t.mark.type)?e.mark(t.mark.addToSet(e.marks)):e}),i),r.openStart,r.openEnd);return S.fromReplace(e,this.from,this.to,o)}},{key:"invert",value:function(){return new R(this.from,this.to,this.mark)}},{key:"map",value:function(e){var t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new r(t.pos,n.pos,this.mark)}},{key:"merge",value:function(e){return e instanceof r&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new r(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}},{key:"toJSON",value:function(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}}],[{key:"fromJSON",value:function(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new r(t.from,t.to,e.markFromJSON(t.mark))}}]),r}(w);w.jsonID("addMark",M);var R=function(e){i(r,e);var t=a(r);function r(e,n,i){var o;return p(this,r),(o=t.call(this)).from=e,o.to=n,o.mark=i,o}return f(r,[{key:"apply",value:function(e){var t=this,r=e.slice(this.from,this.to),n=new h.Slice(b(r.content,(function(e){return e.mark(t.mark.removeFromSet(e.marks))}),e),r.openStart,r.openEnd);return S.fromReplace(e,this.from,this.to,n)}},{key:"invert",value:function(){return new M(this.from,this.to,this.mark)}},{key:"map",value:function(e){var t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new r(t.pos,n.pos,this.mark)}},{key:"merge",value:function(e){return e instanceof r&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new r(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}},{key:"toJSON",value:function(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}}],[{key:"fromJSON",value:function(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new r(t.from,t.to,e.markFromJSON(t.mark))}}]),r}(w);w.jsonID("removeMark",R);var x=function(e){i(r,e);var t=a(r);function r(e,n){var i;return p(this,r),(i=t.call(this)).pos=e,i.mark=n,i}return f(r,[{key:"apply",value:function(e){var t=e.nodeAt(this.pos);if(!t)return S.fail("No node at mark step's position");var r=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return S.fromReplace(e,this.pos,this.pos+1,new h.Slice(h.Fragment.from(r),0,t.isLeaf?0:1))}},{key:"invert",value:function(e){var t=e.nodeAt(this.pos);if(t){var n=this.mark.addToSet(t.marks);if(n.length==t.marks.length){for(var i=0;i<t.marks.length;i++)if(!t.marks[i].isInSet(n))return new r(this.pos,t.marks[i]);return new r(this.pos,this.mark)}}return new C(this.pos,this.mark)}},{key:"map",value:function(e){var t=e.mapResult(this.pos,1);return t.deletedAfter?null:new r(t.pos,this.mark)}},{key:"toJSON",value:function(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}}],[{key:"fromJSON",value:function(e,t){if("number"!=typeof t.pos)throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new r(t.pos,e.markFromJSON(t.mark))}}]),r}(w);w.jsonID("addNodeMark",x);var C=function(e){i(r,e);var t=a(r);function r(e,n){var i;return p(this,r),(i=t.call(this)).pos=e,i.mark=n,i}return f(r,[{key:"apply",value:function(e){var t=e.nodeAt(this.pos);if(!t)return S.fail("No node at mark step's position");var r=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return S.fromReplace(e,this.pos,this.pos+1,new h.Slice(h.Fragment.from(r),0,t.isLeaf?0:1))}},{key:"invert",value:function(e){var t=e.nodeAt(this.pos);return t&&this.mark.isInSet(t.marks)?new x(this.pos,this.mark):this}},{key:"map",value:function(e){var t=e.mapResult(this.pos,1);return t.deletedAfter?null:new r(t.pos,this.mark)}},{key:"toJSON",value:function(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}}],[{key:"fromJSON",value:function(e,t){if("number"!=typeof t.pos)throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new r(t.pos,e.markFromJSON(t.mark))}}]),r}(w);w.jsonID("removeNodeMark",C);var N=function(e){i(r,e);var t=a(r);function r(e,n,i){var o,a=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return p(this,r),(o=t.call(this)).from=e,o.to=n,o.slice=i,o.structure=a,o}return f(r,[{key:"apply",value:function(e){return this.structure&&O(e,this.from,this.to)?S.fail("Structure replace would overwrite content"):S.fromReplace(e,this.from,this.to,this.slice)}},{key:"getMap",value:function(){return new y([this.from,this.to-this.from,this.slice.size])}},{key:"invert",value:function(e){return new r(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}},{key:"map",value:function(e){var t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deletedAcross&&n.deletedAcross?null:new r(t.pos,Math.max(t.pos,n.pos),this.slice)}},{key:"merge",value:function(e){if(!(e instanceof r)||e.structure||this.structure)return null;if(this.from+this.slice.size!=e.from||this.slice.openEnd||e.slice.openStart){if(e.to!=this.from||this.slice.openStart||e.slice.openEnd)return null;var t=this.slice.size+e.slice.size==0?h.Slice.empty:new h.Slice(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new r(e.from,this.to,t,this.structure)}var n=this.slice.size+e.slice.size==0?h.Slice.empty:new h.Slice(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new r(this.from,this.to+(e.to-e.from),n,this.structure)}},{key:"toJSON",value:function(){var e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}}],[{key:"fromJSON",value:function(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new r(t.from,t.to,h.Slice.fromJSON(e,t.slice),!!t.structure)}}]),r}(w);w.jsonID("replace",N);var T=function(e){i(r,e);var t=a(r);function r(e,n,i,o,a,s){var u,l=arguments.length>6&&void 0!==arguments[6]&&arguments[6];return p(this,r),(u=t.call(this)).from=e,u.to=n,u.gapFrom=i,u.gapTo=o,u.slice=a,u.insert=s,u.structure=l,u}return f(r,[{key:"apply",value:function(e){if(this.structure&&(O(e,this.from,this.gapFrom)||O(e,this.gapTo,this.to)))return S.fail("Structure gap-replace would overwrite content");var t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return S.fail("Gap is not a flat range");var r=this.slice.insertAt(this.insert,t.content);return r?S.fromReplace(e,this.from,this.to,r):S.fail("Content does not fit in gap")}},{key:"getMap",value:function(){return new y([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}},{key:"invert",value:function(e){var t=this.gapTo-this.gapFrom;return new r(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}},{key:"map",value:function(e){var t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1),i=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),o=this.to==this.gapTo?n.pos:e.map(this.gapTo,1);return t.deletedAcross&&n.deletedAcross||i<t.pos||o>n.pos?null:new r(t.pos,n.pos,i,o,this.slice,this.insert,this.structure)}},{key:"toJSON",value:function(){var e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}}],[{key:"fromJSON",value:function(e,t){if("number"!=typeof t.from||"number"!=typeof t.to||"number"!=typeof t.gapFrom||"number"!=typeof t.gapTo||"number"!=typeof t.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new r(t.from,t.to,t.gapFrom,t.gapTo,h.Slice.fromJSON(e,t.slice),t.insert,!!t.structure)}}]),r}(w);function O(e,t,r){for(var n=e.resolve(t),i=r-t,o=n.depth;i>0&&o>0&&n.indexAfter(o)==n.node(o).childCount;)o--,i--;if(i>0)for(var a=n.node(o).maybeChild(n.indexAfter(o));i>0;){if(!a||a.isLeaf)return!0;a=a.firstChild,i--}return!1}function F(e,t,r){for(var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:r.contentMatch,i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=e.doc.nodeAt(t),a=[],s=t+1,u=0;u<o.childCount;u++){var l=o.child(u),p=s+l.nodeSize,c=n.matchType(l.type);if(c){n=c;for(var f=0;f<l.marks.length;f++)r.allowsMarkType(l.marks[f].type)||e.step(new R(s,p,l.marks[f]));if(i&&l.isText&&"pre"!=r.whitespace)for(var d=void 0,v=/\r?\n|\r/g,m=void 0;d=v.exec(l.text);)m||(m=new h.Slice(h.Fragment.from(r.schema.text(" ",r.allowedMarks(l.marks))),0,0)),a.push(new N(s+d.index,s+d.index+d[0].length,m))}else a.push(new N(s,p,h.Slice.empty));s=p}if(!n.validEnd){var y=n.fillBefore(h.Fragment.empty,!0);e.replace(s,s,new h.Slice(y,0,0))}for(var g=a.length-1;g>=0;g--)e.step(a[g])}function E(e,t,r){return(0==t||e.canReplace(t,e.childCount))&&(r==e.childCount||e.canReplace(0,r))}function A(e){return{type:e,attrs:null}}function I(e,t,r,n){t.forEach((function(i,o){if(i.isText)for(var a,s=/\r?\n|\r/g;a=s.exec(i.text);){var u=e.mapping.slice(n).map(r+1+o+a.index);e.replaceWith(u,u+1,t.type.schema.linebreakReplacement.create())}}))}function J(e,t,r,n){t.forEach((function(i,o){if(i.type==i.type.schema.linebreakReplacement){var a=e.mapping.slice(n).map(r+1+o);e.replaceWith(a,a+1,t.type.schema.text("\n"))}}))}function z(e,t){return!(!e||!t||e.isLeaf||!function(e,t){t.content.size||e.type.compatibleContent(t.type);for(var r=e.contentMatchAt(e.childCount),n=e.type.schema.linebreakReplacement,i=0;i<t.childCount;i++){var o=t.child(i),a=o.type==n?e.type.schema.nodes.text:o.type;if(!(r=r.matchType(a)))return!1;if(!e.type.allowsMarks(o.marks))return!1}return r.validEnd}(e,t))}function j(e,t,r){var n=e.resolve(t);if(n.parent.canReplaceWith(n.index(),n.index(),r))return t;if(0==n.parentOffset)for(var i=n.depth-1;i>=0;i--){var o=n.index(i);if(n.node(i).canReplaceWith(o,o,r))return n.before(i+1);if(o>0)return null}if(n.parentOffset==n.parent.content.size)for(var a=n.depth-1;a>=0;a--){var s=n.indexAfter(a);if(n.node(a).canReplaceWith(s,s,r))return n.after(a+1);if(s<n.node(a).childCount)return null}return null}function _(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:h.Slice.empty;if(t==r&&!n.size)return null;var i=e.resolve(t),o=e.resolve(r);return B(i,o,n)?new N(t,r,n):new D(i,o,n).fit()}function B(e,t,r){return!r.openStart&&!r.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),r.content)}w.jsonID("replaceAround",T);var D=function(){function e(t,r,n){p(this,e),this.$from=t,this.$to=r,this.unplaced=n,this.frontier=[],this.placed=h.Fragment.empty;for(var i=0;i<=t.depth;i++){var o=t.node(i);this.frontier.push({type:o.type,match:o.contentMatchAt(t.indexAfter(i))})}for(var a=t.depth;a>0;a--)this.placed=h.Fragment.from(t.node(a).copy(this.placed))}return f(e,[{key:"depth",get:function(){return this.frontier.length-1}},{key:"fit",value:function(){for(;this.unplaced.size;){var e=this.findFittable();e?this.placeNodes(e):this.openMore()||this.dropNode()}var t=this.mustMoveInline(),r=this.placed.size-this.depth-this.$from.depth,n=this.$from,i=this.close(t<0?this.$to:n.doc.resolve(t));if(!i)return null;for(var o=this.placed,a=n.depth,s=i.depth;a&&s&&1==o.childCount;)o=o.firstChild.content,a--,s--;var u=new h.Slice(o,a,s);return t>-1?new T(n.pos,t,this.$to.pos,this.$to.end(),u,r):u.size||n.pos!=this.$to.pos?new N(n.pos,i.pos,u):null}},{key:"findFittable",value:function(){for(var e=this.unplaced.openStart,t=this.unplaced.content,r=0,n=this.unplaced.openEnd;r<e;r++){var i=t.firstChild;if(t.childCount>1&&(n=0),i.type.spec.isolating&&n<=r){e=r;break}t=i.content}for(var o=1;o<=2;o++)for(var a=1==o?e:this.unplaced.openStart;a>=0;a--)for(var s=null,u=(a?(s=P(this.unplaced.content,a-1).firstChild).content:this.unplaced.content).firstChild,l=this.depth;l>=0;l--){var p=this.frontier[l],c=p.type,f=p.match,d=void 0,v=null;if(1==o&&(u?f.matchType(u.type)||(v=f.fillBefore(h.Fragment.from(u),!1)):s&&c.compatibleContent(s.type)))return{sliceDepth:a,frontierDepth:l,parent:s,inject:v};if(2==o&&u&&(d=f.findWrapping(u.type)))return{sliceDepth:a,frontierDepth:l,parent:s,wrap:d};if(s&&f.matchType(s.type))break}}},{key:"openMore",value:function(){var e=this.unplaced,t=e.content,r=e.openStart,n=e.openEnd,i=P(t,r);return!(!i.childCount||i.firstChild.isLeaf)&&(this.unplaced=new h.Slice(t,r+1,Math.max(n,i.size+r>=t.size-n?r+1:0)),!0)}},{key:"dropNode",value:function(){var e=this.unplaced,t=e.content,r=e.openStart,n=e.openEnd,i=P(t,r);if(i.childCount<=1&&r>0){var o=t.size-r<=r+i.size;this.unplaced=new h.Slice($(t,r-1,1),r-1,o?r-1:n)}else this.unplaced=new h.Slice($(t,r,1),r,n)}},{key:"placeNodes",value:function(e){for(var t=e.sliceDepth,r=e.frontierDepth,n=e.parent,i=e.inject,o=e.wrap;this.depth>r;)this.closeFrontierNode();if(o)for(var a=0;a<o.length;a++)this.openFrontierNode(o[a]);var s=this.unplaced,u=n?n.content:s.content,l=s.openStart-t,p=0,c=[],f=this.frontier[r],d=f.match,v=f.type;if(i){for(var m=0;m<i.childCount;m++)c.push(i.child(m));d=d.matchFragment(i)}for(var y=u.size+t-(s.content.size-s.openEnd);p<u.childCount;){var g=u.child(p),k=d.matchType(g.type);if(!k)break;(++p>1||0==l||g.content.size)&&(d=k,c.push(L(g.mark(v.allowedMarks(g.marks)),1==p?l:0,p==u.childCount?y:-1)))}var w=p==u.childCount;w||(y=-1),this.placed=W(this.placed,r,h.Fragment.from(c)),this.frontier[r].match=d,w&&y<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(var S=0,b=u;S<y;S++){var M=b.lastChild;this.frontier.push({type:M.type,match:M.contentMatchAt(M.childCount)}),b=M.content}this.unplaced=w?0==t?h.Slice.empty:new h.Slice($(s.content,t-1,1),t-1,y<0?s.openEnd:t-1):new h.Slice($(s.content,t,p),s.openStart,s.openEnd)}},{key:"mustMoveInline",value:function(){if(!this.$to.parent.isTextblock)return-1;var e,t=this.frontier[this.depth];if(!t.type.isTextblock||!q(this.$to,this.$to.depth,t.type,t.match,!1)||this.$to.depth==this.depth&&(e=this.findCloseLevel(this.$to))&&e.depth==this.depth)return-1;for(var r=this.$to.depth,n=this.$to.after(r);r>1&&n==this.$to.end(--r);)++n;return n}},{key:"findCloseLevel",value:function(e){e:for(var t=Math.min(this.depth,e.depth);t>=0;t--){var r=this.frontier[t],n=r.match,i=r.type,o=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),a=q(e,t,i,n,o);if(a){for(var s=t-1;s>=0;s--){var u=this.frontier[s],l=u.match,p=q(e,s,u.type,l,!0);if(!p||p.childCount)continue e}return{depth:t,fit:a,move:o?e.doc.resolve(e.after(t+1)):e}}}}},{key:"close",value:function(e){var t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=W(this.placed,t.depth,t.fit)),e=t.move;for(var r=t.depth+1;r<=e.depth;r++){var n=e.node(r),i=n.type.contentMatch.fillBefore(n.content,!0,e.index(r));this.openFrontierNode(n.type,n.attrs,i)}return e}},{key:"openFrontierNode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2?arguments[2]:void 0,n=this.frontier[this.depth];n.match=n.match.matchType(e),this.placed=W(this.placed,this.depth,h.Fragment.from(e.create(t,r))),this.frontier.push({type:e,match:e.contentMatch})}},{key:"closeFrontierNode",value:function(){var e=this.frontier.pop().match.fillBefore(h.Fragment.empty,!0);e.childCount&&(this.placed=W(this.placed,this.frontier.length,e))}}]),e}();function $(e,t,r){return 0==t?e.cutByIndex(r,e.childCount):e.replaceChild(0,e.firstChild.copy($(e.firstChild.content,t-1,r)))}function W(e,t,r){return 0==t?e.append(r):e.replaceChild(e.childCount-1,e.lastChild.copy(W(e.lastChild.content,t-1,r)))}function P(e,t){for(var r=0;r<t;r++)e=e.firstChild.content;return e}function L(e,t,r){if(t<=0)return e;var n=e.content;return t>1&&(n=n.replaceChild(0,L(n.firstChild,t-1,1==n.childCount?r-1:0))),t>0&&(n=e.type.contentMatch.fillBefore(n).append(n),r<=0&&(n=n.append(e.type.contentMatch.matchFragment(n).fillBefore(h.Fragment.empty,!0)))),e.copy(n)}function q(e,t,r,n,i){var o=e.node(t),a=i?e.indexAfter(t):e.index(t);if(a==o.childCount&&!r.compatibleContent(o.type))return null;var s=n.fillBefore(o.content,!0,a);return s&&!function(e,t,r){for(var n=r;n<t.childCount;n++)if(!e.allowsMarks(t.child(n).marks))return!0;return!1}(r,o.content,a)?s:null}function G(e,t,r,n,i){if(t<r){var o=e.firstChild;e=e.replaceChild(0,o.copy(G(o.content,t+1,r,n,o)))}if(t>n){var a=i.contentMatchAt(0),s=a.fillBefore(e).append(e);e=s.append(a.matchFragment(s).fillBefore(h.Fragment.empty,!0))}return e}function H(e,t){for(var r=[],n=Math.min(e.depth,t.depth);n>=0;n--){var i=e.start(n);if(i<e.pos-(e.depth-n)||t.end(n)>t.pos+(t.depth-n)||e.node(n).type.spec.isolating||t.node(n).type.spec.isolating)break;(i==t.start(n)||n==e.depth&&n==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&n&&t.start(n-1)==i-1)&&r.push(n)}return r}var K=function(e){i(r,e);var t=a(r);function r(e,n,i){var o;return p(this,r),(o=t.call(this)).pos=e,o.attr=n,o.value=i,o}return f(r,[{key:"apply",value:function(e){var t=e.nodeAt(this.pos);if(!t)return S.fail("No node at attribute step's position");var r=Object.create(null);for(var n in t.attrs)r[n]=t.attrs[n];r[this.attr]=this.value;var i=t.type.create(r,null,t.marks);return S.fromReplace(e,this.pos,this.pos+1,new h.Slice(h.Fragment.from(i),0,t.isLeaf?0:1))}},{key:"getMap",value:function(){return y.empty}},{key:"invert",value:function(e){return new r(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}},{key:"map",value:function(e){var t=e.mapResult(this.pos,1);return t.deletedAfter?null:new r(t.pos,this.attr,this.value)}},{key:"toJSON",value:function(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}}],[{key:"fromJSON",value:function(e,t){if("number"!=typeof t.pos||"string"!=typeof t.attr)throw new RangeError("Invalid input for AttrStep.fromJSON");return new r(t.pos,t.attr,t.value)}}]),r}(w);w.jsonID("attr",K);var Q=function(e){i(r,e);var t=a(r);function r(e,n){var i;return p(this,r),(i=t.call(this)).attr=e,i.value=n,i}return f(r,[{key:"apply",value:function(e){var t=Object.create(null);for(var r in e.attrs)t[r]=e.attrs[r];t[this.attr]=this.value;var n=e.type.create(t,e.content,e.marks);return S.ok(n)}},{key:"getMap",value:function(){return y.empty}},{key:"invert",value:function(e){return new r(this.attr,e.attrs[this.attr])}},{key:"map",value:function(e){return this}},{key:"toJSON",value:function(){return{stepType:"docAttr",attr:this.attr,value:this.value}}}],[{key:"fromJSON",value:function(e,t){if("string"!=typeof t.attr)throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new r(t.attr,t.value)}}]),r}(w);w.jsonID("docAttr",Q),e.TransformError=function(e){i(r,e);var t=a(r);function r(){return p(this,r),t.apply(this,arguments)}return f(r)}(r(Error)),e.TransformError=function e(t){var r=Error.call(this,t);return r.__proto__=e.prototype,r},e.TransformError.prototype=Object.create(Error.prototype),e.TransformError.prototype.constructor=e.TransformError,e.TransformError.prototype.name="TransformError";var U=function(){function t(e){p(this,t),this.doc=e,this.steps=[],this.docs=[],this.mapping=new g}return f(t,[{key:"before",get:function(){return this.docs.length?this.docs[0]:this.doc}},{key:"step",value:function(t){var r=this.maybeStep(t);if(r.failed)throw new e.TransformError(r.failed);return this}},{key:"maybeStep",value:function(e){var t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}},{key:"docChanged",get:function(){return this.steps.length>0}},{key:"addStep",value:function(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}},{key:"replace",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h.Slice.empty,n=_(this.doc,e,t,r);return n&&this.step(n),this}},{key:"replaceWith",value:function(e,t,r){return this.replace(e,t,new h.Slice(h.Fragment.from(r),0,0))}},{key:"delete",value:function(e,t){return this.replace(e,t,h.Slice.empty)}},{key:"insert",value:function(e,t){return this.replaceWith(e,e,t)}},{key:"replaceRange",value:function(e,t,r){return function(e,t,r,n){if(!n.size)return e.deleteRange(t,r);var i=e.doc.resolve(t),o=e.doc.resolve(r);if(B(i,o,n))return e.step(new N(t,r,n));var a=H(i,e.doc.resolve(r));0==a[a.length-1]&&a.pop();var s=-(i.depth+1);a.unshift(s);for(var u=i.depth,l=i.pos-1;u>0;u--,l--){var p=i.node(u).type.spec;if(p.defining||p.definingAsContext||p.isolating)break;a.indexOf(u)>-1?s=u:i.before(u)==l&&a.splice(1,0,-u)}for(var c,f=a.indexOf(s),d=[],v=n.openStart,m=n.content,y=0;;y++){var g=m.firstChild;if(d.push(g),y==n.openStart)break;m=g.content}for(var k=v-1;k>=0;k--){var w=d[k],S=(c=w.type).spec.defining||c.spec.definingForContent;if(S&&!w.sameMarkup(i.node(Math.abs(s)-1)))v=k;else if(S||!w.type.isTextblock)break}for(var b=n.openStart;b>=0;b--){var M=(b+v+1)%(n.openStart+1),R=d[M];if(R)for(var x=0;x<a.length;x++){var C=a[(x+f)%a.length],T=!0;C<0&&(T=!1,C=-C);var O=i.node(C-1),F=i.index(C-1);if(O.canReplaceWith(F,F,R.type,R.marks))return e.replace(i.before(C),T?o.after(C):r,new h.Slice(G(n.content,0,n.openStart,M),M,n.openEnd))}}for(var E=e.steps.length,A=a.length-1;A>=0&&(e.replace(t,r,n),!(e.steps.length>E));A--){var I=a[A];I<0||(t=i.before(I),r=o.after(I))}}(this,e,t,r),this}},{key:"replaceRangeWith",value:function(e,t,r){return function(e,t,r,n){if(!n.isInline&&t==r&&e.doc.resolve(t).parent.content.size){var i=j(e.doc,t,n.type);null!=i&&(t=r=i)}e.replaceRange(t,r,new h.Slice(h.Fragment.from(n),0,0))}(this,e,t,r),this}},{key:"deleteRange",value:function(e,t){return function(e,t,r){for(var n=e.doc.resolve(t),i=e.doc.resolve(r),o=H(n,i),a=0;a<o.length;a++){var s=o[a],u=a==o.length-1;if(u&&0==s||n.node(s).type.contentMatch.validEnd)return e.delete(n.start(s),i.end(s));if(s>0&&(u||n.node(s-1).canReplace(n.index(s-1),i.indexAfter(s-1))))return e.delete(n.before(s),i.after(s))}for(var l=1;l<=n.depth&&l<=i.depth;l++)if(t-n.start(l)==n.depth-l&&r>n.end(l)&&i.end(l)-r!=i.depth-l&&n.start(l-1)==i.start(l-1)&&n.node(l-1).canReplace(n.index(l-1),i.index(l-1)))return e.delete(n.before(l),r);e.delete(t,r)}(this,e,t),this}},{key:"lift",value:function(e,t){return function(e,t,r){for(var n=t.$from,i=t.$to,o=t.depth,a=n.before(o+1),s=i.after(o+1),u=a,l=s,p=h.Fragment.empty,c=0,f=o,d=!1;f>r;f--)d||n.index(f)>0?(d=!0,p=h.Fragment.from(n.node(f).copy(p)),c++):u--;for(var v=h.Fragment.empty,m=0,y=o,g=!1;y>r;y--)g||i.after(y+1)<i.end(y)?(g=!0,v=h.Fragment.from(i.node(y).copy(v)),m++):l++;e.step(new T(u,l,a,s,new h.Slice(p.append(v),c,m),p.size-c,!0))}(this,e,t),this}},{key:"join",value:function(e){return function(e,t,r){var n=null,i=e.doc.type.schema.linebreakReplacement,o=e.doc.resolve(t-r),a=o.node().type;if(i&&a.inlineContent){var s="pre"==a.whitespace,u=!!a.contentMatch.matchType(i);s&&!u?n=!1:!s&&u&&(n=!0)}var l=e.steps.length;if(!1===n){var p=e.doc.resolve(t+r);J(e,p.node(),p.before(),l)}a.inlineContent&&F(e,t+r-1,a,o.node().contentMatchAt(o.index()),null==n);var c=e.mapping.slice(l),f=c.map(t-r);if(e.step(new N(f,c.map(t+r,-1),h.Slice.empty,!0)),!0===n){var d=e.doc.resolve(f);I(e,d.node(),d.before(),e.steps.length)}}(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:1),this}},{key:"wrap",value:function(e,t){return function(e,t,r){for(var n=h.Fragment.empty,i=r.length-1;i>=0;i--){if(n.size){var o=r[i].type.contentMatch.matchFragment(n);if(!o||!o.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}n=h.Fragment.from(r[i].type.create(r[i].attrs,n))}var a=t.start,s=t.end;e.step(new T(a,s,a,s,new h.Slice(n,0,0),r.length,!0))}(this,e,t),this}},{key:"setBlockType",value:function(e){return function(e,t,r,n,i){if(!n.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");var o=e.steps.length;e.doc.nodesBetween(t,r,(function(t,r){var a="function"==typeof i?i(t):i;if(t.isTextblock&&!t.hasMarkup(n,a)&&function(e,t,r){var n=e.resolve(t),i=n.index();return n.parent.canReplaceWith(i,i+1,r)}(e.doc,e.mapping.slice(o).map(r),n)){var s=null;if(n.schema.linebreakReplacement){var u="pre"==n.whitespace,l=!!n.contentMatch.matchType(n.schema.linebreakReplacement);u&&!l?s=!1:!u&&l&&(s=!0)}!1===s&&J(e,t,r,o),F(e,e.mapping.slice(o).map(r,1),n,void 0,null===s);var p=e.mapping.slice(o),c=p.map(r,1),f=p.map(r+t.nodeSize,1);return e.step(new T(c,f,c+1,f-1,new h.Slice(h.Fragment.from(n.create(a,null,t.marks)),0,0),1,!0)),!0===s&&I(e,t,r,o),!1}}))}(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,arguments.length>2?arguments[2]:void 0,arguments.length>3&&void 0!==arguments[3]?arguments[3]:null),this}},{key:"setNodeMarkup",value:function(e,t){return function(e,t,r,n,i){var o=e.doc.nodeAt(t);if(!o)throw new RangeError("No node at given position");r||(r=o.type);var a=r.create(n,null,i||o.marks);if(o.isLeaf)return e.replaceWith(t,t+o.nodeSize,a);if(!r.validContent(o.content))throw new RangeError("Invalid content for node type "+r.name);e.step(new T(t,t+o.nodeSize,t+1,t+o.nodeSize-1,new h.Slice(h.Fragment.from(a),0,0),1,!0))}(this,e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,arguments.length>3?arguments[3]:void 0),this}},{key:"setNodeAttribute",value:function(e,t,r){return this.step(new K(e,t,r)),this}},{key:"setDocAttribute",value:function(e,t){return this.step(new Q(e,t)),this}},{key:"addNodeMark",value:function(e,t){return this.step(new x(e,t)),this}},{key:"removeNodeMark",value:function(e,t){if(!(t instanceof h.Mark)){var r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(!(t=t.isInSet(r.marks)))return this}return this.step(new C(e,t)),this}},{key:"split",value:function(e){return function(e,t){for(var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3?arguments[3]:void 0,i=e.doc.resolve(t),o=h.Fragment.empty,a=h.Fragment.empty,s=i.depth,u=i.depth-r,l=r-1;s>u;s--,l--){o=h.Fragment.from(i.node(s).copy(o));var p=n&&n[l];a=h.Fragment.from(p?p.type.create(p.attrs,a):i.node(s).copy(a))}e.step(new N(t,t,new h.Slice(o.append(a),r,r),!0))}(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,arguments.length>2?arguments[2]:void 0),this}},{key:"addMark",value:function(e,t,r){return function(e,t,r,n){var i,o,a=[],s=[];e.doc.nodesBetween(t,r,(function(e,u,l){if(e.isInline){var p=e.marks;if(!n.isInSet(p)&&l.type.allowsMarkType(n.type)){for(var c=Math.max(u,t),f=Math.min(u+e.nodeSize,r),h=n.addToSet(p),d=0;d<p.length;d++)p[d].isInSet(h)||(i&&i.to==c&&i.mark.eq(p[d])?i.to=f:a.push(i=new R(c,f,p[d])));o&&o.to==c?o.to=f:s.push(o=new M(c,f,n))}}})),a.forEach((function(t){return e.step(t)})),s.forEach((function(t){return e.step(t)}))}(this,e,t,r),this}},{key:"removeMark",value:function(e,t,r){return function(e,t,r,n){var i=[],o=0;e.doc.nodesBetween(t,r,(function(e,a){if(e.isInline){o++;var s=null;if(n instanceof h.MarkType)for(var u,l=e.marks;u=n.isInSet(l);)(s||(s=[])).push(u),l=u.removeFromSet(l);else n?n.isInSet(e.marks)&&(s=[n]):s=e.marks;if(s&&s.length)for(var p=Math.min(a+e.nodeSize,r),c=0;c<s.length;c++){for(var f=s[c],d=void 0,v=0;v<i.length;v++){var m=i[v];m.step==o-1&&f.eq(i[v].style)&&(d=m)}d?(d.to=p,d.step=o):i.push({style:f,from:Math.max(a,t),to:p,step:o})}}})),i.forEach((function(t){return e.step(new R(t.from,t.to,t.style))}))}(this,e,t,r),this}},{key:"clearIncompatible",value:function(e,t,r){return F(this,e,t,r),this}}]),t}();e.AddMarkStep=M,e.AddNodeMarkStep=x,e.AttrStep=K,e.DocAttrStep=Q,e.MapResult=m,e.Mapping=g,e.RemoveMarkStep=R,e.RemoveNodeMarkStep=C,e.ReplaceAroundStep=T,e.ReplaceStep=N,e.Step=w,e.StepMap=y,e.StepResult=S,e.Transform=U,e.canJoin=function(e,t){var r=e.resolve(t),n=r.index();return z(r.nodeBefore,r.nodeAfter)&&r.parent.canReplace(n,n+1)},e.canSplit=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3?arguments[3]:void 0,i=e.resolve(t),o=i.depth-r,a=n&&n[n.length-1]||i.parent;if(o<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!a.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(var s=i.depth-1,u=r-2;s>o;s--,u--){var l=i.node(s),p=i.index(s);if(l.type.spec.isolating)return!1;var c=l.content.cutByIndex(p,l.childCount),f=n&&n[u+1];f&&(c=c.replaceChild(0,f.type.create(f.attrs)));var h=n&&n[u]||l;if(!l.canReplace(p+1,l.childCount)||!h.type.validContent(c))return!1}var d=i.indexAfter(o),v=n&&n[0];return i.node(o).canReplaceWith(d,d,v?v.type:i.node(o+1).type)},e.dropPoint=function(e,t,r){var n=e.resolve(t);if(!r.content.size)return t;for(var i=r.content,o=0;o<r.openStart;o++)i=i.firstChild.content;for(var a=1;a<=(0==r.openStart&&r.size?2:1);a++)for(var s=n.depth;s>=0;s--){var u=s==n.depth?0:n.pos<=(n.start(s+1)+n.end(s+1))/2?-1:1,l=n.index(s)+(u>0?1:0),p=n.node(s),c=!1;if(1==a)c=p.canReplace(l,l,i);else{var f=p.contentMatchAt(l).findWrapping(i.firstChild.type);c=f&&p.canReplaceWith(l,l,f[0])}if(c)return 0==u?n.pos:u<0?n.before(s+1):n.after(s+1)}return null},e.findWrapping=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e,i=function(e,t){var r=e.parent,n=e.startIndex,i=e.endIndex,o=r.contentMatchAt(n).findWrapping(t);if(!o)return null;var a=o.length?o[0]:t;return r.canReplaceWith(n,i,a)?o:null}(e,t),o=i&&function(e,t){var r=e.parent,n=e.startIndex,i=e.endIndex,o=r.child(n),a=t.contentMatch.findWrapping(o.type);if(!a)return null;for(var s=(a.length?a[a.length-1]:t).contentMatch,u=n;s&&u<i;u++)s=s.matchType(r.child(u).type);return s&&s.validEnd?a:null}(n,t);return o?i.map(A).concat({type:t,attrs:r}).concat(o.map(A)):null},e.insertPoint=j,e.joinPoint=function(e,t){for(var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,n=e.resolve(t),i=n.depth;;i--){var o=void 0,a=void 0,s=n.index(i);if(i==n.depth?(o=n.nodeBefore,a=n.nodeAfter):r>0?(o=n.node(i+1),s++,a=n.node(i).maybeChild(s)):(o=n.node(i).maybeChild(s-1),a=n.node(i+1)),o&&!o.isTextblock&&z(o,a)&&n.node(i).canReplace(s,s+1))return t;if(0==i)break;t=r<0?n.before(i):n.after(i)}},e.liftTarget=function(e){for(var t=e.parent.content.cutByIndex(e.startIndex,e.endIndex),r=e.depth;;--r){var n=e.$from.node(r),i=e.$from.index(r),o=e.$to.indexAfter(r);if(r<e.depth&&n.canReplace(i,o,t))return r;if(0==r||n.type.spec.isolating||!E(n,i,o))break}return null},e.replaceStep=_}(e)),e}export{n as __require};
|
2
|
-
//# sourceMappingURL=index2.mjs.map
|