@ncino/web-components 4.3.0-preview.1 → 4.3.0-preview.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/external3.js +1 -0
- package/dist/_virtual/index10.js +1 -1
- package/dist/_virtual/index11.js +1 -1
- package/dist/_virtual/index12.js +1 -0
- package/dist/_virtual/index13.js +1 -0
- package/dist/_virtual/index2.js +1 -1
- package/dist/_virtual/index3.js +1 -1
- package/dist/_virtual/index4.js +1 -1
- package/dist/_virtual/index5.js +1 -1
- package/dist/_virtual/index6.js +1 -1
- package/dist/_virtual/index7.js +1 -1
- package/dist/_virtual/index8.js +1 -1
- package/dist/_virtual/index9.js +1 -1
- package/dist/_virtual/index_react.js +1 -0
- package/dist/_virtual/index_react2.js +1 -0
- package/dist/_virtual/react.production.js +1 -0
- package/dist/assets/node_modules/.pnpm/{ckeditor5@45.1.0 → ckeditor5@45.2.1}/node_modules/ckeditor5/dist/ckeditor5.css +1 -1
- package/dist/components/alert/alert.gator.figma.js +7 -0
- package/dist/components/avatar/gator/avatar.gator.figma.js +9 -0
- package/dist/components/banner/gator/banner.gator.figma.js +8 -0
- package/dist/components/banner/gator/banner.gator.js +6 -5
- package/dist/components/button/gator/button.gator.figma.js +12 -4
- package/dist/components/button-group/gator/button-group.gator.figma.js +7 -0
- package/dist/components/checkbox/checkbox.gator.js +9 -6
- package/dist/components/icon/gator/icon.gator.figma.js +7 -2
- package/dist/components/icon/gator/icons.gator.figma.js +1 -0
- package/dist/components/input/gator/dropdown/input-dropdown.gator.js +1 -1
- package/dist/components/input/gator/input-date/input-date.gator.js +1 -1
- package/dist/components/input/gator/input-phone/input-phone.gator.js +1 -1
- package/dist/components/input/gator/input-time/input-time.gator.js +1 -1
- package/dist/components/input-rich-text/ckeditor-config.js +1 -1
- package/dist/components/input-rich-text/input-rich-text.slds.js +2 -2
- package/dist/components/menu/base/gator/menu.gator.js +1 -1
- package/dist/components/menu/menu-item/gator/menu-item.gator.js +2 -2
- package/dist/components/panel/gator/panel.storybook-test.js +1 -1
- package/dist/components/popover/gator/popover.gator.js +1 -1
- package/dist/components/table/gator/__tests__/test-table-data.js +1 -1
- package/dist/components/table/gator/table.gator.js +77 -32
- package/dist/components/tooltip/gator/tooltip.gator.js +1 -1
- package/dist/components/tooltip/slds/tooltip.slds.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-alignment@45.1.0 → @ckeditor_ckeditor5-alignment@45.2.1}/node_modules/@ckeditor/ckeditor5-alignment/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-autoformat@45.1.0 → @ckeditor_ckeditor5-autoformat@45.2.1}/node_modules/@ckeditor/ckeditor5-autoformat/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-autosave@45.1.0 → @ckeditor_ckeditor5-autosave@45.2.1}/node_modules/@ckeditor/ckeditor5-autosave/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-basic-styles@45.1.0 → @ckeditor_ckeditor5-basic-styles@45.2.1}/node_modules/@ckeditor/ckeditor5-basic-styles/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-block-quote@45.1.0 → @ckeditor_ckeditor5-block-quote@45.2.1}/node_modules/@ckeditor/ckeditor5-block-quote/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-clipboard@45.1.0 → @ckeditor_ckeditor5-clipboard@45.2.1}/node_modules/@ckeditor/ckeditor5-clipboard/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-cloud-services@45.1.0 → @ckeditor_ckeditor5-cloud-services@45.2.1}/node_modules/@ckeditor/ckeditor5-cloud-services/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-code-block@45.1.0 → @ckeditor_ckeditor5-code-block@45.2.1}/node_modules/@ckeditor/ckeditor5-code-block/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-core@45.1.0 → @ckeditor_ckeditor5-core@45.2.1}/node_modules/@ckeditor/ckeditor5-core/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-editor-classic@45.1.0 → @ckeditor_ckeditor5-editor-classic@45.2.1}/node_modules/@ckeditor/ckeditor5-editor-classic/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-engine@45.1.0 → @ckeditor_ckeditor5-engine@45.2.1}/node_modules/@ckeditor/ckeditor5-engine/dist/index.js +10 -10
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-enter@45.1.0 → @ckeditor_ckeditor5-enter@45.2.1}/node_modules/@ckeditor/ckeditor5-enter/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-essentials@45.1.0 → @ckeditor_ckeditor5-essentials@45.2.1}/node_modules/@ckeditor/ckeditor5-essentials/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-find-and-replace@45.1.0 → @ckeditor_ckeditor5-find-and-replace@45.2.1}/node_modules/@ckeditor/ckeditor5-find-and-replace/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-font@45.1.0 → @ckeditor_ckeditor5-font@45.2.1}/node_modules/@ckeditor/ckeditor5-font/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-heading@45.1.0 → @ckeditor_ckeditor5-heading@45.2.1}/node_modules/@ckeditor/ckeditor5-heading/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-highlight@45.1.0 → @ckeditor_ckeditor5-highlight@45.2.1}/node_modules/@ckeditor/ckeditor5-highlight/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-horizontal-line@45.1.0 → @ckeditor_ckeditor5-horizontal-line@45.2.1}/node_modules/@ckeditor/ckeditor5-horizontal-line/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-html-embed@45.1.0 → @ckeditor_ckeditor5-html-embed@45.2.1}/node_modules/@ckeditor/ckeditor5-html-embed/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-html-support@45.1.0 → @ckeditor_ckeditor5-html-support@45.2.1}/node_modules/@ckeditor/ckeditor5-html-support/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-image@45.1.0 → @ckeditor_ckeditor5-image@45.2.1}/node_modules/@ckeditor/ckeditor5-image/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-indent@45.1.0 → @ckeditor_ckeditor5-indent@45.2.1}/node_modules/@ckeditor/ckeditor5-indent/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-language@45.1.0 → @ckeditor_ckeditor5-language@45.2.1}/node_modules/@ckeditor/ckeditor5-language/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-link@45.1.0 → @ckeditor_ckeditor5-link@45.2.1}/node_modules/@ckeditor/ckeditor5-link/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-list@45.1.0 → @ckeditor_ckeditor5-list@45.2.1}/node_modules/@ckeditor/ckeditor5-list/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-markdown-gfm@45.1.0 → @ckeditor_ckeditor5-markdown-gfm@45.2.1}/node_modules/@ckeditor/ckeditor5-markdown-gfm/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-media-embed@45.1.0 → @ckeditor_ckeditor5-media-embed@45.2.1}/node_modules/@ckeditor/ckeditor5-media-embed/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-mention@45.1.0 → @ckeditor_ckeditor5-mention@45.2.1}/node_modules/@ckeditor/ckeditor5-mention/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-page-break@45.1.0 → @ckeditor_ckeditor5-page-break@45.2.1}/node_modules/@ckeditor/ckeditor5-page-break/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-paragraph@45.1.0 → @ckeditor_ckeditor5-paragraph@45.2.1}/node_modules/@ckeditor/ckeditor5-paragraph/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-paste-from-office@45.2.1/node_modules/@ckeditor/ckeditor5-paste-from-office/dist/index.js +28 -0
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-remove-format@45.1.0 → @ckeditor_ckeditor5-remove-format@45.2.1}/node_modules/@ckeditor/ckeditor5-remove-format/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-select-all@45.1.0 → @ckeditor_ckeditor5-select-all@45.2.1}/node_modules/@ckeditor/ckeditor5-select-all/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-show-blocks@45.1.0 → @ckeditor_ckeditor5-show-blocks@45.2.1}/node_modules/@ckeditor/ckeditor5-show-blocks/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-source-editing@45.2.1/node_modules/@ckeditor/ckeditor5-source-editing/dist/index.js +4 -0
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-special-characters@45.1.0 → @ckeditor_ckeditor5-special-characters@45.2.1}/node_modules/@ckeditor/ckeditor5-special-characters/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-style@45.1.0 → @ckeditor_ckeditor5-style@45.2.1}/node_modules/@ckeditor/ckeditor5-style/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-table@45.1.0 → @ckeditor_ckeditor5-table@45.2.1}/node_modules/@ckeditor/ckeditor5-table/dist/index.js +2 -2
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-typing@45.2.1/node_modules/@ckeditor/ckeditor5-typing/dist/index.js +13 -0
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-ui@45.1.0 → @ckeditor_ckeditor5-ui@45.2.1}/node_modules/@ckeditor/ckeditor5-ui/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-undo@45.1.0 → @ckeditor_ckeditor5-undo@45.2.1}/node_modules/@ckeditor/ckeditor5-undo/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-upload@45.1.0 → @ckeditor_ckeditor5-upload@45.2.1}/node_modules/@ckeditor/ckeditor5-upload/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-utils@45.2.1/node_modules/@ckeditor/ckeditor5-utils/dist/index.js +112 -0
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-widget@45.1.0 → @ckeditor_ckeditor5-widget@45.2.1}/node_modules/@ckeditor/ckeditor5-widget/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/@figma_code-connect@1.3.3/node_modules/@figma/code-connect/dist/client/external.js +1 -1
- package/dist/node_modules/.pnpm/@figma_code-connect@1.3.3/node_modules/@figma/code-connect/dist/common/updates.js +1 -1
- package/dist/node_modules/.pnpm/@figma_code-connect@1.3.3/node_modules/@figma/code-connect/dist/react/external.js +1 -0
- package/dist/node_modules/.pnpm/@figma_code-connect@1.3.3/node_modules/@figma/code-connect/dist/react/index_react.js +1 -0
- package/dist/node_modules/.pnpm/@floating-ui_core@1.7.2/node_modules/@floating-ui/core/dist/floating-ui.core.js +1 -0
- package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.2/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +1 -0
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +1 -0
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +1 -0
- package/dist/node_modules/.pnpm/{@storybook_instrumenter@8.6.14_storybook@8.6.14_prettier@3.5.3_ → @storybook_instrumenter@8.6.14_storybook@8.6.14_prettier@3.6.2_}/node_modules/@storybook/instrumenter/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@storybook_test@8.6.14_storybook@8.6.14_prettier@3.5.3_ → @storybook_test@8.6.14_storybook@8.6.14_prettier@3.6.2_}/node_modules/@storybook/test/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@vitest_expect@3.2.0 → @vitest_expect@3.2.4}/node_modules/@vitest/expect/dist/index.js +10 -10
- package/dist/node_modules/.pnpm/@vitest_runner@3.2.4/node_modules/@vitest/runner/dist/chunk-hooks.js +5 -0
- package/dist/node_modules/.pnpm/@vitest_snapshot@3.2.4/node_modules/@vitest/snapshot/dist/index.js +27 -0
- package/dist/node_modules/.pnpm/@vitest_spy@3.2.4/node_modules/@vitest/spy/dist/index.js +1 -0
- package/dist/node_modules/.pnpm/{@vitest_utils@3.2.0 → @vitest_utils@3.2.4}/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.js +1 -1
- package/dist/node_modules/.pnpm/{@vitest_utils@3.2.0 → @vitest_utils@3.2.4}/node_modules/@vitest/utils/dist/diff.js +1 -1
- package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/error.js +2 -0
- package/dist/node_modules/.pnpm/{@vitest_utils@3.2.0 → @vitest_utils@3.2.4}/node_modules/@vitest/utils/dist/helpers.js +1 -1
- package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/index.js +1 -0
- package/dist/node_modules/.pnpm/ansi-styles@4.3.0/node_modules/ansi-styles/index.js +1 -1
- package/dist/node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/index.js +1 -1
- package/dist/node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/index.js +1 -1
- package/dist/node_modules/.pnpm/call-bind@1.0.8/node_modules/call-bind/index.js +1 -1
- package/dist/node_modules/.pnpm/color-parse@1.4.2/node_modules/color-parse/index.js +1 -1
- package/dist/node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/index.js +1 -1
- package/dist/node_modules/.pnpm/js-tokens@9.0.1/node_modules/js-tokens/index.js +1 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.9/node_modules/libphonenumber-js/metadata.min.json.js +1 -0
- package/dist/node_modules/.pnpm/loupe@3.1.4/node_modules/loupe/lib/html.js +2 -0
- package/dist/node_modules/.pnpm/loupe@3.1.4/node_modules/loupe/lib/index.js +1 -0
- package/dist/node_modules/.pnpm/react@19.1.0/node_modules/react/cjs/react.production.js +9 -0
- package/dist/node_modules/.pnpm/react@19.1.0/node_modules/react/index.js +1 -0
- package/dist/node_modules/.pnpm/safe-buffer@5.1.2/node_modules/safe-buffer/index.js +1 -1
- package/dist/node_modules/.pnpm/strip-literal@3.0.0/node_modules/strip-literal/dist/index.js +1 -0
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/index.js +1 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/api/index.js +1 -1
- package/dist/node_modules/.pnpm/{vitest@3.2.0_@types_debug@4.1.12_@types_node@22.15.29_@vitest_browser@3.2.0_@vitest_ui@_380928fb48d45118a64498d466bac5bf → vitest@3.2.4_@types_debug@4.1.12_@types_node@24.0.7_@vitest_browser@3.2.4_@vitest_ui@3._93f645c93c51b497c065da8f21fff0a5}/node_modules/vitest/dist/chunks/utils.XdZDrNZV.js +1 -1
- package/dist/node_modules/.pnpm/{vitest@3.2.0_@types_debug@4.1.12_@types_node@22.15.29_@vitest_browser@3.2.0_@vitest_ui@_380928fb48d45118a64498d466bac5bf → vitest@3.2.4_@types_debug@4.1.12_@types_node@24.0.7_@vitest_browser@3.2.4_@vitest_ui@3._93f645c93c51b497c065da8f21fff0a5}/node_modules/vitest/dist/chunks/vi.bdSIJ99Y.js +1 -1
- package/dist/packages/web-components/src/components/banner/gator/banner.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/table/gator/table.gator.scss.js +1 -1
- package/dist/types/components/alert/alert.gator.figma.d.ts +1 -0
- package/dist/types/components/avatar/gator/avatar.gator.figma.d.ts +1 -0
- package/dist/types/components/banner/gator/banner.gator.d.ts +5 -0
- package/dist/types/components/banner/gator/banner.gator.figma.d.ts +1 -0
- package/dist/types/components/button-group/gator/button-group.gator.figma.d.ts +1 -0
- package/dist/types/components/checkbox/checkbox.gator.d.ts +4 -0
- package/dist/types/components/icon/gator/icons.gator.figma.d.ts +1 -0
- package/dist/types/components/menu/menu-item/gator/menu-item.gator.d.ts +1 -0
- package/dist/types/components/table/gator/__tests__/test-table-data.d.ts +31 -0
- package/dist/types/components/table/gator/table.gator.d.ts +5 -0
- package/dist/types/components/table/table.d.ts +2 -0
- package/dist/utils/vitest-a11y-utils.js +1 -1
- package/package.json +21 -20
- package/web-types.json +11 -1
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-paste-from-office@45.1.0/node_modules/@ckeditor/ckeditor5-paste-from-office/dist/index.js +0 -28
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-source-editing@45.1.0/node_modules/@ckeditor/ckeditor5-source-editing/dist/index.js +0 -12
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-typing@45.1.0/node_modules/@ckeditor/ckeditor5-typing/dist/index.js +0 -13
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-utils@45.1.0/node_modules/@ckeditor/ckeditor5-utils/dist/index.js +0 -104
- package/dist/node_modules/.pnpm/@floating-ui_core@1.7.1/node_modules/@floating-ui/core/dist/floating-ui.core.js +0 -1
- package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.1/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +0 -1
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.9/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +0 -1
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.9/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +0 -1
- package/dist/node_modules/.pnpm/@vitest_runner@3.2.0/node_modules/@vitest/runner/dist/chunk-hooks.js +0 -5
- package/dist/node_modules/.pnpm/@vitest_snapshot@3.2.0/node_modules/@vitest/snapshot/dist/index.js +0 -27
- package/dist/node_modules/.pnpm/@vitest_spy@3.2.0/node_modules/@vitest/spy/dist/index.js +0 -1
- package/dist/node_modules/.pnpm/@vitest_utils@3.2.0/node_modules/@vitest/utils/dist/error.js +0 -2
- package/dist/node_modules/.pnpm/@vitest_utils@3.2.0/node_modules/@vitest/utils/dist/index.js +0 -1
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.8/node_modules/libphonenumber-js/metadata.min.json.js +0 -1
- package/dist/node_modules/.pnpm/loupe@3.1.3/node_modules/loupe/lib/html.js +0 -2
- package/dist/node_modules/.pnpm/loupe@3.1.3/node_modules/loupe/lib/index.js +0 -1
- /package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-icons@45.1.0 → @ckeditor_ckeditor5-icons@45.2.1}/node_modules/@ckeditor/ckeditor5-icons/dist/index.js +0 -0
- /package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-watchdog@45.1.0 → @ckeditor_ckeditor5-watchdog@45.2.1}/node_modules/@ckeditor/ckeditor5-watchdog/dist/index.js +0 -0
- /package/dist/node_modules/.pnpm/{@storybook_core@8.6.14_prettier@3.5.3_storybook@8.6.14_prettier@3.5.3_ → @storybook_core@8.6.14_prettier@3.6.2_storybook@8.6.14_prettier@3.6.2_}/node_modules/@storybook/core/dist/channels/index.js +0 -0
- /package/dist/node_modules/.pnpm/{@storybook_core@8.6.14_prettier@3.5.3_storybook@8.6.14_prettier@3.5.3_ → @storybook_core@8.6.14_prettier@3.6.2_storybook@8.6.14_prettier@3.6.2_}/node_modules/@storybook/core/dist/client-logger/index.js +0 -0
- /package/dist/node_modules/.pnpm/{@storybook_core@8.6.14_prettier@3.5.3_storybook@8.6.14_prettier@3.5.3_ → @storybook_core@8.6.14_prettier@3.6.2_storybook@8.6.14_prettier@3.6.2_}/node_modules/@storybook/core/dist/core-events/index.js +0 -0
- /package/dist/node_modules/.pnpm/{@storybook_core@8.6.14_prettier@3.5.3_storybook@8.6.14_prettier@3.5.3_ → @storybook_core@8.6.14_prettier@3.6.2_storybook@8.6.14_prettier@3.6.2_}/node_modules/@storybook/core/dist/csf/index.js +0 -0
- /package/dist/node_modules/.pnpm/{@storybook_core@8.6.14_prettier@3.5.3_storybook@8.6.14_prettier@3.5.3_ → @storybook_core@8.6.14_prettier@3.6.2_storybook@8.6.14_prettier@3.6.2_}/node_modules/@storybook/core/dist/preview-api/index.js +0 -0
- /package/dist/node_modules/.pnpm/{@storybook_core@8.6.14_prettier@3.5.3_storybook@8.6.14_prettier@3.5.3_ → @storybook_core@8.6.14_prettier@3.6.2_storybook@8.6.14_prettier@3.6.2_}/node_modules/@storybook/core/dist/preview-errors.js +0 -0
- /package/dist/node_modules/.pnpm/{@vitest_browser@3.2.0_msw@2.7.3_@types_node@22.15.29_typescript@5.8.3__playwright@1.52._b8e25df0066052f4b376435335cc964b → @vitest_browser@3.2.4_msw@2.7.3_@types_node@24.0.7_typescript@5.8.3__playwright@1.53.1__894c207534f0ba223b8299d9f5ff1049}/node_modules/@vitest/browser/context.js +0 -0
- /package/dist/node_modules/.pnpm/{@vitest_pretty-format@3.2.0 → @vitest_pretty-format@3.2.4}/node_modules/@vitest/pretty-format/dist/index.js +0 -0
- /package/dist/node_modules/.pnpm/{@vitest_utils@3.2.0 → @vitest_utils@3.2.4}/node_modules/@vitest/utils/dist/source-map.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.8 → libphonenumber-js@1.12.9}/node_modules/libphonenumber-js/es6/ParseError.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.8 → libphonenumber-js@1.12.9}/node_modules/libphonenumber-js/es6/PhoneNumber.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.8 → libphonenumber-js@1.12.9}/node_modules/libphonenumber-js/es6/constants.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.8 → libphonenumber-js@1.12.9}/node_modules/libphonenumber-js/es6/format.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.8 → libphonenumber-js@1.12.9}/node_modules/libphonenumber-js/es6/helpers/RFC3966.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.8 → libphonenumber-js@1.12.9}/node_modules/libphonenumber-js/es6/helpers/applyInternationalSeparatorStyle.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.8 → libphonenumber-js@1.12.9}/node_modules/libphonenumber-js/es6/helpers/checkNumberLength.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.8 → libphonenumber-js@1.12.9}/node_modules/libphonenumber-js/es6/helpers/extension/createExtensionPattern.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.8 → libphonenumber-js@1.12.9}/node_modules/libphonenumber-js/es6/helpers/extension/extractExtension.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.8 → libphonenumber-js@1.12.9}/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCode.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.8 → libphonenumber-js@1.12.9}/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.8 → libphonenumber-js@1.12.9}/node_modules/libphonenumber-js/es6/helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.8 → libphonenumber-js@1.12.9}/node_modules/libphonenumber-js/es6/helpers/extractNationalNumber.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.8 → libphonenumber-js@1.12.9}/node_modules/libphonenumber-js/es6/helpers/extractNationalNumberFromPossiblyIncompleteNumber.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.8 → libphonenumber-js@1.12.9}/node_modules/libphonenumber-js/es6/helpers/extractPhoneContext.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.8 → libphonenumber-js@1.12.9}/node_modules/libphonenumber-js/es6/helpers/formatNationalNumberUsingFormat.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.8 → libphonenumber-js@1.12.9}/node_modules/libphonenumber-js/es6/helpers/getCountryByCallingCode.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.8 → libphonenumber-js@1.12.9}/node_modules/libphonenumber-js/es6/helpers/getCountryByNationalNumber.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.8 → libphonenumber-js@1.12.9}/node_modules/libphonenumber-js/es6/helpers/getIddPrefix.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.8 → libphonenumber-js@1.12.9}/node_modules/libphonenumber-js/es6/helpers/getNumberType.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.8 → libphonenumber-js@1.12.9}/node_modules/libphonenumber-js/es6/helpers/getPossibleCountriesForNumber.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.8 → libphonenumber-js@1.12.9}/node_modules/libphonenumber-js/es6/helpers/isObject.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.8 → libphonenumber-js@1.12.9}/node_modules/libphonenumber-js/es6/helpers/isViablePhoneNumber.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.8 → libphonenumber-js@1.12.9}/node_modules/libphonenumber-js/es6/helpers/matchesEntirely.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.8 → libphonenumber-js@1.12.9}/node_modules/libphonenumber-js/es6/helpers/parseDigits.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.8 → libphonenumber-js@1.12.9}/node_modules/libphonenumber-js/es6/helpers/stripIddPrefix.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.8 → libphonenumber-js@1.12.9}/node_modules/libphonenumber-js/es6/isPossible.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.8 → libphonenumber-js@1.12.9}/node_modules/libphonenumber-js/es6/isValid.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.8 → libphonenumber-js@1.12.9}/node_modules/libphonenumber-js/es6/metadata.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.8 → libphonenumber-js@1.12.9}/node_modules/libphonenumber-js/es6/normalizeArguments.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.8 → libphonenumber-js@1.12.9}/node_modules/libphonenumber-js/es6/parse.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.8 → libphonenumber-js@1.12.9}/node_modules/libphonenumber-js/es6/parseIncompletePhoneNumber.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.8 → libphonenumber-js@1.12.9}/node_modules/libphonenumber-js/es6/parsePhoneNumber.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.8 → libphonenumber-js@1.12.9}/node_modules/libphonenumber-js/es6/parsePhoneNumberWithError_.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.8 → libphonenumber-js@1.12.9}/node_modules/libphonenumber-js/es6/parsePhoneNumber_.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.8 → libphonenumber-js@1.12.9}/node_modules/libphonenumber-js/es6/tools/semver-compare.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.8 → libphonenumber-js@1.12.9}/node_modules/libphonenumber-js/min/exports/parsePhoneNumber.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.8 → libphonenumber-js@1.12.9}/node_modules/libphonenumber-js/min/exports/withMetadataArgument.js +0 -0
- /package/dist/node_modules/.pnpm/{loupe@3.1.3 → loupe@3.1.4}/node_modules/loupe/lib/arguments.js +0 -0
- /package/dist/node_modules/.pnpm/{loupe@3.1.3 → loupe@3.1.4}/node_modules/loupe/lib/array.js +0 -0
- /package/dist/node_modules/.pnpm/{loupe@3.1.3 → loupe@3.1.4}/node_modules/loupe/lib/bigint.js +0 -0
- /package/dist/node_modules/.pnpm/{loupe@3.1.3 → loupe@3.1.4}/node_modules/loupe/lib/class.js +0 -0
- /package/dist/node_modules/.pnpm/{loupe@3.1.3 → loupe@3.1.4}/node_modules/loupe/lib/date.js +0 -0
- /package/dist/node_modules/.pnpm/{loupe@3.1.3 → loupe@3.1.4}/node_modules/loupe/lib/error.js +0 -0
- /package/dist/node_modules/.pnpm/{loupe@3.1.3 → loupe@3.1.4}/node_modules/loupe/lib/function.js +0 -0
- /package/dist/node_modules/.pnpm/{loupe@3.1.3 → loupe@3.1.4}/node_modules/loupe/lib/helpers.js +0 -0
- /package/dist/node_modules/.pnpm/{loupe@3.1.3 → loupe@3.1.4}/node_modules/loupe/lib/map.js +0 -0
- /package/dist/node_modules/.pnpm/{loupe@3.1.3 → loupe@3.1.4}/node_modules/loupe/lib/number.js +0 -0
- /package/dist/node_modules/.pnpm/{loupe@3.1.3 → loupe@3.1.4}/node_modules/loupe/lib/object.js +0 -0
- /package/dist/node_modules/.pnpm/{loupe@3.1.3 → loupe@3.1.4}/node_modules/loupe/lib/promise.js +0 -0
- /package/dist/node_modules/.pnpm/{loupe@3.1.3 → loupe@3.1.4}/node_modules/loupe/lib/regexp.js +0 -0
- /package/dist/node_modules/.pnpm/{loupe@3.1.3 → loupe@3.1.4}/node_modules/loupe/lib/set.js +0 -0
- /package/dist/node_modules/.pnpm/{loupe@3.1.3 → loupe@3.1.4}/node_modules/loupe/lib/string.js +0 -0
- /package/dist/node_modules/.pnpm/{loupe@3.1.3 → loupe@3.1.4}/node_modules/loupe/lib/symbol.js +0 -0
- /package/dist/node_modules/.pnpm/{loupe@3.1.3 → loupe@3.1.4}/node_modules/loupe/lib/typedarray.js +0 -0
- /package/dist/node_modules/.pnpm/{vitest@3.2.0_@types_debug@4.1.12_@types_node@22.15.29_@vitest_browser@3.2.0_@vitest_ui@_380928fb48d45118a64498d466bac5bf → vitest@3.2.4_@types_debug@4.1.12_@types_node@24.0.7_@vitest_browser@3.2.4_@vitest_ui@3._93f645c93c51b497c065da8f21fff0a5}/node_modules/vitest/dist/chunks/_commonjsHelpers.BFTU3MAI.js +0 -0
- /package/dist/node_modules/.pnpm/{vitest@3.2.0_@types_debug@4.1.12_@types_node@22.15.29_@vitest_browser@3.2.0_@vitest_ui@_380928fb48d45118a64498d466bac5bf → vitest@3.2.4_@types_debug@4.1.12_@types_node@24.0.7_@vitest_browser@3.2.4_@vitest_ui@3._93f645c93c51b497c065da8f21fff0a5}/node_modules/vitest/dist/chunks/date.Bq6ZW5rf.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{page as n}from"../node_modules/.pnpm/@vitest_browser@3.2.
|
|
1
|
+
import{page as n}from"../node_modules/.pnpm/@vitest_browser@3.2.4_msw@2.7.3_@types_node@24.0.7_typescript@5.8.3__playwright@1.53.1__894c207534f0ba223b8299d9f5ff1049/node_modules/@vitest/browser/context.js";import a from"../_virtual/axe.js";import{a as o}from"../node_modules/.pnpm/vitest@3.2.4_@types_debug@4.1.12_@types_node@24.0.7_@vitest_browser@3.2.4_@vitest_ui@3._93f645c93c51b497c065da8f21fff0a5/node_modules/vitest/dist/chunks/vi.bdSIJ99Y.js";const p="Supercalifragilisticexpialidocious".repeat(10);async function u(e){return(await a.run(e)).violations}async function x(e){const t=await u(e);o(t,`Expected no axe core violations, but got ${t.length}`).toHaveLength(0)}function h(){return n.viewport(320,256)}function g(e){let t;if(e.scrollWidth!==0?t=e:e.shadowRoot?t=e.shadowRoot.firstElementChild:t=e.firstElementChild,t){const r=t.scrollWidth>t.clientWidth;return o(r).toBe(!1)}return o(!0).toBe(!1)}function w(e,t,r){var l;let i=e.querySelector(":focus-visible");if(i||(i=(l=e.shadowRoot)==null?void 0:l.querySelector(":focus-visible")),i){const s=getComputedStyle(i).getPropertyValue(t);return o(s).toContain(r)}return o(!0).toBe(!1)}export{w as expectComponentFocusStyle,g as expectComponentNotToHaveHorizontalScrollbar,x as expectNoAxeViolations,h as resizeWindowForReflowTest,u as runAxeAndGetViolations,p as superLongStringForReflowTest};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ncino/web-components",
|
|
3
3
|
"author": "nCino",
|
|
4
|
-
"version": "4.3.0-preview.
|
|
4
|
+
"version": "4.3.0-preview.10",
|
|
5
5
|
"license": "(c) Copyright 2023 nCino, Inc., all rights reserved",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"module": "dist/index.js",
|
|
16
16
|
"engineStrict": false,
|
|
17
17
|
"private": false,
|
|
18
|
-
"packageManager": "pnpm@10.
|
|
18
|
+
"packageManager": "pnpm@10.12.3",
|
|
19
19
|
"exports": {
|
|
20
20
|
".": {
|
|
21
21
|
"import": "./dist/index.js",
|
|
@@ -54,6 +54,7 @@
|
|
|
54
54
|
"dependencies:update": "pnpm dlx npm-check-updates -u",
|
|
55
55
|
"dependencies:update:patch": "pnpm dlx npm-check-updates -u --target patch",
|
|
56
56
|
"dependencies:update:minor": "pnpm dlx npm-check-updates -u --target minor",
|
|
57
|
+
"figma-connect-single": "node scripts/figma-connect-single.js",
|
|
57
58
|
"lint": "eslint .",
|
|
58
59
|
"localize:extract": "lit-localize extract",
|
|
59
60
|
"localize:build": "lit-localize build",
|
|
@@ -70,8 +71,8 @@
|
|
|
70
71
|
"@deltablot/dropzone": "^7.3.1",
|
|
71
72
|
"@floating-ui/dom": "^1.7.1",
|
|
72
73
|
"@lit/localize": "^0.12.2",
|
|
73
|
-
"ckeditor5": "^45.1
|
|
74
|
-
"libphonenumber-js": "^1.12.
|
|
74
|
+
"ckeditor5": "^45.2.1",
|
|
75
|
+
"libphonenumber-js": "^1.12.9",
|
|
75
76
|
"lit": "^3.3.0"
|
|
76
77
|
},
|
|
77
78
|
"devDependencies": {
|
|
@@ -95,40 +96,40 @@
|
|
|
95
96
|
"@storybook/test": "^8.6.14",
|
|
96
97
|
"@storybook/web-components": "^8.6.14",
|
|
97
98
|
"@storybook/web-components-vite": "^8.6.14",
|
|
98
|
-
"@types/react": "^19.1.
|
|
99
|
-
"@typescript-eslint/parser": "^8.
|
|
100
|
-
"@vitest/browser": "^3.2.
|
|
101
|
-
"@vitest/coverage-v8": "^3.2.
|
|
102
|
-
"@vitest/ui": "3.2.
|
|
99
|
+
"@types/react": "^19.1.8",
|
|
100
|
+
"@typescript-eslint/parser": "^8.35.0",
|
|
101
|
+
"@vitest/browser": "^3.2.4",
|
|
102
|
+
"@vitest/coverage-v8": "^3.2.4",
|
|
103
|
+
"@vitest/ui": "3.2.4",
|
|
103
104
|
"axe-core": "^4.10.3",
|
|
104
105
|
"cem-plugin-expanded-types": "^1.4.0",
|
|
105
|
-
"chromatic": "^12.
|
|
106
|
+
"chromatic": "^12.2.0",
|
|
106
107
|
"conventional-changelog-conventionalcommits": "^9.0.0",
|
|
107
108
|
"custom-element-jet-brains-integration": "^1.7.0",
|
|
108
109
|
"custom-elements-manifest": "^2.1.0",
|
|
109
|
-
"eslint": "^9.
|
|
110
|
+
"eslint": "^9.30.0",
|
|
110
111
|
"eslint-config-standard": "^17.1.0",
|
|
111
|
-
"eslint-plugin-import": "^2.
|
|
112
|
+
"eslint-plugin-import": "^2.32.0",
|
|
112
113
|
"eslint-plugin-json": "^4.0.1",
|
|
113
|
-
"eslint-plugin-n": "^17.
|
|
114
|
+
"eslint-plugin-n": "^17.20.0",
|
|
114
115
|
"eslint-plugin-promise": "^7.2.1",
|
|
115
116
|
"eslint-plugin-storybook": "^0.12.0",
|
|
116
117
|
"eslint-plugin-yml": "1.18.0",
|
|
117
|
-
"glob": "^11.0.
|
|
118
|
+
"glob": "^11.0.3",
|
|
118
119
|
"jsdom": "26.1.0",
|
|
119
|
-
"playwright": "1.
|
|
120
|
-
"postcss": "^8.5.
|
|
120
|
+
"playwright": "1.53.1",
|
|
121
|
+
"postcss": "^8.5.6",
|
|
121
122
|
"rimraf": "^6.0.1",
|
|
122
|
-
"sass": "1.89.
|
|
123
|
+
"sass": "1.89.2",
|
|
123
124
|
"storybook": "^8.6.14",
|
|
124
125
|
"storybook-addon-code-editor": "^4.1.2",
|
|
125
126
|
"storybook-dark-mode": "^4.0.2",
|
|
126
|
-
"storybook-design-token": "^3.
|
|
127
|
+
"storybook-design-token": "^3.3.0",
|
|
127
128
|
"typescript": "^5.8.3",
|
|
128
129
|
"vite": "6.3.5",
|
|
129
130
|
"vite-plugin-dts": "4.5.4",
|
|
130
|
-
"vite-plugin-static-copy": "^3.0.
|
|
131
|
-
"vitest": "^3.2.
|
|
131
|
+
"vite-plugin-static-copy": "^3.0.2",
|
|
132
|
+
"vitest": "^3.2.4",
|
|
132
133
|
"wc-storybook-helpers": "2.0.4",
|
|
133
134
|
"yaml-eslint-parser": "^1.3.0"
|
|
134
135
|
},
|
package/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"name": "@ncino/web-components",
|
|
4
|
-
"version": "4.
|
|
4
|
+
"version": "4.3.0-preview.9",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -695,6 +695,10 @@
|
|
|
695
695
|
"description": "\n---\n\n\n### **Methods:**\n - **removeAttributesFromHost(name: _string_, oldValue: _string_, newValue: _string_)** - Removes an attribute from the host element and stores its original value in the map.\nAlso updates the corresponding `dataset` property for the attribute.\n- **restoreAttributesToHost()** - Restores all previously removed attributes to the host element.\nClears the map of removed attributes after restoration.\n\n### **Slots:**\n - _default_ - The content within the banner",
|
|
696
696
|
"doc-url": "",
|
|
697
697
|
"attributes": [
|
|
698
|
+
{
|
|
699
|
+
"name": "skeleton",
|
|
700
|
+
"value": { "type": "boolean", "default": "false" }
|
|
701
|
+
},
|
|
698
702
|
{
|
|
699
703
|
"name": "variant",
|
|
700
704
|
"value": {
|
|
@@ -713,6 +717,7 @@
|
|
|
713
717
|
"events": [],
|
|
714
718
|
"js": {
|
|
715
719
|
"properties": [
|
|
720
|
+
{ "name": "skeleton", "type": "boolean" },
|
|
716
721
|
{ "name": "contentRef", "type": "Ref<HTMLDivElement>" },
|
|
717
722
|
{ "name": "hasActions", "type": "boolean" },
|
|
718
723
|
{ "name": "variantClass" },
|
|
@@ -1750,6 +1755,10 @@
|
|
|
1750
1755
|
"name": "indeterminate",
|
|
1751
1756
|
"value": { "type": "boolean", "default": "false" }
|
|
1752
1757
|
},
|
|
1758
|
+
{
|
|
1759
|
+
"name": "hide-label",
|
|
1760
|
+
"value": { "type": "boolean", "default": "false" }
|
|
1761
|
+
},
|
|
1753
1762
|
{
|
|
1754
1763
|
"name": "disabled",
|
|
1755
1764
|
"value": { "type": "boolean", "default": "false" }
|
|
@@ -1771,6 +1780,7 @@
|
|
|
1771
1780
|
{ "name": "value", "type": "string" },
|
|
1772
1781
|
{ "name": "selected", "type": "boolean" },
|
|
1773
1782
|
{ "name": "indeterminate", "type": "boolean" },
|
|
1783
|
+
{ "name": "hideLabel", "type": "boolean" },
|
|
1774
1784
|
{ "name": "disabled", "type": "boolean" },
|
|
1775
1785
|
{ "name": "hasError", "type": "boolean" },
|
|
1776
1786
|
{ "name": "inputRef", "type": "Ref<HTMLInputElement>" },
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
var w=Object.defineProperty;var M=(e,t,s)=>t in e?w(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var b=(e,t,s)=>M(e,typeof t!="symbol"?t+"":t,s);import{Plugin as T}from"../../../../../@ckeditor_ckeditor5-core@45.1.0/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{ClipboardPipeline as P}from"../../../../../@ckeditor_ckeditor5-clipboard@45.1.0/node_modules/@ckeditor/ckeditor5-clipboard/dist/index.js";import{UpcastWriter as y,ViewDocument as L,DomConverter as E,Matcher as x}from"../../../../../@ckeditor_ckeditor5-engine@45.1.0/node_modules/@ckeditor/ckeditor5-engine/dist/index.js";/**
|
|
2
|
-
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
-
*//**
|
|
5
|
-
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
6
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
7
|
-
*/function R(e,t){const s=[];for(const n of t.createRangeIn(e)){const i=n.item;i.is("element","a")&&!i.hasAttribute("href")&&(i.hasAttribute("id")||i.hasAttribute("name"))&&s.push(i)}for(const n of s){const i=n.parent.getChildIndex(n)+1,l=n.getChildren();t.insertChild(i,l,n.parent)}}/**
|
|
8
|
-
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
9
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
10
|
-
*/function W(e){const t=parseFloat(e);return e.endsWith("pt")?h(t*96/72):e.endsWith("pc")?h(t*12*96/72):e.endsWith("in")?h(t*96):e.endsWith("cm")?h(t*96/2.54):e.endsWith("mm")?h(t/10*96/2.54):e}function v(e){return e!==void 0&&e.endsWith("px")}function h(e){return e.toFixed(2).replace(/\.?0+$/,"")+"px"}function k(e,t,s){if(!e.childCount)return;const n=new y(e.document),i=N(e,n);if(!i.length)return;const l={},r=[];for(const o of i)if(o.indent!==void 0){B(o)||(r.length=0);const a=`${o.id}:${o.indent}`,c=Math.min(o.indent-1,r.length);if(c<r.length&&r[c].id!==o.id&&(r.length=c),c<r.length-1)r.length=c+1;else{const m=$(o,t);if(c>r.length-1||r[c].listElement.name!=m.type){c==0&&m.type=="ol"&&o.id!==void 0&&l[a]&&(m.startIndex=l[a]);const d=F(m,n,s);if(v(o.marginLeft)&&(c==0||v(r[c-1].marginLeft))){let u=o.marginLeft;c>0&&(u=h(parseFloat(u)-parseFloat(r[c-1].marginLeft))),n.setStyle("padding-left",u,d)}if(r.length==0){const u=o.element.parent,g=u.getChildIndex(o.element)+1;n.insertChild(g,d,u)}else{const u=r[c-1].listItemElements;n.appendChild(d,u[u.length-1])}r[c]={...o,listElement:d,listItemElements:[]},c==0&&o.id!==void 0&&(l[a]=m.startIndex||1)}}const f=o.element.name=="li"?o.element:n.createElement("li");n.appendChild(f,r[c].listElement),r[c].listItemElements.push(f),c==0&&o.id!==void 0&&l[a]++,o.element!=f&&n.appendChild(o.element,f),H(o.element,n),n.removeStyle("text-indent",o.element),n.removeStyle("margin-left",o.element)}else{const a=r.find(c=>c.marginLeft==o.marginLeft);if(a){const c=a.listItemElements;n.appendChild(o.element,c[c.length-1]),n.removeStyle("margin-left",o.element)}else r.length=0}}function D(e,t){for(const s of t.createRangeIn(e)){const n=s.item;if(n.is("element","li")){const i=n.getChild(0);i&&i.is("element","p")&&t.unwrapElement(i)}}}function N(e,t){const s=t.createRangeIn(e),n=[],i=new Set;for(const l of s.getItems()){if(!l.is("element")||!l.name.match(/^(p|h\d+|li|div)$/))continue;let r=V(l);if(r!==void 0&&parseFloat(r)==0&&!Array.from(l.getClassNames()).find(o=>o.startsWith("MsoList"))&&(r=void 0),l.hasStyle("mso-list")||r!==void 0&&i.has(r)){const o=_(l);n.push({element:l,id:o.id,order:o.order,indent:o.indent,marginLeft:r}),r!==void 0&&i.add(r)}else i.clear()}return n}function B(e){const t=e.element.previousSibling;return S(t||e.element.parent)}function S(e){return e.is("element","ol")||e.is("element","ul")}function $(e,t){const s=new RegExp(`@list l${e.id}:level${e.indent}\\s*({[^}]*)`,"gi"),n=/mso-level-number-format:([^;]{0,100});/gi,i=/mso-level-start-at:\s{0,100}([0-9]{0,10})\s{0,100};/gi,l=new RegExp(`@list\\s+l${e.id}:level\\d\\s*{[^{]*mso-level-text:"%\\d\\\\.`,"gi"),r=new RegExp(`@list l${e.id}:level\\d\\s*{[^{]*mso-level-number-format:`,"gi"),o=l.exec(t),a=r.exec(t),c=o&&!a,f=s.exec(t);let m="decimal",d="ol",u=null;if(f&&f[1]){const g=n.exec(f[1]);if(g&&g[1]&&(m=g[1].trim(),d=m!=="bullet"&&m!=="image"?"ol":"ul"),m==="bullet"){const p=O(e.element);p&&(m=p)}else{const p=i.exec(f[1]);p&&p[1]&&(u=parseInt(p[1]))}c&&(d="ol")}return{type:d,startIndex:u,style:j(m),isLegalStyleList:c}}function O(e){if(e.name=="li"&&e.parent.name=="ul"&&e.parent.hasAttribute("type"))return e.parent.getAttribute("type");const t=z(e);if(!t)return null;const s=t._data;return s==="o"?"circle":s==="·"?"disc":s==="§"?"square":null}function z(e){if(e.getChild(0).is("$text"))return null;for(const t of e.getChildren()){if(!t.is("element","span"))continue;const s=t.getChild(0);if(s)return s.is("$text")?s:s.getChild(0)}/* istanbul ignore next -- @preserve */return null}function j(e){if(e.startsWith("arabic-leading-zero"))return"decimal-leading-zero";switch(e){case"alpha-upper":return"upper-alpha";case"alpha-lower":return"lower-alpha";case"roman-upper":return"upper-roman";case"roman-lower":return"lower-roman";case"circle":case"disc":case"square":return e;default:return null}}function F(e,t,s){const n=t.createElement(e.type);return e.style&&t.setStyle("list-style-type",e.style,n),e.startIndex&&e.startIndex>1&&t.setAttribute("start",e.startIndex,n),e.isLegalStyleList&&s&&t.addClass("legal-list",n),n}function _(e){const t=e.getStyle("mso-list");if(t===void 0)return{};const s=t.match(/(^|\s{1,100})l(\d+)/i),n=t.match(/\s{0,100}lfo(\d+)/i),i=t.match(/\s{0,100}level(\d+)/i);return s&&n&&i?{id:s[2],order:n[1],indent:parseInt(i[1])}:{indent:1}}function H(e,t){const s=new x({name:"span",styles:{"mso-list":"Ignore"}}),n=t.createRangeIn(e);for(const i of n)i.type==="elementStart"&&s.match(i.item)&&t.remove(i.item)}function V(e){const t=e.getStyle("margin-left");return t===void 0||t.endsWith("px")?t:W(t)}function q(e,t){if(!e.childCount)return;const s=new y(e.document),n=U(e,s);X(n,e,s),K(n,e,s),J(e,s);const i=Q(e,s);i.length&&Z(i,Y(t),s)}function G(e){return btoa(e.match(/\w{2}/g).map(t=>String.fromCharCode(parseInt(t,16))).join(""))}function U(e,t){const s=t.createRangeIn(e),n=new x({name:/v:(.+)/}),i=[];for(const l of s){if(l.type!="elementStart")continue;const r=l.item,o=r.previousSibling,a=o&&o.is("element")?o.name:null,c=["Chart"],f=n.match(r),m=r.getAttribute("o:gfxdata"),d=a==="v:shapetype",u=m&&c.some(g=>r.getAttribute("id").includes(g));f&&m&&!d&&!u&&i.push(l.item.getAttribute("id"))}return i}function X(e,t,s){const n=s.createRangeIn(t),i=new x({name:"img"}),l=[];for(const r of n)if(r.item.is("element")&&i.match(r.item)){const o=r.item,a=o.getAttribute("v:shapes")?o.getAttribute("v:shapes").split(" "):[];a.length&&a.every(c=>e.indexOf(c)>-1)?l.push(o):o.getAttribute("src")||l.push(o)}for(const r of l)s.remove(r)}function J(e,t){const s=t.createRangeIn(e),n=new x({name:/v:(.+)/}),i=[];for(const l of s)l.type=="elementStart"&&n.match(l.item)&&i.push(l.item);for(const l of i)t.remove(l)}function K(e,t,s){const n=s.createRangeIn(t),i=[];for(const o of n)if(o.type=="elementStart"&&o.item.is("element","v:shape")){const a=o.item.getAttribute("id");if(e.includes(a))continue;l(o.item.parent.getChildren(),a)||i.push(o.item)}for(const o of i){const a={src:r(o)};o.hasAttribute("alt")&&(a.alt=o.getAttribute("alt"));const c=s.createElement("img",a);s.insertChild(o.index+1,c,o.parent)}function l(o,a){for(const c of o){/* istanbul ignore else -- @preserve */if(c.is("element")&&(c.name=="img"&&c.getAttribute("v:shapes")==a||l(c.getChildren(),a)))return!0}return!1}function r(o){for(const a of o.getChildren()){/* istanbul ignore else -- @preserve */if(a.is("element")&&a.getAttribute("src"))return a.getAttribute("src")}}}function Q(e,t){const s=t.createRangeIn(e),n=new x({name:"img"}),i=[];let l=0;for(const r of s)r.item.is("element")&&n.match(r.item)&&(r.item.getAttribute("src").startsWith("file://")&&i.push({element:r.item,imageIndex:l}),l++);return i}function Y(e){if(!e)return[];const t=/{\\pict[\s\S]+?\\bliptag-?\d+(\\blipupi-?\d+)?({\\\*\\blipuid\s?[\da-fA-F]+)?[\s}]*?/,s=new RegExp("(?:("+t.source+"))([\\da-fA-F\\s]+)\\}","g"),n=e.match(s),i=[];if(n)for(const l of n){let r=!1;l.includes("\\pngblip")?r="image/png":l.includes("\\jpegblip")&&(r="image/jpeg"),r&&i.push({hex:l.replace(t,"").replace(/[^\da-fA-F]/g,""),type:r})}return i}function Z(e,t,s){for(let n=0;n<e.length;n++){const{element:i,imageIndex:l}=e[n],r=t[l];if(r){const o=`data:${r.type};base64,${G(r.hex)}`;s.setAttribute("src",o,i)}}}function ee(e){const t=[],s=new y(e.document);for(const{item:n}of s.createRangeIn(e))if(n.is("element")){for(const i of n.getClassNames())/\bmso/gi.exec(i)&&s.removeClass(i,n);for(const i of n.getStyleNames())/\bmso/gi.exec(i)&&s.removeStyle(i,n);(n.is("element","w:sdt")||n.is("element","w:sdtpr")&&n.isEmpty||n.is("element","o:p")&&n.isEmpty)&&t.push(n)}for(const n of t){const i=n.parent,l=i.getChildIndex(n);s.insertChild(l,n.getChildren(),i),s.remove(n)}}const te=/<meta\s*name="?generator"?\s*content="?microsoft\s*word\s*\d+"?\/?>/i,ne=/xmlns:o="urn:schemas-microsoft-com/i;class se{constructor(t,s=!1){b(this,"document");b(this,"hasMultiLevelListPlugin");this.document=t,this.hasMultiLevelListPlugin=s}isActive(t){return te.test(t)||ne.test(t)}execute(t){const s=new y(this.document),{body:n,stylesString:i}=t._parsedData;R(n,s),k(n,i,this.hasMultiLevelListPlugin),q(n,t.dataTransfer.getData("text/rtf")),ee(n),t.content=n}}/**
|
|
11
|
-
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
12
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
13
|
-
*/function ie(e,t){for(const s of e.getChildren())if(s.is("element","b")&&s.getStyle("font-weight")==="normal"){const n=e.getChildIndex(s);t.remove(s),t.insertChild(n,s.getChildren(),e)}}function oe(e,t){const s=new L(t.document.stylesProcessor),n=new E(s,{renderingMode:"data"}),i=n.blockElements,l=n.inlineObjectElements,r=[];for(const o of t.createRangeIn(e)){const a=o.item;if(a.is("element","br")){const c=I(a,"forward",t,{blockElements:i,inlineObjectElements:l}),f=I(a,"backward",t,{blockElements:i,inlineObjectElements:l}),m=C(c,i);(C(f,i)||m)&&r.push(a)}}for(const o of r)o.hasClass("Apple-interchange-newline")?t.remove(o):t.replace(o,t.createElement("p"))}function I(e,t,s,{blockElements:n,inlineObjectElements:i}){let l=s.createPositionAt(e,t=="forward"?"after":"before");return l=l.getLastMatchingPosition(({item:r})=>r.is("element")&&!n.includes(r.name)&&!i.includes(r.name),{direction:t}),t=="forward"?l.nodeAfter:l.nodeBefore}function C(e,t){return!!e&&e.is("element")&&t.includes(e.name)}const re=/id=("|')docs-internal-guid-[-0-9a-f]+("|')/i;class le{constructor(t){b(this,"document");this.document=t}isActive(t){return re.test(t)}execute(t){const s=new y(this.document),{body:n}=t._parsedData;ie(n,s),D(n,s),oe(n,s),t.content=n}}/**
|
|
14
|
-
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
15
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
16
|
-
*/function ce(e,t){for(const s of e.getChildren())s.is("element","table")&&s.hasAttribute("xmlns")&&t.removeAttribute("xmlns",s)}/**
|
|
17
|
-
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
18
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
19
|
-
*/function ae(e,t){for(const s of e.getChildren())if(s.is("element","google-sheets-html-origin")){const n=e.getChildIndex(s);t.remove(s),t.insertChild(n,s.getChildren(),e)}}/**
|
|
20
|
-
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
21
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
22
|
-
*/function me(e,t){for(const s of e.getChildren())s.is("element","table")&&s.getStyle("width")==="0px"&&t.removeStyle("width",s)}/**
|
|
23
|
-
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
24
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
25
|
-
*/function fe(e,t){for(const s of Array.from(e.getChildren()))s.is("element","style")&&t.remove(s)}const ue=/<google-sheets-html-origin/i;class de{constructor(t){b(this,"document");this.document=t}isActive(t){return ue.test(t)}execute(t){const s=new y(this.document),{body:n}=t._parsedData;ae(n,s),ce(n,s),me(n,s),fe(n,s),t.content=n}}/**
|
|
26
|
-
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
27
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
28
|
-
*/function ge(e){return A(A(e)).replace(/(<span\s+style=['"]mso-spacerun:yes['"]>[^\S\r\n]*?)[\r\n]+([^\S\r\n]*<\/span>)/g,"$1$2").replace(/<span\s+style=['"]mso-spacerun:yes['"]><\/span>/g,"").replace(/(<span\s+style=['"]letter-spacing:[^'"]+?['"]>)[\r\n]+(<\/span>)/g,"$1 $2").replace(/ <\//g," </").replace(/ <o:p><\/o:p>/g," <o:p></o:p>").replace(/<o:p>( |\u00A0)<\/o:p>/g,"").replace(/>([^\S\r\n]*[\r\n]\s*)</g,"><")}function pe(e){e.querySelectorAll("span[style*=spacerun]").forEach(t=>{const s=t,n=s.innerText.length||0;s.innerText=Array(n+1).join(" ").substr(0,n)})}function A(e){return e.replace(/<span(?: class="Apple-converted-space"|)>(\s+)<\/span>/g,(t,s)=>s.length===1?" ":Array(s.length+1).join(" ").substr(0,s.length))}function he(e,t){const s=new DOMParser;e=e.replace(/<!--\[if gte vml 1]>/g,""),e=e.replace(/<o:SmartTagType(?:\s+[^\s>=]+(?:="[^"]*")?)*\s*\/?>/gi,"");const n=ge(xe(e)),i=s.parseFromString(n,"text/html");pe(i);const l=i.body.innerHTML,r=ye(i,t),o=be(i);return{body:r,bodyString:l,styles:o.styles,stylesString:o.stylesString}}function ye(e,t){const s=new L(t),n=new E(s,{renderingMode:"data"}),i=e.createDocumentFragment(),l=e.body.childNodes;for(;l.length>0;)i.appendChild(l[0]);return n.domToView(i,{skipComments:!0})}function be(e){const t=[],s=[],n=Array.from(e.getElementsByTagName("style"));for(const i of n)i.sheet&&i.sheet.cssRules&&i.sheet.cssRules.length&&(t.push(i.sheet),s.push(i.innerHTML));return{styles:t,stylesString:s.join(" ")}}function xe(e){const t="</body>",s="</html>",n=e.indexOf(t);if(n<0)return e;const i=e.indexOf(s,n+t.length);return e.substring(0,n+t.length)+(i>=0?e.substring(i):"")}class Ae extends T{static get pluginName(){return"PasteFromOffice"}static get isOfficialPlugin(){return!0}static get requires(){return[P]}init(){const t=this.editor,s=t.plugins.get("ClipboardPipeline"),n=t.editing.view.document,i=[],l=this.editor.plugins.has("MultiLevelList");i.push(new se(n,l)),i.push(new le(n)),i.push(new de(n)),s.on("inputTransformation",(r,o)=>{if(o._isTransformedWithPasteFromOffice||t.model.document.selection.getFirstPosition().parent.is("element","codeBlock"))return;const c=o.dataTransfer.getData("text/html"),f=i.find(m=>m.isActive(c));f&&(o._parsedData||(o._parsedData=he(c,n.stylesProcessor)),f.execute(o),o._isTransformedWithPasteFromOffice=!0)},{priority:"high"})}}export{se as MSWordNormalizer,Ae as PasteFromOffice,he as parseHtml};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
var E=Object.defineProperty;var b=(s,a,e)=>a in s?E(s,a,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[a]=e;var l=(s,a,e)=>b(s,typeof a!="symbol"?a+"":a,e);import{Plugin as V,PendingActions as h}from"../../../../../@ckeditor_ckeditor5-core@45.1.0/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{IconSource as _}from"../../../../../@ckeditor_ckeditor5-icons@45.1.0/node_modules/@ckeditor/ckeditor5-icons/dist/index.js";import{ButtonView as w,MenuBarMenuListItemButtonView as R}from"../../../../../@ckeditor_ckeditor5-ui@45.1.0/node_modules/@ckeditor/ckeditor5-ui/dist/index.js";import{ElementReplacer as S,CKEditorError as y,createElement as f}from"../../../../../@ckeditor_ckeditor5-utils@45.1.0/node_modules/@ckeditor/ckeditor5-utils/dist/index.js";/**
|
|
2
|
-
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
-
*//**
|
|
5
|
-
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
6
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
7
|
-
*/function v(s){const a=[{name:"address",isVoid:!1},{name:"article",isVoid:!1},{name:"aside",isVoid:!1},{name:"blockquote",isVoid:!1},{name:"details",isVoid:!1},{name:"dialog",isVoid:!1},{name:"dd",isVoid:!1},{name:"div",isVoid:!1},{name:"dl",isVoid:!1},{name:"dt",isVoid:!1},{name:"fieldset",isVoid:!1},{name:"figcaption",isVoid:!1},{name:"figure",isVoid:!1},{name:"footer",isVoid:!1},{name:"form",isVoid:!1},{name:"h1",isVoid:!1},{name:"h2",isVoid:!1},{name:"h3",isVoid:!1},{name:"h4",isVoid:!1},{name:"h5",isVoid:!1},{name:"h6",isVoid:!1},{name:"header",isVoid:!1},{name:"hgroup",isVoid:!1},{name:"hr",isVoid:!0},{name:"li",isVoid:!1},{name:"main",isVoid:!1},{name:"nav",isVoid:!1},{name:"ol",isVoid:!1},{name:"p",isVoid:!1},{name:"section",isVoid:!1},{name:"table",isVoid:!1},{name:"tbody",isVoid:!1},{name:"td",isVoid:!1},{name:"th",isVoid:!1},{name:"thead",isVoid:!1},{name:"tr",isVoid:!1},{name:"ul",isVoid:!1}],e=a.map(o=>o.name).join("|"),t=s.replace(new RegExp(`</?(${e})( .*?)?>`,"g"),`
|
|
8
|
-
$&
|
|
9
|
-
`).replace(/<br[^>]*>/g,`$&
|
|
10
|
-
`).split(`
|
|
11
|
-
`);let i=0,n=!1;return t.filter(o=>o.length).map(o=>(n=M(o,n),D(o,a)?m(o,i++):C(o,a)?m(o,--i):n==="middle"||n==="last"?o:m(o,i))).join(`
|
|
12
|
-
`)}function D(s,a){return a.some(e=>!(e.isVoid||!new RegExp(`<${e.name}( .*?)?>`).test(s)))}function C(s,a){return a.some(e=>new RegExp(`</${e.name}>`).test(s))}function m(s,a,e=" "){return`${e.repeat(Math.max(0,a))}${s}`}function M(s,a){return new RegExp("<pre( .*?)?>").test(s)?"first":new RegExp("</pre>").test(s)?"last":a==="first"||a==="middle"?"middle":!1}const c="SourceEditingMode";class B extends V{constructor(e){super(e);l(this,"_elementReplacer");l(this,"_replacedRoots");l(this,"_dataFromRoots");this.set("isSourceEditingMode",!1),this._elementReplacer=new S,this._replacedRoots=new Map,this._dataFromRoots=new Map,e.config.define("sourceEditing.allowCollaborationFeatures",!1)}static get pluginName(){return"SourceEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[h]}init(){this._checkCompatibility();const e=this.editor,t=e.locale.t;e.ui.componentFactory.add("sourceEditing",()=>{const i=this._createButton(w);return i.set({label:t("Source"),icon:_,tooltip:!0,class:"ck-source-editing-button"}),i}),e.ui.componentFactory.add("menuBar:sourceEditing",()=>{const i=this._createButton(R);return i.set({label:t("Show source"),role:"menuitemcheckbox"}),i}),this._isAllowedToHandleSourceEditingMode()&&(this.on("change:isSourceEditingMode",(i,n,o)=>{o?(this._hideVisibleDialog(),this._showSourceEditing(),this._disableCommands()):(this._hideSourceEditing(),this._enableCommands())}),this.on("change:isEnabled",(i,n,o)=>this._handleReadOnlyMode(!o)),this.listenTo(e,"change:isReadOnly",(i,n,o)=>this._handleReadOnlyMode(o))),e.data.on("get",()=>{this.isSourceEditingMode&&this.updateEditorData()},{priority:"high"})}updateEditorData(){const e=this.editor,t={};for(const[i,n]of this._replacedRoots){const o=this._dataFromRoots.get(i),r=n.dataset.value;o!==r&&(t[i]=r,this._dataFromRoots.set(i,r))}Object.keys(t).length&&e.data.set(t,{batchType:{isUndoable:!0},suppressErrorInCollaboration:!0})}_checkCompatibility(){const e=this.editor,t=e.config.get("sourceEditing.allowCollaborationFeatures");if(!t&&e.plugins.has("RealTimeCollaborativeEditing"))throw new y("source-editing-incompatible-with-real-time-collaboration",null);!t&&["CommentsEditing","TrackChangesEditing","RevisionHistory"].some(n=>e.plugins.has(n))&&console.warn("You initialized the editor with the source editing feature and at least one of the collaboration features. Please be advised that the source editing feature may not work, and be careful when editing document source that contains markers created by the collaboration features."),e.plugins.has("RestrictedEditingModeEditing")&&console.warn("You initialized the editor with the source editing feature and restricted editing feature. Please be advised that the source editing feature may not work, and be careful when editing document source that contains markers created by the restricted editing feature.")}_showSourceEditing(){const e=this.editor,t=e.editing.view,i=e.model;i.change(n=>{n.setSelection(null),n.removeSelectionAttribute(i.document.selection.getAttributeKeys())});for(const[n,o]of t.domRoots){const r=O(e.data.get({rootName:n})),d=f(o.ownerDocument,"textarea",{rows:"1","aria-label":"Source code editing area"}),u=f(o.ownerDocument,"div",{class:"ck-source-editing-area","data-value":r},[d]);d.value=r,d.setSelectionRange(0,0),d.addEventListener("input",()=>{u.dataset.value=d.value,e.ui.update()}),t.change(g=>{const p=t.document.getRoot(n);g.addClass("ck-hidden",p)}),e.ui.setEditableElement("sourceEditing:"+n,d),this._replacedRoots.set(n,u),this._elementReplacer.replace(o,u),this._dataFromRoots.set(n,r)}this._hideDocumentOutline(),this._refreshAnnotationsVisibility(),this._focusSourceEditing()}_hideSourceEditing(){const t=this.editor.editing.view;this.updateEditorData(),t.change(i=>{for(const[n]of this._replacedRoots)i.removeClass("ck-hidden",t.document.getRoot(n))}),this._elementReplacer.restore(),this._replacedRoots.clear(),this._dataFromRoots.clear(),this._showDocumentOutline(),this._refreshAnnotationsVisibility(),t.focus()}_hideDocumentOutline(){this.editor.plugins.has("DocumentOutlineUI")&&(this.editor.plugins.get("DocumentOutlineUI").view.element.style.display="none")}_showDocumentOutline(){this.editor.plugins.has("DocumentOutlineUI")&&(this.editor.plugins.get("DocumentOutlineUI").view.element.style.display="")}_refreshAnnotationsVisibility(){this.editor.plugins.has("Annotations")&&this.editor.plugins.get("Annotations").refreshVisibility()}_focusSourceEditing(){const e=this.editor,[t]=this._replacedRoots.values(),i=t.querySelector("textarea");e.editing.view.document.isFocused=!1,i.focus()}_disableCommands(){const e=this.editor;for(const t of e.commands.commands())t.forceDisabled(c);e.plugins.has("CommentsArchiveUI")&&e.plugins.get("CommentsArchiveUI").forceDisabled(c)}_enableCommands(){const e=this.editor;for(const t of e.commands.commands())t.clearForceDisabled(c);e.plugins.has("CommentsArchiveUI")&&e.plugins.get("CommentsArchiveUI").clearForceDisabled(c)}_handleReadOnlyMode(e){if(this.isSourceEditingMode)for(const[,t]of this._replacedRoots)t.querySelector("textarea").readOnly=e}_isAllowedToHandleSourceEditingMode(){const t=this.editor.ui.view.editable;return t&&!t.hasExternalElement}_hideVisibleDialog(){if(this.editor.plugins.has("Dialog")){const e=this.editor.plugins.get("Dialog");e.isOpen&&e.hide()}}_createButton(e){const t=this.editor,i=new e(t.locale);return i.set({withText:!0,isToggleable:!0}),i.bind("isOn").to(this,"isSourceEditingMode"),i.bind("isEnabled").to(this,"isEnabled",t,"isReadOnly",t.plugins.get(h),"hasAny",(n,o,r)=>!(!n||o||r)),this.listenTo(i,"execute",()=>{this.isSourceEditingMode=!this.isSourceEditingMode}),i}}function O(s){return x(s)?v(s):s}function x(s){return s.startsWith("<")}export{B as SourceEditing};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
var V=Object.defineProperty;var Y=(o,r,e)=>r in o?V(o,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[r]=e;var h=(o,r,e)=>Y(o,typeof r!="symbol"?r+"":r,e);import{Plugin as O,Command as $}from"../../../../../@ckeditor_ckeditor5-core@45.1.0/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{keyCodes as E,ObservableMixin as J,env as T,count as X,isInsideSurrogatePair as Z,isInsideCombinedSymbol as ee,isInsideEmojiSequence as te,EventInfo as ne}from"../../../../../@ckeditor_ckeditor5-utils@45.1.0/node_modules/@ckeditor/ckeditor5-utils/dist/index.js";import{BubblingEventInfo as F,DomEventData as R,Observer as W,MouseObserver as ie,TouchObserver as se,LiveRange as oe,FocusObserver as re}from"../../../../../@ckeditor_ckeditor5-engine@45.1.0/node_modules/@ckeditor/ckeditor5-engine/dist/index.js";import{escapeRegExp as ce}from"../../../../../es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/string/escapeRegExp.js";import{debounce as le}from"../../../../../es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/function/debounce.js";/**
|
|
2
|
-
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
-
*//**
|
|
5
|
-
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
6
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
7
|
-
*/class U{constructor(r,e=20){h(this,"model");h(this,"limit");h(this,"_isLocked");h(this,"_size");h(this,"_batch",null);h(this,"_changeCallback");h(this,"_selectionChangeCallback");this.model=r,this._size=0,this.limit=e,this._isLocked=!1,this._changeCallback=(t,n)=>{n.isLocal&&n.isUndoable&&n!==this._batch&&this._reset(!0)},this._selectionChangeCallback=()=>{this._reset()},this.model.document.on("change",this._changeCallback),this.model.document.selection.on("change:range",this._selectionChangeCallback),this.model.document.selection.on("change:attribute",this._selectionChangeCallback)}get batch(){return this._batch||(this._batch=this.model.createBatch({isTyping:!0})),this._batch}get size(){return this._size}input(r){this._size+=r,this._size>=this.limit&&this._reset(!0)}get isLocked(){return this._isLocked}lock(){this._isLocked=!0}unlock(){this._isLocked=!1}destroy(){this.model.document.off("change",this._changeCallback),this.model.document.selection.off("change:range",this._selectionChangeCallback),this.model.document.selection.off("change:attribute",this._selectionChangeCallback)}_reset(r=!1){(!this.isLocked||r)&&(this._batch=null,this._size=0)}}class ae extends ${constructor(e,t){super(e);h(this,"_buffer");this._buffer=new U(e.model,t),this._isEnabledBasedOnSelection=!1}get buffer(){return this._buffer}destroy(){super.destroy(),this._buffer.destroy()}execute(e={}){const t=this.editor.model,n=t.document,i=e.text||"",s=i.length;let l=n.selection;if(e.selection?l=e.selection:e.range&&(l=t.createSelection(e.range)),!t.canEditAt(l))return;const c=e.resultRange;t.enqueueChange(this._buffer.batch,a=>{this._buffer.lock();const u=Array.from(n.selection.getAttributes());t.deleteContent(l),i&&t.insertContent(a.createText(i,u),l),c?a.setSelection(c):l.is("documentSelection")||a.setSelection(l),this._buffer.unlock(),this._buffer.input(s)})}}const Q=["insertText","insertReplacementText"],ue=[...Q,"insertCompositionText"];class de extends W{constructor(e){super(e);h(this,"focusObserver");this.focusObserver=e.getObserver(re);const t=T.isAndroid?ue:Q,n=e.document;n.on("beforeinput",(i,s)=>{if(!this.isEnabled)return;const{data:l,targetRanges:c,inputType:a,domEvent:u,isComposing:d}=s;if(!t.includes(a))return;this.focusObserver.flush();const f=new ne(n,"insertText");n.fire(f,new R(e,u,{text:l,selection:e.createSelection(c),isComposing:d})),f.stop.called&&i.stop()}),T.isAndroid||n.on("compositionend",(i,{data:s,domEvent:l})=>{this.isEnabled&&s&&n.fire("insertText",new R(e,l,{text:s,isComposing:!0}))},{priority:"low"})}observe(){}stopObserving(){}}class fe extends O{constructor(){super(...arguments);h(this,"_typingQueue")}static get pluginName(){return"Input"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.model,n=e.editing.view,i=e.editing.mapper,s=t.document.selection;this._typingQueue=new he(e),n.addObserver(de);const l=new ae(e,e.config.get("typing.undoStep")||20);e.commands.add("insertText",l),e.commands.add("input",l),this.listenTo(n.document,"beforeinput",()=>{this._typingQueue.flush("next beforeinput")},{priority:"high"}),this.listenTo(n.document,"insertText",(c,a)=>{const{text:u,selection:d}=a;if(n.document.selection.isFake&&d&&n.document.selection.isSimilar(d)&&a.preventDefault(),!l.isEnabled){a.preventDefault();return}let f;d?f=Array.from(d.getRanges()).map(g=>i.toModelRange(g)):f=Array.from(s.getRanges());let m=u;if(T.isAndroid){const g=Array.from(f[0].getItems()).reduce((v,w)=>v+(w.is("$textProxy")?w.data:""),"");if(g&&(g.length<=m.length?m.startsWith(g)&&(m=m.substring(g.length),f[0].start=f[0].start.getShiftedBy(g.length)):g.startsWith(m)&&(f[0].start=f[0].start.getShiftedBy(m.length),m="")),m.length==0&&f[0].isCollapsed)return}const p={text:m,selection:t.createSelection(f)};this._typingQueue.push(p,!!a.isComposing),a.domEvent.defaultPrevented&&this._typingQueue.flush("beforeinput default prevented")}),T.isAndroid?this.listenTo(n.document,"keydown",(c,a)=>{s.isCollapsed||a.keyCode!=229||!n.document.isComposing||I(t,l)}):this.listenTo(n.document,"compositionstart",()=>{s.isCollapsed||I(t,l)},{priority:"high"}),this.listenTo(n.document,"mutations",(c,{mutations:a})=>{if(this._typingQueue.hasAffectedElements())for(const{node:u}of a){const d=ge(u,i),f=i.toModelElement(d);if(this._typingQueue.isElementAffected(f)){this._typingQueue.flush("mutations");return}}}),this.listenTo(n.document,"compositionend",()=>{this._typingQueue.flush("before composition end")},{priority:"high"}),this.listenTo(n.document,"compositionend",()=>{this._typingQueue.flush("after composition end");const c=[];if(this._typingQueue.hasAffectedElements())for(const a of this._typingQueue.flushAffectedElements()){const u=i.toViewElement(a);u&&c.push({type:"children",node:u})}(c.length||!T.isAndroid)&&n.document.fire("mutations",{mutations:c})},{priority:"lowest"})}destroy(){super.destroy(),this._typingQueue.destroy()}}class he{constructor(r){h(this,"editor");h(this,"flushDebounced",le(()=>this.flush("timeout"),50));h(this,"_queue",[]);h(this,"_isComposing",!1);h(this,"_affectedElements",new Set);this.editor=r}destroy(){for(this.flushDebounced.cancel(),this._affectedElements.clear();this._queue.length;)this.shift()}get length(){return this._queue.length}push(r,e){const t={text:r.text};if(r.selection){t.selectionRanges=[];for(const n of r.selection.getRanges())t.selectionRanges.push(oe.fromRange(n)),this._affectedElements.add(n.start.parent)}this._queue.push(t),this._isComposing||(this._isComposing=e),this.flushDebounced()}shift(){const r=this._queue.shift(),e={text:r.text};if(r.selectionRanges){const t=r.selectionRanges.map(n=>me(n)).filter(n=>!!n);t.length&&(e.selection=this.editor.model.createSelection(t))}return e}flush(r){const e=this.editor,t=e.model,n=e.editing.view;if(this.flushDebounced.cancel(),!this._queue.length)return;const s=e.commands.get("insertText").buffer;t.enqueueChange(s.batch,()=>{for(s.lock();this._queue.length;){const l=this.shift();e.execute("insertText",l)}s.unlock(),this._isComposing||this._affectedElements.clear(),this._isComposing=!1}),n.scrollToTheSelection()}isElementAffected(r){return this._affectedElements.has(r)}hasAffectedElements(){return this._affectedElements.size>0}flushAffectedElements(){const r=Array.from(this._affectedElements);return this._affectedElements.clear(),r}}function I(o,r){if(!r.isEnabled)return;const e=r.buffer;e.lock(),o.enqueueChange(e.batch,()=>{o.deleteContent(o.document.selection)}),e.unlock()}function me(o){const r=o.toRange();return o.detach(),r.root.rootName=="$graveyard"?null:r}function ge(o,r){let e=o.is("$text")?o.parent:o;for(;!r.toModelElement(e);)e=e.parent;return e}class L extends ${constructor(e,t){super(e);h(this,"direction");h(this,"_buffer");this.direction=t,this._buffer=new U(e.model,e.config.get("typing.undoStep")),this._isEnabledBasedOnSelection=!1}get buffer(){return this._buffer}execute(e={}){const t=this.editor.model,n=t.document;t.enqueueChange(this._buffer.batch,i=>{this._buffer.lock();const s=i.createSelection(e.selection||n.selection);if(!t.canEditAt(s))return;const l=e.sequence||1,c=s.isCollapsed;if(s.isCollapsed&&t.modifySelection(s,{direction:this.direction,unit:e.unit,treatEmojiAsSingleUnit:!0}),this._shouldEntireContentBeReplacedWithParagraph(l)){this._replaceEntireContentWithParagraph(i);return}if(this._shouldReplaceFirstBlockWithParagraph(s,l)){this.editor.execute("paragraph",{selection:s});return}if(s.isCollapsed)return;let a=0;s.getFirstRange().getMinimalFlatRanges().forEach(u=>{a+=X(u.getWalker({singleCharacters:!0,ignoreElementEnd:!0,shallow:!0}))}),t.deleteContent(s,{doNotResetEntireContent:c,direction:this.direction}),this._buffer.input(a),i.setSelection(s),this._buffer.unlock()})}_shouldEntireContentBeReplacedWithParagraph(e){if(e>1)return!1;const t=this.editor.model,i=t.document.selection,s=t.schema.getLimitElement(i);if(!(i.isCollapsed&&i.containsEntireContent(s))||!t.schema.checkChild(s,"paragraph"))return!1;const c=s.getChild(0);return!(c&&c.is("element","paragraph"))}_replaceEntireContentWithParagraph(e){const t=this.editor.model,i=t.document.selection,s=t.schema.getLimitElement(i),l=e.createElement("paragraph");e.remove(e.createRangeIn(s)),e.insert(l,s),e.setSelection(l,0)}_shouldReplaceFirstBlockWithParagraph(e,t){const n=this.editor.model;if(t>1||this.direction!="backward"||!e.isCollapsed)return!1;const i=e.getFirstPosition(),s=n.schema.getLimitElement(i),l=s.getChild(0);return!(i.parent!=l||!e.containsEntireContent(l)||!n.schema.checkChild(s,"paragraph")||l.name=="paragraph")}}const pe="character",q="word",be="codePoint",y="selection",x="backward",k="forward",j={deleteContent:{unit:y,direction:x},deleteContentBackward:{unit:be,direction:x},deleteWordBackward:{unit:q,direction:x},deleteHardLineBackward:{unit:y,direction:x},deleteSoftLineBackward:{unit:y,direction:x},deleteContentForward:{unit:pe,direction:k},deleteWordForward:{unit:q,direction:k},deleteHardLineForward:{unit:y,direction:k},deleteSoftLineForward:{unit:y,direction:k}};class _e extends W{constructor(r){super(r);const e=r.document;let t=0;e.on("keydown",()=>{t++}),e.on("keyup",()=>{t=0}),e.on("beforeinput",(n,i)=>{if(!this.isEnabled)return;const{targetRanges:s,domEvent:l,inputType:c}=i,a=j[c];if(!a)return;const u={direction:a.direction,unit:a.unit,sequence:t};u.unit==y&&(u.selectionToRemove=r.createSelection(s[0])),c==="deleteContentBackward"&&(T.isAndroid&&(u.sequence=1),ye(s)&&(u.unit=y,u.selectionToRemove=r.createSelection(s)));const d=new F(e,"delete",s[0]);e.fire(d,new R(r,l,u)),d.stop.called&&n.stop()}),T.isBlink&&ve(this)}observe(){}stopObserving(){}}function ve(o){const r=o.view,e=r.document;let t=null,n=!1;e.on("keydown",(l,{keyCode:c})=>{t=c,n=!1}),e.on("keyup",(l,{keyCode:c,domEvent:a})=>{const u=e.selection,d=o.isEnabled&&c==t&&i(c)&&!u.isCollapsed&&!n;if(t=null,d){const f=u.getFirstRange(),m=new F(e,"delete",f),p={unit:y,direction:s(c),selectionToRemove:u};e.fire(m,new R(r,a,p))}}),e.on("beforeinput",(l,{inputType:c})=>{const a=j[c];i(t)&&a&&a.direction==s(t)&&(n=!0)},{priority:"high"}),e.on("beforeinput",(l,{inputType:c,data:a})=>{t==E.delete&&c=="insertText"&&a==""&&l.stop()},{priority:"high"});function i(l){return l==E.backspace||l==E.delete}function s(l){return l==E.backspace?x:k}}function ye(o){if(o.length!=1||o[0].isCollapsed)return!1;const r=o[0].getWalker({direction:"backward",singleCharacters:!0,ignoreElementEnd:!0});let e=0;for(const{nextPosition:t,item:n}of r){if(t.parent.is("$text")){const i=t.parent.data,s=t.offset;if(Z(i,s)||ee(i,s)||te(i,s))continue;e++}else(n.is("containerElement")||n.is("emptyElement"))&&e++;if(e>1)return!0}return!1}class Ee extends O{constructor(){super(...arguments);h(this,"_undoOnBackspace")}static get pluginName(){return"Delete"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.editing.view,n=t.document,i=e.model.document;t.addObserver(_e),this._undoOnBackspace=!1;const s=new L(e,"forward");e.commands.add("deleteForward",s),e.commands.add("forwardDelete",s),e.commands.add("delete",new L(e,"backward")),this.listenTo(n,"delete",(l,c)=>{n.isComposing||c.preventDefault();const{direction:a,sequence:u,selectionToRemove:d,unit:f}=c,m=a==="forward"?"deleteForward":"delete",p={sequence:u};if(f=="selection"){const g=Array.from(d.getRanges()).map(v=>e.editing.mapper.toModelRange(v));p.selection=e.model.createSelection(g)}else p.unit=f;e.execute(m,p),t.scrollToTheSelection()},{priority:"low"}),this.listenTo(n,"keydown",(l,c)=>{if(n.isComposing||c.keyCode!=E.backspace||!i.selection.isCollapsed)return;const a=e.model.schema.getLimitElement(i.selection),u=e.model.createPositionAt(a,0);if(u.isTouching(i.selection.getFirstPosition())){c.preventDefault();const d=e.model.schema.getNearestSelectionRange(u,"forward");if(!d)return;const f=t.createSelection(e.editing.mapper.toViewRange(d)),m=f.getFirstRange(),p=new F(document,"delete",m),g={unit:"selection",direction:"backward",selectionToRemove:f};n.fire(p,new R(t,c.domEvent,g))}}),this.editor.plugins.has("UndoEditing")&&(this.listenTo(n,"delete",(l,c)=>{this._undoOnBackspace&&c.direction=="backward"&&c.sequence==1&&c.unit=="codePoint"&&(this._undoOnBackspace=!1,e.execute("undo"),c.preventDefault(),l.stop())},{context:"$capture"}),this.listenTo(i,"change",()=>{this._undoOnBackspace=!1}))}requestUndoOnBackspace(){this.editor.plugins.has("UndoEditing")&&(this._undoOnBackspace=!0)}}class qe extends O{static get requires(){return[fe,Ee]}static get pluginName(){return"Typing"}static get isOfficialPlugin(){return!0}}/**
|
|
8
|
-
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
9
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
10
|
-
*/function Te(o,r){let e=o.start;return{text:Array.from(o.getWalker({ignoreElementEnd:!1})).reduce((n,{item:i})=>i.is("$text")||i.is("$textProxy")?n+i.data:(e=r.createPositionAfter(i),""),""),range:r.createRange(e,o.end)}}class Ce extends J(){constructor(e,t){super();h(this,"model");h(this,"testCallback");h(this,"_hasMatch");this.model=e,this.testCallback=t,this._hasMatch=!1,this.set("isEnabled",!0),this.on("change:isEnabled",()=>{this.isEnabled?this._startListening():(this.stopListening(e.document.selection),this.stopListening(e.document))}),this._startListening()}get hasMatch(){return this._hasMatch}_startListening(){const t=this.model.document;this.listenTo(t.selection,"change:range",(n,{directChange:i})=>{if(i){if(!t.selection.isCollapsed){this.hasMatch&&(this.fire("unmatched"),this._hasMatch=!1);return}this._evaluateTextBeforeSelection("selection")}}),this.listenTo(t,"change:data",(n,i)=>{i.isUndo||!i.isLocal||this._evaluateTextBeforeSelection("data",{batch:i})})}_evaluateTextBeforeSelection(e,t={}){const n=this.model,s=n.document.selection,l=n.createRange(n.createPositionAt(s.focus.parent,0),s.focus),{text:c,range:a}=Te(l,n),u=this.testCallback(c);if(!u&&this.hasMatch&&this.fire("unmatched"),this._hasMatch=!!u,u){const d=Object.assign(t,{text:c,range:a});typeof u=="object"&&Object.assign(d,u),this.fire(`matched:${e}`,d)}}}class Ne extends O{constructor(e){super(e);h(this,"attributes");h(this,"_overrideUid");h(this,"_isNextGravityRestorationSkipped",!1);this.attributes=new Set,this._overrideUid=null}static get pluginName(){return"TwoStepCaretMovement"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.model,n=e.editing.view,i=e.locale,s=t.document.selection;this.listenTo(n.document,"arrowKey",(l,c)=>{if(!s.isCollapsed||c.shiftKey||c.altKey||c.ctrlKey)return;const a=c.keyCode==E.arrowright,u=c.keyCode==E.arrowleft;if(!a&&!u)return;const d=i.contentLanguageDirection;let f=!1;d==="ltr"&&a||d==="rtl"&&u?f=this._handleForwardMovement(c):f=this._handleBackwardMovement(c),f===!0&&l.stop()},{context:"$text",priority:"highest"}),this.listenTo(s,"change:range",(l,c)=>{if(this._isNextGravityRestorationSkipped){this._isNextGravityRestorationSkipped=!1;return}this._isGravityOverridden&&(!c.directChange&&b(s.getFirstPosition(),this.attributes)||this._restoreGravity())}),this._enableClickingAfterNode(),this._enableInsertContentSelectionAttributesFixer(),this._handleDeleteContentAfterNode()}registerAttribute(e){this.attributes.add(e)}_handleForwardMovement(e){const t=this.attributes,n=this.editor.model,i=n.document.selection,s=i.getFirstPosition();return this._isGravityOverridden||s.isAtStart&&_(i,t)?!1:b(s,t)?(e&&S(e),_(i,t)&&b(s,t,!0)?A(n,t):this._overrideGravity(),!0):!1}_handleBackwardMovement(e){const t=this.attributes,n=this.editor.model,i=n.document.selection,s=i.getFirstPosition();return this._isGravityOverridden?(e&&S(e),this._restoreGravity(),b(s,t,!0)?A(n,t):P(n,t,s),!0):s.isAtStart?_(i,t)?(e&&S(e),P(n,t,s),!0):!1:!_(i,t)&&b(s,t,!0)?(e&&S(e),P(n,t,s),!0):N(s,t)?s.isAtEnd&&!_(i,t)&&b(s,t)?(e&&S(e),P(n,t,s),!0):(this._isNextGravityRestorationSkipped=!0,this._overrideGravity(),!1):!1}_enableClickingAfterNode(){const e=this.editor,t=e.model,n=t.document.selection,i=e.editing.view.document;e.editing.view.addObserver(ie),e.editing.view.addObserver(se);let s=!1,l=!1;this.listenTo(i,"touchstart",()=>{l=!1,s=!0}),this.listenTo(i,"mousedown",()=>{l=!0}),this.listenTo(i,"selectionChange",()=>{const c=this.attributes;if(!l&&!s||(l=!1,s=!1,!n.isCollapsed)||!_(n,c))return;const a=n.getFirstPosition();b(a,c)&&(a.isAtStart||b(a,c,!0)?A(t,c):this._isGravityOverridden||this._overrideGravity())})}_enableInsertContentSelectionAttributesFixer(){const t=this.editor.model,n=t.document.selection,i=this.attributes;this.listenTo(t,"insertContent",()=>{const s=n.getFirstPosition();_(n,i)&&b(s,i)&&A(t,i)},{priority:"low"})}_handleDeleteContentAfterNode(){const e=this.editor,t=e.model,n=t.document.selection,i=e.editing.view;let s=!1,l=!1;this.listenTo(i.document,"delete",(c,a)=>{s=a.direction==="backward"},{priority:"high"}),this.listenTo(t,"deleteContent",()=>{if(!s)return;const c=n.getFirstPosition();l=_(n,this.attributes)&&!N(c,this.attributes)},{priority:"high"}),this.listenTo(t,"deleteContent",()=>{s&&(s=!1,!l&&e.model.enqueueChange(()=>{const c=n.getFirstPosition();_(n,this.attributes)&&b(c,this.attributes)&&(c.isAtStart||b(c,this.attributes,!0)?A(t,this.attributes):this._isGravityOverridden||this._overrideGravity())}))},{priority:"low"})}get _isGravityOverridden(){return!!this._overrideUid}_overrideGravity(){this._overrideUid=this.editor.model.change(e=>e.overrideSelectionGravity())}_restoreGravity(){this.editor.model.change(e=>{e.restoreSelectionGravity(this._overrideUid),this._overrideUid=null})}}function _(o,r){for(const e of r)if(o.hasAttribute(e))return!0;return!1}function P(o,r,e){const t=e.nodeBefore;o.change(n=>{if(t){const i=[],s=o.schema.isObject(t)&&o.schema.isInline(t);for(const[l,c]of t.getAttributes())o.schema.checkAttribute("$text",l)&&(!s||o.schema.getAttributeProperties(l).copyFromObject!==!1)&&i.push([l,c]);n.setSelectionAttribute(i)}else n.removeSelectionAttribute(r)})}function A(o,r){o.change(e=>{e.removeSelectionAttribute(r)})}function S(o){o.preventDefault()}function N(o,r){const e=o.getShiftedBy(-1);return b(e,r)}function b(o,r,e=!1){const{nodeBefore:t,nodeAfter:n}=o;for(const i of r){const s=t?t.getAttribute(i):void 0,l=n?n.getAttribute(i):void 0;if(!(e&&(s===void 0||l===void 0))&&l!==s)return!0}return!1}const M={copyright:{from:"(c)",to:"©"},registeredTrademark:{from:"(r)",to:"®"},trademark:{from:"(tm)",to:"™"},oneHalf:{from:/(^|[^/a-z0-9])(1\/2)([^/a-z0-9])$/i,to:[null,"½",null]},oneThird:{from:/(^|[^/a-z0-9])(1\/3)([^/a-z0-9])$/i,to:[null,"⅓",null]},twoThirds:{from:/(^|[^/a-z0-9])(2\/3)([^/a-z0-9])$/i,to:[null,"⅔",null]},oneForth:{from:/(^|[^/a-z0-9])(1\/4)([^/a-z0-9])$/i,to:[null,"¼",null]},threeQuarters:{from:/(^|[^/a-z0-9])(3\/4)([^/a-z0-9])$/i,to:[null,"¾",null]},lessThanOrEqual:{from:"<=",to:"≤"},greaterThanOrEqual:{from:">=",to:"≥"},notEqual:{from:"!=",to:"≠"},arrowLeft:{from:"<-",to:"←"},arrowRight:{from:"->",to:"→"},horizontalEllipsis:{from:"...",to:"…"},enDash:{from:/(^| )(--)( )$/,to:[null,"–",null]},emDash:{from:/(^| )(---)( )$/,to:[null,"—",null]},quotesPrimary:{from:C('"'),to:[null,"“",null,"”"]},quotesSecondary:{from:C("'"),to:[null,"‘",null,"’"]},quotesPrimaryEnGb:{from:C("'"),to:[null,"‘",null,"’"]},quotesSecondaryEnGb:{from:C('"'),to:[null,"“",null,"”"]},quotesPrimaryPl:{from:C('"'),to:[null,"„",null,"”"]},quotesSecondaryPl:{from:C("'"),to:[null,"‚",null,"’"]}},G={symbols:["copyright","registeredTrademark","trademark"],mathematical:["oneHalf","oneThird","twoThirds","oneForth","threeQuarters","lessThanOrEqual","greaterThanOrEqual","notEqual","arrowLeft","arrowRight"],typography:["horizontalEllipsis","enDash","emDash"],quotes:["quotesPrimary","quotesSecondary"]},xe=["symbols","mathematical","typography","quotes"];class Me extends O{static get requires(){return["Delete","Input"]}static get pluginName(){return"TextTransformation"}static get isOfficialPlugin(){return!0}constructor(r){super(r),r.config.define("typing",{transformations:{include:xe}})}init(){const e=this.editor.model.document.selection;e.on("change:range",()=>{this.isEnabled=!e.anchor.parent.is("element","codeBlock")}),this._enableTransformationWatchers()}_enableTransformationWatchers(){const r=this.editor,e=r.model,t=r.plugins.get("Delete"),n=ke(r.config.get("typing.transformations")),i=l=>{for(const c of n)if(c.from.test(l))return{normalizedTransformation:c}},s=new Ce(r.model,i);s.on("matched:data",(l,c)=>{if(!c.batch.isTyping)return;const{from:a,to:u}=c.normalizedTransformation,d=a.exec(c.text),f=u(d.slice(1)),m=c.range;let p=d.index;e.enqueueChange(g=>{for(let v=1;v<d.length;v++){const w=d[v],D=f[v-1];if(D==null){p+=w.length;continue}const B=m.start.getShiftedBy(p),H=e.createRange(B,B.getShiftedBy(w.length)),K=Se(B);e.insertContent(g.createText(D,K),H),p+=D.length}e.enqueueChange(()=>{t.requestUndoOnBackspace()})})}),s.bind("isEnabled").to(this)}}function we(o){return typeof o=="string"?new RegExp(`(${ce(o)})$`):o}function Ae(o){return typeof o=="string"?()=>[o]:o instanceof Array?()=>o:o}function Se(o){return(o.textNode?o.textNode:o.nodeAfter).getAttributes()}function C(o){return new RegExp(`(^|\\s)(${o})([^${o}]*)(${o})$`)}function ke(o){const r=o.extra||[],e=o.remove||[],t=i=>!e.includes(i),n=o.include.concat(r).filter(t);return Re(n).filter(t).map(i=>typeof i=="string"&&M[i]?M[i]:i).filter(i=>typeof i=="object").map(i=>({from:we(i.from),to:Ae(i.to)}))}function Re(o){const r=new Set;for(const e of o)if(typeof e=="string"&&G[e])for(const t of G[e])r.add(t);else r.add(e);return Array.from(r)}/**
|
|
11
|
-
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
12
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
13
|
-
*/function Oe(o,r,e,t){return t.createRange(z(o,r,e,!0,t),z(o,r,e,!1,t))}function z(o,r,e,t,n){let i=o.textNode||(t?o.nodeBefore:o.nodeAfter),s=null;for(;i&&i.getAttribute(r)==e;)s=i,i=t?i.previousSibling:i.nextSibling;return s?n.createPositionAt(s,t?"before":"after"):o}function Ge(o,r,e,t){const n=o.editing.view,i=new Set;n.document.registerPostFixer(s=>{const l=o.model.document.selection;let c=!1;if(l.hasAttribute(r)){const a=Oe(l.getFirstPosition(),r,l.getAttribute(r),o.model),u=o.editing.mapper.toViewRange(a);for(const d of u.getItems())d.is("element",e)&&!d.hasClass(t)&&(s.addClass(t,d),i.add(d),c=!0)}return c}),o.conversion.for("editingDowncast").add(s=>{s.on("insert",l,{priority:"highest"}),s.on("remove",l,{priority:"highest"}),s.on("attribute",l,{priority:"highest"}),s.on("selection",l,{priority:"highest"});function l(){n.change(c=>{for(const a of i.values())c.removeClass(t,a),i.delete(a)})}})}export{Ee as Delete,fe as Input,ae as InsertTextCommand,Me as TextTransformation,Ce as TextWatcher,Ne as TwoStepCaretMovement,qe as Typing,Oe as findAttributeRange,z as findAttributeRangeBound,Te as getLastTextLine,Ge as inlineHighlight};
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
var Gt=Object.defineProperty;var $t=(t,n,e)=>n in t?Gt(t,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[n]=e;var f=(t,n,e)=>$t(t,typeof n!="symbol"?n+"":n,e);import{isObject as Yt}from"../../../../../es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/predicate/isObject.js";import{isString as ot}from"../../../../../es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/predicate/isString.js";import{isFunction as st}from"../../../../../es-toolkit@1.32.0/node_modules/es-toolkit/dist/predicate/isFunction.js";import{isElement as It}from"../../../../../es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/predicate/isElement.js";import{isPlainObject as k}from"../../../../../es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/predicate/isPlainObject.js";import{cloneDeepWith as qt}from"../../../../../es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/object/cloneDeepWith.js";import{merge as zt}from"../../../../../es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/object/merge.js";/**
|
|
2
|
-
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
-
*//**
|
|
5
|
-
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
6
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
7
|
-
*/let G;try{G={window,document}}catch{/* istanbul ignore next -- @preserve */G={window:{},document:{}}}var T=G;function Xt(){try{return navigator.userAgent.toLowerCase()}catch{return""}}const A=Xt(),M={isMac:Lt(A),isWindows:Jt(A),isGecko:Qt(A),isSafari:Zt(A),isiOS:te(A),isAndroid:ee(A),isBlink:ne(A),get isMediaForcedColors(){return ie()}};function Lt(t){return t.indexOf("macintosh")>-1}function Jt(t){return t.indexOf("windows")>-1}function Qt(t){return!!t.match(/gecko\/\d+/)}function Zt(t){return t.indexOf(" applewebkit/")>-1&&t.indexOf("chrome")===-1}function te(t){return!!t.match(/iphone|ipad/i)||Lt(t)&&navigator.maxTouchPoints>0}function ee(t){return t.indexOf("android")>-1}function ne(t){return t.indexOf("chrome/")>-1&&t.indexOf("edge/")<0}function ie(){return T.window.matchMedia?T.window.matchMedia("(forced-colors: active)").matches:!1}/**
|
|
8
|
-
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
9
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
10
|
-
*/function oe(t,n,e,i){e=e||function(a,c){return a===c};const o=Array.isArray(t)?t:Array.prototype.slice.call(t),s=Array.isArray(n)?n:Array.prototype.slice.call(n),r=se(o,s,e);return i?ce(r,s.length):re(s,r)}function se(t,n,e){const i=rt(t,n,e);if(i===-1)return{firstIndex:-1,lastIndexOld:-1,lastIndexNew:-1};const o=ct(t,i),s=ct(n,i),r=rt(o,s,e),l=t.length-r,a=n.length-r;return{firstIndex:i,lastIndexOld:l,lastIndexNew:a}}function rt(t,n,e){for(let i=0;i<Math.max(t.length,n.length);i++)if(t[i]===void 0||n[i]===void 0||!e(t[i],n[i]))return i;return-1}function ct(t,n){return t.slice(n).reverse()}function re(t,n){const e=[],{firstIndex:i,lastIndexOld:o,lastIndexNew:s}=n;return s-i>0&&e.push({index:i,type:"insert",values:t.slice(i,s)}),o-i>0&&e.push({index:i+(s-i),type:"delete",howMany:o-i}),e}function ce(t,n){const{firstIndex:e,lastIndexOld:i,lastIndexNew:o}=t;if(e===-1)return Array(n).fill("equal");let s=[];return e>0&&(s=s.concat(Array(e).fill("equal"))),o-e>0&&(s=s.concat(Array(o-e).fill("insert"))),i-e>0&&(s=s.concat(Array(i-e).fill("delete"))),o<n&&(s=s.concat(Array(n-o).fill("equal"))),s}function At(t,n,e){e=e||function(b,x){return b===x};const i=t.length,o=n.length;if(i>200||o>200||i+o>300)return At.fastDiff(t,n,e,!0);let s,r;if(o<i){const b=t;t=n,n=b,s="delete",r="insert"}else s="insert",r="delete";const l=t.length,a=n.length,c=a-l,u={},h={};function d(b){const x=(h[b-1]!==void 0?h[b-1]:-1)+1,C=h[b+1]!==void 0?h[b+1]:-1,it=x>C?-1:1;u[b+it]&&(u[b]=u[b+it].slice(0)),u[b]||(u[b]=[]),u[b].push(x>C?s:r);let R=Math.max(x,C),j=R-b;for(;j<l&&R<a&&e(t[j],n[R]);)j++,R++,u[b].push("equal");return R}let _=0,m;do{for(m=-_;m<c;m++)h[m]=d(m);for(m=c+_;m>c;m--)h[m]=d(m);h[c]=d(c),_++}while(h[c]!==a);return u[c].slice(1)}At.fastDiff=oe;/**
|
|
11
|
-
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
12
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
13
|
-
*/function lt(){return function t(){t.called=!0}}class ${constructor(n,e){f(this,"source");f(this,"name");f(this,"path");f(this,"stop");f(this,"off");f(this,"return");this.source=n,this.name=e,this.path=[],this.stop=lt(),this.off=lt()}}/**
|
|
14
|
-
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
15
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
16
|
-
*/const E=new Array(256).fill("").map((t,n)=>("0"+n.toString(16)).slice(-2));function J(){const[t,n,e,i]=crypto.getRandomValues(new Uint32Array(4));return"e"+E[t>>0&255]+E[t>>8&255]+E[t>>16&255]+E[t>>24&255]+E[n>>0&255]+E[n>>8&255]+E[n>>16&255]+E[n>>24&255]+E[e>>0&255]+E[e>>8&255]+E[e>>16&255]+E[e>>24&255]+E[i>>0&255]+E[i>>8&255]+E[i>>16&255]+E[i>>24&255]}/**
|
|
17
|
-
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
18
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
19
|
-
*/const Y={get(t="normal"){return typeof t!="number"?this[t]||this.normal:t},highest:1e5,high:1e3,normal:0,low:-1e3,lowest:-1e5};function le(t,n){const e=Y.get(n.priority);let i=0,o=t.length;for(;i<o;){const s=i+o>>1;Y.get(t[s].priority)<e?o=s:i=s+1}t.splice(i,0,n)}/**
|
|
20
|
-
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
21
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
22
|
-
*/const ae="https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html";class p extends Error{constructor(e,i,o){super(ue(e,o));f(this,"context");f(this,"data");this.name="CKEditorError",this.context=i,this.data=o}is(e){return e==="CKEditorError"}static rethrowUnexpectedError(e,i){if(e.is&&e.is("CKEditorError"))throw e;const o=new p(e.message,i);throw o.stack=e.stack,o}}function dn(t,n){console.warn(...Ct(t,n))}function pn(t,n){console.error(...Ct(t,n))}function vt(t){return`
|
|
23
|
-
Read more: ${ae}#error-${t}`}function ue(t,n){const e=new WeakSet,o=n?` ${JSON.stringify(n,(r,l)=>{if(typeof l=="object"&&l!==null){if(e.has(l))return`[object ${l.constructor.name}]`;e.add(l)}return l})}`:"",s=vt(t);return t+o+s}function Ct(t,n){const e=vt(t);return n?[t,n,e]:[t,e]}const fe="45.1.0",gn=new Date(2025,4,14);/* istanbul ignore next -- @preserve */if(globalThis.CKEDITOR_VERSION)throw new p("ckeditor-duplicated-modules",null);globalThis.CKEDITOR_VERSION=fe;const F=Symbol("listeningTo"),q=Symbol("emitterId"),I=Symbol("delegations"),Ft=L(Object);function L(t){if(!t)return Ft;class n extends t{on(i,o,s){this.listenTo(this,i,o,s)}once(i,o,s){let r=!1;const l=(a,...c)=>{r||(r=!0,a.off(),o.call(this,a,...c))};this.listenTo(this,i,l,s)}off(i,o){this.stopListening(this,i,o)}listenTo(i,o,s,r={}){let l,a;this[F]||(this[F]={});const c=this[F];W(i)||Mt(i);const u=W(i);(l=c[u])||(l=c[u]={emitter:i,callbacks:{}}),(a=l.callbacks[o])||(a=l.callbacks[o]=[]),a.push(s),me(this,i,o,s,r)}stopListening(i,o,s){const r=this[F];let l=i&&W(i);const a=r&&l?r[l]:void 0,c=a&&o?a.callbacks[o]:void 0;if(!(!r||i&&!a||o&&!c))if(s)K(this,i,o,s),c.indexOf(s)!==-1&&(c.length===1?delete a.callbacks[o]:K(this,i,o,s));else if(c){for(;s=c.pop();)K(this,i,o,s);delete a.callbacks[o]}else if(a){for(o in a.callbacks)this.stopListening(i,o);delete r[l]}else{for(l in r)this.stopListening(r[l].emitter);delete this[F]}}fire(i,...o){try{const s=i instanceof $?i:new $(this,i),r=s.name;let l=ge(this,r);if(s.path.push(this),l){l=l.slice();for(let c=0;c<l.length;c++){const u=l[c].callback;if(u.call(this,s,...o),s.off.called&&(delete s.off.called,this._removeEventListener(r,u)),s.stop.called)break}}const a=this[I];if(a){const c=a.get(r),u=a.get("*");c&&at(c,s,o),u&&at(u,s,o)}return s.return}catch(s){/* istanbul ignore next -- @preserve */p.rethrowUnexpectedError(s,this)}}delegate(...i){return{to:(o,s)=>{this[I]||(this[I]=new Map),i.forEach(r=>{const l=this[I].get(r);l?l.set(o,s):this[I].set(r,new Map([[o,s]]))})}}}stopDelegating(i,o){if(this[I])if(!i)this[I].clear();else if(!o)this[I].delete(i);else{const s=this[I].get(i);s&&s.delete(o)}}_addEventListener(i,o,s){pe(this,i);const r=z(this,i),l=Y.get(s.priority),a={callback:o,priority:l};for(const c of r)le(c,a)}_removeEventListener(i,o){const s=z(this,i);for(const r of s)for(let l=0;l<r.length;l++)r[l].callback==o&&(r.splice(l,1),l--)}}return n}["on","once","off","listenTo","stopListening","fire","delegate","stopDelegating","_addEventListener","_removeEventListener"].forEach(t=>{L[t]=Ft.prototype[t]});function he(t,n){const e=t[F];return e&&e[n]?e[n].emitter:null}function Mt(t,n){t[q]||(t[q]=n||J())}function W(t){return t[q]}function Rt(t){return t._events||Object.defineProperty(t,"_events",{value:{}}),t._events}function de(){return{callbacks:[],childEvents:[]}}function pe(t,n){const e=Rt(t);if(e[n])return;let i=n,o=null;const s=[];for(;i!==""&&!e[i];)e[i]=de(),s.push(e[i]),o&&e[i].childEvents.push(o),o=i,i=i.substr(0,i.lastIndexOf(":"));if(i!==""){for(const r of s)r.callbacks=e[i].callbacks.slice();e[i].childEvents.push(o)}}function z(t,n){const e=Rt(t)[n];if(!e)return[];let i=[e.callbacks];for(let o=0;o<e.childEvents.length;o++){const s=z(t,e.childEvents[o]);i=i.concat(s)}return i}function ge(t,n){if(!t._events)return null;let e=n;do{const i=t._events[e];if(i&&i.callbacks&&i.callbacks.length)return i.callbacks;const o=e.lastIndexOf(":");e=o>-1?e.substring(0,o):""}while(e);return null}function at(t,n,e){for(let[i,o]of t){o?typeof o=="function"&&(o=o(n.name)):o=n.name;const s=new $(n.source,o);s.path=[...n.path],i.fire(s,...e)}}function me(t,n,e,i,o){n._addEventListener?n._addEventListener(e,i,o):t._addEventListener.call(n,e,i,o)}function K(t,n,e,i){n._removeEventListener?n._removeEventListener(e,i):t._removeEventListener.call(n,e,i)}const S=Symbol("observableProperties"),N=Symbol("boundObservables"),P=Symbol("boundProperties"),v=Symbol("decoratedMethods"),ut=Symbol("decoratedOriginal"),kt=Q(L());function Q(t){var e,i,o,s,r;if(!t)return kt;class n extends(r=t,s=S,o=v,i=P,e=N,r){constructor(){super(...arguments);f(this,s);f(this,o);f(this,i);f(this,e)}set(c,u){if(Yt(c)){Object.keys(c).forEach(d=>{this.set(d,c[d])},this);return}H(this);const h=this[S];if(c in this&&!h.has(c))throw new p("observable-set-cannot-override",this);Object.defineProperty(this,c,{enumerable:!0,configurable:!0,get(){return h.get(c)},set(d){const _=h.get(c);let m=this.fire(`set:${c}`,c,d,_);m===void 0&&(m=d),(_!==m||!h.has(c))&&(h.set(c,m),this.fire(`change:${c}`,c,m,_))}}),this[c]=u}bind(...c){if(!c.length||!ft(c))throw new p("observable-bind-wrong-properties",this);if(new Set(c).size!==c.length)throw new p("observable-bind-duplicate-properties",this);H(this);const u=this[P];c.forEach(d=>{if(u.has(d))throw new p("observable-bind-rebind",this)});const h=new Map;return c.forEach(d=>{const _={property:d,to:[]};u.set(d,_),h.set(d,_)}),{to:be,toMany:_e,_observable:this,_bindProperties:c,_to:[],_bindings:h}}unbind(...c){if(!this[S])return;const u=this[P],h=this[N];if(c.length){if(!ft(c))throw new p("observable-unbind-wrong-properties",this);c.forEach(d=>{const _=u.get(d);_&&(_.to.forEach(([m,b])=>{const x=h.get(m),C=x[b];C.delete(_),C.size||delete x[b],Object.keys(x).length||(h.delete(m),this.stopListening(m,"change"))}),u.delete(d))})}else h.forEach((d,_)=>{this.stopListening(_,"change")}),h.clear(),u.clear()}decorate(c){H(this);const u=this[c];if(!u)throw new p("observablemixin-cannot-decorate-undefined",this,{object:this,methodName:c});this.on(c,(h,d)=>{h.return=u.apply(this,d)}),this[c]=function(...h){return this.fire(c,h)},this[c][ut]=u,this[v]||(this[v]=[]),this[v].push(c)}stopListening(c,u,h){if(!c&&this[v]){for(const d of this[v])this[d]=this[d][ut];delete this[v]}super.stopListening(c,u,h)}}return n}["set","bind","unbind","decorate","on","once","off","listenTo","stopListening","fire","delegate","stopDelegating","_addEventListener","_removeEventListener"].forEach(t=>{Q[t]=kt.prototype[t]});function H(t){t[S]||(Object.defineProperty(t,S,{value:new Map}),Object.defineProperty(t,N,{value:new Map}),Object.defineProperty(t,P,{value:new Map}))}function be(...t){const n=ye(...t),e=Array.from(this._bindings.keys()),i=e.length;if(!n.callback&&n.to.length>1)throw new p("observable-bind-to-no-callback",this);if(i>1&&n.callback)throw new p("observable-bind-to-extra-callback",this);n.to.forEach(o=>{if(o.properties.length&&o.properties.length!==i)throw new p("observable-bind-to-properties-length",this);o.properties.length||(o.properties=this._bindProperties)}),this._to=n.to,n.callback&&(this._bindings.get(e[0]).callback=n.callback),xe(this._observable,this._to),Te(this),this._bindProperties.forEach(o=>{St(this._observable,o)})}function _e(t,n,e){if(this._bindings.size>1)throw new p("observable-bind-to-many-not-one-binding",this);this.to(...we(t,n),e)}function we(t,n){const e=t.map(i=>[i,n]);return Array.prototype.concat.apply([],e)}function ft(t){return t.every(n=>typeof n=="string")}function ye(...t){if(!t.length)throw new p("observable-bind-to-parse-error",null);const n={to:[]};let e;return typeof t[t.length-1]=="function"&&(n.callback=t.pop()),t.forEach(i=>{if(typeof i=="string")e.properties.push(i);else if(typeof i=="object")e={observable:i,properties:[]},n.to.push(e);else throw new p("observable-bind-to-parse-error",null)}),n}function Ee(t,n,e,i){const o=t[N],s=o.get(e),r=s||{};r[i]||(r[i]=new Set),r[i].add(n),s||o.set(e,r)}function Te(t){let n;t._bindings.forEach((e,i)=>{t._to.forEach(o=>{n=o.properties[e.callback?0:t._bindProperties.indexOf(i)],e.to.push([o.observable,n]),Ee(t._observable,e,o.observable,n)})})}function St(t,n){const i=t[P].get(n);let o;i.callback?o=i.callback.apply(t,i.to.map(s=>s[0][s[1]])):(o=i.to[0],o=o[0][o[1]]),Object.prototype.hasOwnProperty.call(t,n)?t[n]=o:t.set(n,o)}function xe(t,n){n.forEach(e=>{const i=t[N];let o;i.get(e.observable)||t.listenTo(e.observable,"change",(s,r)=>{o=i.get(e.observable)[r],o&&o.forEach(l=>{St(t,l.property)})})})}/**
|
|
24
|
-
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
25
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
26
|
-
*/class mn{constructor(){f(this,"_replacedElements");this._replacedElements=[]}replace(n,e){this._replacedElements.push({element:n,newElement:e}),n.style.display="none",e&&n.parentNode.insertBefore(e,n.nextSibling)}restore(){this._replacedElements.forEach(({element:n,newElement:e})=>{n.style.display="",e&&e.remove()}),this._replacedElements=[]}}/**
|
|
27
|
-
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
28
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
29
|
-
*/function bn(t){let n=0;for(const e of t)n++;return n}/**
|
|
30
|
-
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
31
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
32
|
-
*/function _n(t,n){const e=Math.min(t.length,n.length);for(let i=0;i<e;i++)if(t[i]!=n[i])return i;return t.length==n.length?"same":t.length<n.length?"prefix":"extension"}/**
|
|
33
|
-
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
34
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
35
|
-
*/function Z(t){return!!(t&&t[Symbol.iterator])}function wn(t,n,e={},i=[]){const o=e&&e.xmlns,s=o?t.createElementNS(o,n):t.createElement(n);for(const r in e)s.setAttribute(r,e[r]);(ot(i)||!Z(i))&&(i=[i]);for(let r of i)ot(r)&&(r=t.createTextNode(r)),s.appendChild(r);return s}class yn{constructor(n,e){f(this,"_config");this._config=Object.create(null),e&&this.define(ht(e)),n&&this._setObjectToTarget(this._config,n)}set(n,e){this._setToTarget(this._config,n,e)}define(n,e){this._setToTarget(this._config,n,e,!0)}get(n){return this._getFromSource(this._config,n)}*names(){for(const n of Object.keys(this._config))yield n}_setToTarget(n,e,i,o=!1){if(k(e)){this._setObjectToTarget(n,e,o);return}const s=e.split(".");e=s.pop();for(const r of s)k(n[r])||(n[r]=Object.create(null)),n=n[r];if(k(i)){k(n[e])||(n[e]=Object.create(null)),n=n[e],this._setObjectToTarget(n,i,o);return}o&&typeof n[e]<"u"||(n[e]=i)}_getFromSource(n,e){const i=e.split(".");e=i.pop();for(const o of i){if(!k(n[o])){n=null;break}n=n[o]}return n?ht(n[e]):void 0}_setObjectToTarget(n,e,i){Object.keys(e).forEach(o=>{this._setToTarget(n,o,e[o],i)})}}function ht(t){return qt(t,Ie)}function Ie(t){return It(t)||typeof t=="function"?t:void 0}/**
|
|
36
|
-
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
37
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
38
|
-
*/function dt(t){if(t){if(t.defaultView)return t instanceof t.defaultView.Document;if(t.ownerDocument&&t.ownerDocument.defaultView)return t instanceof t.ownerDocument.defaultView.Node}return!1}/**
|
|
39
|
-
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
40
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
41
|
-
*/function D(t){const n=Object.prototype.toString.apply(t);return n=="[object Window]"||n=="[object global]"}const Pt=V(L());function V(t){if(!t)return Pt;class n extends t{listenTo(i,o,s,r={}){if(dt(i)||D(i)||i instanceof T.window.EventTarget){const l={capture:!!r.useCapture,passive:!!r.usePassive},a=this._getProxyEmitter(i,l)||new Le(i,l);this.listenTo(a,o,s,r)}else super.listenTo(i,o,s,r)}stopListening(i,o,s){if(dt(i)||D(i)||i instanceof T.window.EventTarget){const r=this._getAllProxyEmitters(i);for(const l of r)this.stopListening(l,o,s)}else super.stopListening(i,o,s)}_getProxyEmitter(i,o){return he(this,Nt(i,o))}_getAllProxyEmitters(i){return[{capture:!1,passive:!1},{capture:!1,passive:!0},{capture:!0,passive:!1},{capture:!0,passive:!0}].map(o=>this._getProxyEmitter(i,o)).filter(o=>!!o)}}return n}["_getProxyEmitter","_getAllProxyEmitters","on","once","off","listenTo","stopListening","fire","delegate","stopDelegating","_addEventListener","_removeEventListener"].forEach(t=>{V[t]=Pt.prototype[t]});class Le extends L(){constructor(e,i){super();f(this,"_domNode");f(this,"_options");f(this,"_domListeners");Mt(this,Nt(e,i)),this._domNode=e,this._options=i}attach(e){if(this._domListeners&&this._domListeners[e])return;const i=this._createDomListener(e);this._domNode.addEventListener(e,i,this._options),this._domListeners||(this._domListeners={}),this._domListeners[e]=i}detach(e){let i;this._domListeners[e]&&(!(i=this._events[e])||!i.callbacks.length)&&this._domListeners[e].removeListener()}_addEventListener(e,i,o){this.attach(e),L().prototype._addEventListener.call(this,e,i,o)}_removeEventListener(e,i){L().prototype._removeEventListener.call(this,e,i),this.detach(e)}_createDomListener(e){const i=o=>{this.fire(e,o)};return i.removeListener=()=>{this._domNode.removeEventListener(e,i,this._options),delete this._domListeners[e]},i}}function Ae(t){return t["data-ck-expando"]||(t["data-ck-expando"]=J())}function Nt(t,n){let e=Ae(t);for(const i of Object.keys(n).sort())n[i]&&(e+="-"+i);return e}/**
|
|
42
|
-
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
43
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
44
|
-
*/function En(t){const n=[];let e=t;for(;e&&e.nodeType!=Node.DOCUMENT_NODE;)n.unshift(e),e=e.parentNode;return n}/**
|
|
45
|
-
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
46
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
47
|
-
*/function Tn(t){return t instanceof HTMLTextAreaElement?t.value:t.innerHTML}/**
|
|
48
|
-
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
49
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
50
|
-
*/function Bt(t){const n=t.ownerDocument.defaultView.getComputedStyle(t);return{top:parseInt(n.borderTopWidth,10),right:parseInt(n.borderRightWidth,10),bottom:parseInt(n.borderBottomWidth,10),left:parseInt(n.borderLeftWidth,10)}}/**
|
|
51
|
-
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
52
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
53
|
-
*/function xn(t){if(!t.target)return null;const n=t.target.ownerDocument,e=t.clientX,i=t.clientY;let o=null;return n.caretRangeFromPoint&&n.caretRangeFromPoint(e,i)?o=n.caretRangeFromPoint(e,i):t.rangeParent&&(o=n.createRange(),o.setStart(t.rangeParent,t.rangeOffset),o.collapse(!0)),o}/**
|
|
54
|
-
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
55
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
56
|
-
*/function tt(t){return Object.prototype.toString.call(t)=="[object Text]"}/**
|
|
57
|
-
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
58
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
59
|
-
*/function et(t){return Object.prototype.toString.apply(t)=="[object Range]"}function Dt(t){return!t||!t.parentNode||t.offsetParent===T.document.body?null:t.offsetParent}const Ot=["top","right","bottom","left","width","height"];class y{constructor(n){f(this,"top");f(this,"right");f(this,"bottom");f(this,"left");f(this,"width");f(this,"height");f(this,"_source");const e=et(n);if(Object.defineProperty(this,"_source",{value:n._source||n,writable:!0,enumerable:!1}),X(n)||e)if(e){const i=y.getDomRangeRects(n);B(this,y.getBoundingRect(i))}else B(this,n.getBoundingClientRect());else if(D(n)){const{innerWidth:i,innerHeight:o}=n;B(this,{top:0,right:i,bottom:o,left:0,width:i,height:o})}else B(this,n)}clone(){return new y(this)}moveTo(n,e){return this.top=e,this.right=n+this.width,this.bottom=e+this.height,this.left=n,this}moveBy(n,e){return this.top+=e,this.right+=n,this.left+=n,this.bottom+=e,this}getIntersection(n){const e={top:Math.max(this.top,n.top),right:Math.min(this.right,n.right),bottom:Math.min(this.bottom,n.bottom),left:Math.max(this.left,n.left),width:0,height:0};if(e.width=e.right-e.left,e.height=e.bottom-e.top,e.width<0||e.height<0)return null;{const i=new y(e);return i._source=this._source,i}}getIntersectionArea(n){const e=this.getIntersection(n);return e?e.getArea():0}getArea(){return this.width*this.height}getVisible(){const n=this._source;let e=this.clone();if(pt(n))return e;let i=n,o=n.parentNode||n.commonAncestorContainer,s;for(;o&&!pt(o);){const r=ve(o)==="visible";i instanceof HTMLElement&>(i)==="absolute"&&(s=i);const l=gt(o);if(r||s&&(l==="relative"&&r||l!=="relative")){i=o,o=o.parentNode;continue}const a=new y(o),c=e.getIntersection(a);if(c)c.getArea()<e.getArea()&&(e=c);else return null;i=o,o=o.parentNode}return e}isEqual(n){for(const e of Ot)if(this[e]!==n[e])return!1;return!0}contains(n){const e=this.getIntersection(n);return!!(e&&e.isEqual(n))}toAbsoluteRect(){const{scrollX:n,scrollY:e}=T.window,i=this.clone().moveBy(n,e);if(X(i._source)){const o=Dt(i._source);o&&Ce(i,o)}return i}excludeScrollbarsAndBorders(){const n=this._source;let e,i,o;if(D(n))e=n.innerWidth-n.document.documentElement.clientWidth,i=n.innerHeight-n.document.documentElement.clientHeight,o=n.getComputedStyle(n.document.documentElement).direction;else{const s=Bt(n);e=n.offsetWidth-n.clientWidth-s.left-s.right,i=n.offsetHeight-n.clientHeight-s.top-s.bottom,o=n.ownerDocument.defaultView.getComputedStyle(n).direction,this.left+=s.left,this.top+=s.top,this.right-=s.right,this.bottom-=s.bottom,this.width=this.right-this.left,this.height=this.bottom-this.top}return this.width-=e,o==="ltr"?this.right-=e:this.left+=e,this.height-=i,this.bottom-=i,this}static getDomRangeRects(n){const e=[],i=Array.from(n.getClientRects());if(i.length)for(const o of i)e.push(new y(o));else{let o=n.startContainer;tt(o)&&(o=o.parentNode);const s=new y(o.getBoundingClientRect());s.right=s.left,s.width=0,e.push(s)}return e}static getBoundingRect(n){const e={left:Number.POSITIVE_INFINITY,top:Number.POSITIVE_INFINITY,right:Number.NEGATIVE_INFINITY,bottom:Number.NEGATIVE_INFINITY,width:0,height:0};let i=0;for(const o of n)i++,e.left=Math.min(e.left,o.left),e.top=Math.min(e.top,o.top),e.right=Math.max(e.right,o.right),e.bottom=Math.max(e.bottom,o.bottom);return i==0?null:(e.width=e.right-e.left,e.height=e.bottom-e.top,new y(e))}}function B(t,n){for(const e of Ot)t[e]=n[e]}function pt(t){return X(t)?t===t.ownerDocument.body:!1}function X(t){return t!==null&&typeof t=="object"&&t.nodeType===1&&typeof t.getBoundingClientRect=="function"}function gt(t){return t instanceof HTMLElement?t.ownerDocument.defaultView.getComputedStyle(t).position:"static"}function ve(t){return t instanceof HTMLElement?t.ownerDocument.defaultView.getComputedStyle(t).overflow:"visible"}function Ce(t,n){const e=new y(n),i=Bt(n);let o=0,s=0;o-=e.left,s-=e.top,o+=n.scrollLeft,s+=n.scrollTop,o-=i.left,s-=i.top,t.moveBy(o,s)}const g=class g{constructor(n,e){f(this,"_element");f(this,"_callback");g._observerInstance||g._createObserver(),this._element=n,this._callback=e,g._addElementCallback(n,e),g._observerInstance.observe(n)}get element(){return this._element}destroy(){g._deleteElementCallback(this._element,this._callback)}static _addElementCallback(n,e){g._elementCallbacks||(g._elementCallbacks=new Map);let i=g._elementCallbacks.get(n);i||(i=new Set,g._elementCallbacks.set(n,i)),i.add(e)}static _deleteElementCallback(n,e){const i=g._getElementCallbacks(n);i&&(i.delete(e),i.size||(g._elementCallbacks.delete(n),g._observerInstance.unobserve(n))),g._elementCallbacks&&!g._elementCallbacks.size&&(g._observerInstance=null,g._elementCallbacks=null)}static _getElementCallbacks(n){return g._elementCallbacks?g._elementCallbacks.get(n):null}static _createObserver(){g._observerInstance=new T.window.ResizeObserver(n=>{for(const e of n){const i=g._getElementCallbacks(e.target);if(i)for(const o of i)o(e)}})}};f(g,"_observerInstance",null),f(g,"_elementCallbacks",null);let mt=g;/**
|
|
60
|
-
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
61
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
62
|
-
*/function In(t,n){t instanceof HTMLTextAreaElement&&(t.value=n),t.innerHTML=n}/**
|
|
63
|
-
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
64
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
65
|
-
*/function Ln(t){return n=>n+t}/**
|
|
66
|
-
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
67
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
68
|
-
*/function An(t){let n=0;for(;t.previousSibling;)t=t.previousSibling,n++;return n}/**
|
|
69
|
-
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
70
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
71
|
-
*/function vn(t,n,e){t.insertBefore(e,t.childNodes[n]||null)}/**
|
|
72
|
-
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
73
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
74
|
-
*/function Cn(t){return t&&t.nodeType===Node.COMMENT_NODE}function Fn(t){try{T.document.createAttribute(t)}catch{return!1}return!0}function Fe(t){return t?tt(t)?Fe(t.parentElement):t.getClientRects?!!t.getClientRects().length:!1:!1}function Mn({element:t,target:n,positions:e,limiter:i,fitInViewport:o,viewportOffsetConfig:s}){st(n)&&(n=n()),st(i)&&(i=i());const r=Dt(t),l=Me(s),a=new y(t),c=bt(n,l);let u;if(!c||!l.getIntersection(c))return null;const h={targetRect:c,elementRect:a,positionedElementAncestor:r,viewportRect:l};if(!i&&!o)u=new Vt(e[0],h);else{if(i){const d=bt(i,l);d&&(h.limiterRect=d)}u=Re(e,h)}return u}function bt(t,n){const e=new y(t).getVisible();return e?e.getIntersection(n):null}function Me(t){t=Object.assign({top:0,bottom:0,left:0,right:0},t);const n=new y(T.window);return n.top+=t.top,n.height-=t.top,n.bottom-=t.bottom,n.height-=t.bottom,n}function Re(t,n){const{elementRect:e}=n,i=e.getArea(),o=t.map(l=>new Vt(l,n)).filter(l=>!!l.name);let s=0,r=null;for(const l of o){const{limiterIntersectionArea:a,viewportIntersectionArea:c}=l;if(a===i)return l;const u=c**2+a**2;u>s&&(s=u,r=l)}return r}class Vt{constructor(n,e){f(this,"name");f(this,"config");f(this,"_positioningFunctionCoordinates");f(this,"_options");f(this,"_cachedRect");f(this,"_cachedAbsoluteRect");const i=n(e.targetRect,e.elementRect,e.viewportRect,e.limiterRect);if(!i)return;const{left:o,top:s,name:r,config:l}=i;this.name=r,this.config=l,this._positioningFunctionCoordinates={left:o,top:s},this._options=e}get left(){return this._absoluteRect.left}get top(){return this._absoluteRect.top}get limiterIntersectionArea(){const n=this._options.limiterRect;return n?n.getIntersectionArea(this._rect):0}get viewportIntersectionArea(){return this._options.viewportRect.getIntersectionArea(this._rect)}get _rect(){return this._cachedRect?this._cachedRect:(this._cachedRect=this._options.elementRect.clone().moveTo(this._positioningFunctionCoordinates.left,this._positioningFunctionCoordinates.top),this._cachedRect)}get _absoluteRect(){return this._cachedAbsoluteRect?this._cachedAbsoluteRect:(this._cachedAbsoluteRect=this._rect.toAbsoluteRect(),this._cachedAbsoluteRect)}}/**
|
|
75
|
-
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
76
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
77
|
-
*/function Rn(t){const n=t.parentNode;n&&n.removeChild(t)}function kn(){const t=T.window.visualViewport;if(!t||!(M.isiOS||M.isSafari))return{left:0,top:0};const n=Math.max(Math.round(t.offsetLeft),0),e=Math.max(Math.round(t.offsetTop),0);return{left:n,top:e}}function Sn({target:t,viewportOffset:n=0,ancestorOffset:e=0,alignToTop:i,forceScroll:o}){const s=nt(t);let r=s,l=null;for(n=Pe(n);r;){let a;r==s?a=_t(t):a=_t(l),Se({parent:a,getRect:()=>U(t,r),alignToTop:i,ancestorOffset:e,forceScroll:o});let c=U(t,r);const u=U(a,r);if(c.height>u.height){const h=c.getIntersection(u);h&&(c=h)}if(ke({window:r,rect:c,viewportOffset:n,alignToTop:i,forceScroll:o}),r.parent!=r){if(l=r.frameElement,r=r.parent,!l)return}else r=null}}function ke({window:t,rect:n,alignToTop:e,forceScroll:i,viewportOffset:o}){const s=n.clone().moveBy(0,o.bottom),r=n.clone().moveBy(0,-o.top),l=new y(t).excludeScrollbarsAndBorders(),a=[r,s],c=e&&i,u=a.every(b=>l.contains(b));let{scrollX:h,scrollY:d}=t;const _=h,m=d;c?d-=l.top-n.top+o.top:u||(Wt(r,l)?d-=l.top-n.top+o.top:jt(s,l)&&(e?d+=n.top-l.top-o.top:d+=n.bottom-l.bottom+o.bottom)),u||(Kt(n,l)?h-=l.left-n.left+o.left:Ht(n,l)&&(h+=n.right-l.right+o.right)),(h!=_||d!==m)&&t.scrollTo(h,d)}function Se({parent:t,getRect:n,alignToTop:e,forceScroll:i,ancestorOffset:o=0,limiterElement:s}){const r=nt(t),l=e&&i;let a,c,u;const h=s||r.document.body;for(;t!=h;)c=n(),a=new y(t).excludeScrollbarsAndBorders(),u=a.contains(c),l?t.scrollTop-=a.top-c.top+o:u||(Wt(c,a)?t.scrollTop-=a.top-c.top+o:jt(c,a)&&(e?t.scrollTop+=c.top-a.top-o:t.scrollTop+=c.bottom-a.bottom+o)),u||(Kt(c,a)?t.scrollLeft-=a.left-c.left+o:Ht(c,a)&&(t.scrollLeft+=c.right-a.right+o)),t=t.parentNode}function jt(t,n){return t.bottom>n.bottom}function Wt(t,n){return t.top<n.top}function Kt(t,n){return t.left<n.left}function Ht(t,n){return t.right>n.right}function nt(t){return et(t)?t.startContainer.ownerDocument.defaultView:t.ownerDocument.defaultView}function _t(t){if(et(t)){let n=t.commonAncestorContainer;return tt(n)&&(n=n.parentNode),n}else return t.parentNode}function U(t,n){const e=nt(t),i=new y(t);if(e===n)return i;{let o=e;for(;o!=n;){const s=o.frameElement,r=new y(s).excludeScrollbarsAndBorders();i.moveBy(r.left,r.top),o=o.parent}}return i}function Pe(t){return typeof t=="number"?{top:t,bottom:t,left:t,right:t}:t}const Ne={ctrl:"⌃",cmd:"⌘",alt:"⌥",shift:"⇧"},Be={ctrl:"Ctrl+",alt:"Alt+",shift:"Shift+"},wt={37:"←",38:"↑",39:"→",40:"↓",9:"⇥",33:"Page Up",34:"Page Down"},w=je(),De=Object.fromEntries(Object.entries(w).map(([t,n])=>{let e;return n in wt?e=wt[n]:e=t.charAt(0).toUpperCase()+t.slice(1),[n,e]}));function O(t){let n;if(typeof t=="string"){if(n=w[t.toLowerCase()],!n)throw new p("keyboard-unknown-key",null,{key:t})}else n=t.keyCode+(t.altKey?w.alt:0)+(t.ctrlKey?w.ctrl:0)+(t.shiftKey?w.shift:0)+(t.metaKey?w.cmd:0);return n}function Ut(t){return typeof t=="string"&&(t=We(t)),t.map(n=>typeof n=="string"?Ve(n):n).reduce((n,e)=>e+n,0)}function Pn(t,n){let e=Ut(t);const i=M.isMac||M.isiOS;return Object.entries(i?Ne:Be).reduce((r,[l,a])=>((e&w[l])!=0&&(e&=~w[l],r+=a),r),"")+(e?De[e]:"")}function Nn(t){return t==w.arrowright||t==w.arrowleft||t==w.arrowup||t==w.arrowdown}function Oe(t,n){const e=n==="ltr";switch(t){case w.arrowleft:return e?"left":"right";case w.arrowright:return e?"right":"left";case w.arrowup:return"up";case w.arrowdown:return"down"}}function Ve(t){if(t.endsWith("!"))return O(t.slice(0,-1));const n=O(t);return(M.isMac||M.isiOS)&&n==w.ctrl?w.cmd:n}function Bn(t,n){const e=Oe(t,n);return e==="down"||e==="right"}function je(){const t={pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,backspace:8,delete:46,enter:13,space:32,esc:27,tab:9,ctrl:1114112,shift:2228224,alt:4456448,cmd:8912896};for(let n=65;n<=90;n++){const e=String.fromCharCode(n);t[e.toLowerCase()]=n}for(let n=48;n<=57;n++)t[n-48]=n;for(let n=112;n<=123;n++)t["f"+(n-111)]=n;return Object.assign(t,{"'":222,",":108,"-":109,".":110,"/":111,";":186,"=":187,"[":219,"\\":220,"]":221,"`":223}),t}function We(t){return t.split("+").map(n=>n.trim())}/**
|
|
78
|
-
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
79
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
80
|
-
*/const Ke=["ar","ara","dv","div","fa","per","fas","he","heb","ku","kur","ug","uig","ur","urd"];function yt(t){return Ke.includes(t)?"rtl":"ltr"}/**
|
|
81
|
-
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
82
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
83
|
-
*/function He(t){return Array.isArray(t)?t:[t]}/* istanbul ignore else -- @preserve */T.window.CKEDITOR_TRANSLATIONS||(T.window.CKEDITOR_TRANSLATIONS={});function Ue(t,n,e=1,i){if(typeof e!="number")throw new p("translation-service-quantity-not-a-number",null,{quantity:e});const o=i||T.window.CKEDITOR_TRANSLATIONS,s=Ye(o);s===1&&(t=Object.keys(o)[0]);const r=n.id||n.string;if(s===0||!$e(t,r,o))return e!==1?n.plural:n.string;const l=o[t].dictionary,a=o[t].getPluralForm||(h=>h===1?0:1),c=l[r];if(typeof c=="string")return c;const u=Number(a(e));return c[u]}function Ge(t){return Array.isArray(t)?t.reduce((n,e)=>zt(n,e)):t}function $e(t,n,e){return!!e[t]&&!!e[t].dictionary[n]}function Ye(t){return Object.keys(t).length}class Dn{constructor({uiLanguage:n="en",contentLanguage:e,translations:i}={}){f(this,"uiLanguage");f(this,"uiLanguageDirection");f(this,"contentLanguage");f(this,"contentLanguageDirection");f(this,"t");f(this,"translations");this.uiLanguage=n,this.contentLanguage=e||this.uiLanguage,this.uiLanguageDirection=yt(this.uiLanguage),this.contentLanguageDirection=yt(this.contentLanguage),this.translations=Ge(i),this.t=(o,s)=>this._t(o,s)}get language(){return console.warn("locale-deprecated-language-property: The Locale#language property has been deprecated and will be removed in the near future. Please use #uiLanguage and #contentLanguage properties instead."),this.uiLanguage}_t(n,e=[]){e=He(e),typeof n=="string"&&(n={string:n});const o=!!n.plural?e[0]:1,s=Ue(this.uiLanguage,n,o,this.translations);return qe(s,e)}}function qe(t,n){return t.replace(/%(\d+)/g,(e,i)=>i<n.length?n[i]:e)}class On extends L(){constructor(e={},i={}){super();f(this,"_items");f(this,"_itemMap");f(this,"_idProperty");f(this,"_bindToCollection");f(this,"_bindToExternalToInternalMap");f(this,"_bindToInternalToExternalMap");f(this,"_skippedIndexesFromExternal");const o=Z(e);if(o||(i=e),this._items=[],this._itemMap=new Map,this._idProperty=i.idProperty||"id",this._bindToExternalToInternalMap=new WeakMap,this._bindToInternalToExternalMap=new WeakMap,this._skippedIndexesFromExternal=[],o)for(const s of e)this._items.push(s),this._itemMap.set(this._getItemIdBeforeAdding(s),s)}get length(){return this._items.length}get first(){return this._items[0]||null}get last(){return this._items[this.length-1]||null}add(e,i){return this.addMany([e],i)}addMany(e,i){if(i===void 0)i=this._items.length;else if(i>this._items.length||i<0)throw new p("collection-add-item-invalid-index",this);let o=0;for(const s of e){const r=this._getItemIdBeforeAdding(s),l=i+o;this._items.splice(l,0,s),this._itemMap.set(r,s),this.fire("add",s,l),o++}return this.fire("change",{added:e,removed:[],index:i}),this}get(e){let i;if(typeof e=="string")i=this._itemMap.get(e);else if(typeof e=="number")i=this._items[e];else throw new p("collection-get-invalid-arg",this);return i||null}has(e){if(typeof e=="string")return this._itemMap.has(e);{const i=this._idProperty,o=e[i];return o&&this._itemMap.has(o)}}getIndex(e){let i;return typeof e=="string"?i=this._itemMap.get(e):i=e,i?this._items.indexOf(i):-1}remove(e){const[i,o]=this._remove(e);return this.fire("change",{added:[],removed:[i],index:o}),i}map(e,i){return this._items.map(e,i)}forEach(e,i){this._items.forEach(e,i)}find(e,i){return this._items.find(e,i)}filter(e,i){return this._items.filter(e,i)}clear(){this._bindToCollection&&(this.stopListening(this._bindToCollection),this._bindToCollection=null);const e=Array.from(this._items);for(;this.length;)this._remove(0);this.fire("change",{added:[],removed:e,index:0})}bindTo(e){if(this._bindToCollection)throw new p("collection-bind-to-rebind",this);return this._bindToCollection=e,{as:i=>{this._setUpBindToBinding(o=>new i(o))},using:i=>{typeof i=="function"?this._setUpBindToBinding(i):this._setUpBindToBinding(o=>o[i])}}}_setUpBindToBinding(e){const i=this._bindToCollection,o=(s,r,l)=>{const a=i._bindToCollection==this,c=i._bindToInternalToExternalMap.get(r);if(a&&c)this._bindToExternalToInternalMap.set(r,c),this._bindToInternalToExternalMap.set(c,r);else{const u=e(r);if(!u){this._skippedIndexesFromExternal.push(l);return}let h=l;for(const d of this._skippedIndexesFromExternal)l>d&&h--;for(const d of i._skippedIndexesFromExternal)h>=d&&h++;this._bindToExternalToInternalMap.set(r,u),this._bindToInternalToExternalMap.set(u,r),this.add(u,h);for(let d=0;d<i._skippedIndexesFromExternal.length;d++)h<=i._skippedIndexesFromExternal[d]&&i._skippedIndexesFromExternal[d]++}};for(const s of i)o(null,s,i.getIndex(s));this.listenTo(i,"add",o),this.listenTo(i,"remove",(s,r,l)=>{const a=this._bindToExternalToInternalMap.get(r);a&&this.remove(a),this._skippedIndexesFromExternal=this._skippedIndexesFromExternal.reduce((c,u)=>(l<u&&c.push(u-1),l>u&&c.push(u),c),[])})}_getItemIdBeforeAdding(e){const i=this._idProperty;let o;if(i in e){if(o=e[i],typeof o!="string")throw new p("collection-add-invalid-id",this);if(this.get(o))throw new p("collection-add-item-already-exists",this)}else e[i]=o=J();return o}_remove(e){let i,o,s,r=!1;const l=this._idProperty;if(typeof e=="string"?(o=e,s=this._itemMap.get(o),r=!s,s&&(i=this._items.indexOf(s))):typeof e=="number"?(i=e,s=this._items[i],r=!s,s&&(o=s[l])):(s=e,o=s[l],i=this._items.indexOf(s),r=i==-1||!this._itemMap.get(o)),r)throw new p("collection-remove-404",this);this._items.splice(i,1),this._itemMap.delete(o);const a=this._bindToInternalToExternalMap.get(s);return this._bindToInternalToExternalMap.delete(s),this._bindToExternalToInternalMap.delete(a),this.fire("remove",s,i),[s,i]}[Symbol.iterator](){return this._items[Symbol.iterator]()}}/**
|
|
84
|
-
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
85
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
86
|
-
*/function Vn(t){const n=t.next();return n.done?null:n.value}class ze extends V(Q()){constructor(){super();f(this,"_elements",new Set);f(this,"_externalViews",new Set);f(this,"_blurTimeout",null);this.set("isFocused",!1),this.set("focusedElement",null)}get elements(){return Array.from(this._elements.values())}get externalViews(){return Array.from(this._externalViews.values())}add(e){if(Tt(e))this._addElement(e);else if(Et(e))this._addView(e);else{if(!e.element)throw new p("focustracker-add-view-missing-element",{focusTracker:this,view:e});this._addElement(e.element)}}remove(e){Tt(e)?this._removeElement(e):Et(e)?this._removeView(e):this._removeElement(e.element)}_addElement(e){if(this._elements.has(e))throw new p("focustracker-add-element-already-exist",this);this.listenTo(e,"focus",()=>{const i=this.externalViews.find(o=>Xe(e,o));i?this._focus(i.element):this._focus(e)},{useCapture:!0}),this.listenTo(e,"blur",()=>{this._blur()},{useCapture:!0}),this._elements.add(e)}_removeElement(e){this._elements.has(e)&&(this.stopListening(e),this._elements.delete(e)),e===this.focusedElement&&this._blur()}_addView(e){e.element&&this._addElement(e.element),this.listenTo(e.focusTracker,"change:focusedElement",()=>{e.focusTracker.focusedElement?e.element&&this._focus(e.element):this._blur()}),this._externalViews.add(e)}_removeView(e){e.element&&this._removeElement(e.element),this.stopListening(e.focusTracker),this._externalViews.delete(e)}destroy(){this.stopListening(),this._elements.clear(),this._externalViews.clear(),this.isFocused=!1,this.focusedElement=null}_focus(e){this._clearBlurTimeout(),this.focusedElement=e,this.isFocused=!0}_blur(){this.elements.find(o=>o.contains(document.activeElement))||this.externalViews.find(o=>o.focusTracker.isFocused&&!o.focusTracker._blurTimeout)||(this._clearBlurTimeout(),this._blurTimeout=setTimeout(()=>{this.focusedElement=null,this.isFocused=!1},0))}_clearBlurTimeout(){clearTimeout(this._blurTimeout),this._blurTimeout=null}}function Et(t){return"focusTracker"in t&&t.focusTracker instanceof ze}function Tt(t){return It(t)}function Xe(t,n){return xt(t,n)?!0:!!n.focusTracker.externalViews.find(e=>xt(t,e))}function xt(t,n){return!!n.element&&n.element.contains(document.activeElement)&&t.contains(n.element)}class jn{constructor(){f(this,"_listener");this._listener=new(V())}listenTo(n){this._listener.listenTo(n,"keydown",(e,i)=>{this._listener.fire("_keydown:"+O(i),i)})}set(n,e,i={}){const o=Ut(n),s=i.priority;this._listener.listenTo(this._listener,"_keydown:"+o,(r,l)=>{i.filter&&!i.filter(l)||(e(l,()=>{l.preventDefault(),l.stopPropagation(),r.stop()}),r.return=!0)},{priority:s})}press(n){return!!this._listener.fire("_keydown:"+O(n),n)}stopListening(n){this._listener.stopListening(n)}destroy(){this.stopListening()}}/**
|
|
87
|
-
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
88
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
89
|
-
*/function Je(t){const n=new Map;for(const e in t)n.set(e,t[e]);return n}function Wn(t){return Z(t)?new Map(t):Je(t)}/**
|
|
90
|
-
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
91
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
92
|
-
*/function Kn(t,n,e){const i=t.length,o=n.length;for(let s=i-1;s>=e;s--)t[s+o]=t[s];for(let s=0;s<o;s++)t[e+s]=n[s]}/**
|
|
93
|
-
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
94
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
95
|
-
*/function Hn(t,n){let e;function i(...o){i.cancel(),e=setTimeout(()=>t(...o),n)}return i.cancel=()=>{clearTimeout(e)},i}/**
|
|
96
|
-
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
97
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
98
|
-
*/function Un(t){try{if(!t.startsWith("ey"))return null;const n=atob(t.replace(/-/g,"+").replace(/_/g,"/"));return JSON.parse(n)}catch{return null}}/**
|
|
99
|
-
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
100
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
101
|
-
*/function Qe(){const t=[];for(let n=0;n<256;n++){let e=n;for(let i=0;i<8;i++)e&1?e=3988292384^e>>>1:e=e>>>1;t[n]=e}return t}function Gn(t){const n=Array.isArray(t)?t:[t],e=Qe();let i=-1;const o=n.map(s=>Array.isArray(s)?s.join(""):String(s)).join("");for(let s=0;s<o.length;s++){const r=o.charCodeAt(s);i=i>>>8^e[(i^r)&255]}return i=(i^-1)>>>0,i.toString(16).padStart(8,"0")}/**
|
|
102
|
-
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
103
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
104
|
-
*/function Ze(t){return!!t&&t.length==1&&/[\u0300-\u036f\u1ab0-\u1aff\u1dc0-\u1dff\u20d0-\u20ff\ufe20-\ufe2f]/.test(t)}function tn(t){return!!t&&t.length==1&&/[\ud800-\udbff]/.test(t)}function en(t){return!!t&&t.length==1&&/[\udc00-\udfff]/.test(t)}function $n(t,n){return tn(t.charAt(n-1))&&en(t.charAt(n))}function Yn(t,n){return Ze(t.charAt(n))}const nn=on();function qn(t,n){const e=String(t).matchAll(nn);return Array.from(e).some(i=>i.index<n&&n<i.index+i[0].length)}function on(){const t=[new RegExp("\\p{Emoji}[\\u{E0020}-\\u{E007E}]+\\u{E007F}","u"),new RegExp("\\p{Emoji}\\u{FE0F}?\\u{20E3}","u"),new RegExp("\\p{Emoji}\\u{FE0F}","u"),new RegExp("(?=\\p{General_Category=Other_Symbol})\\p{Emoji}\\p{Emoji_Modifier}*","u")],n=new RegExp("\\p{Regional_Indicator}{2}","u").source,e="(?:"+t.map(o=>o.source).join("|")+")",i=`${n}|${e}(?:${e})*`;return new RegExp(i,"ug")}export{p as CKEditorError,On as Collection,yn as Config,V as DomEmitterMixin,mn as ElementReplacer,L as EmitterMixin,$ as EventInfo,ze as FocusTracker,jn as KeystrokeHandler,Dn as Locale,Q as ObservableMixin,y as Rect,mt as ResizeObserver,_n as compareArrays,bn as count,Gn as crc32,wn as createElement,Hn as delay,At as diff,M as env,oe as fastDiff,Vn as first,En as getAncestors,Bt as getBorderWidths,O as getCode,Tn as getDataFromElement,Pn as getEnvKeystrokeText,yt as getLanguageDirection,Oe as getLocalizedArrowKeyCodeDirection,Mn as getOptimalPosition,xn as getRangeFromMouseEvent,kn as getVisualViewportOffset,T as global,An as indexOf,vn as insertAt,le as insertToPriorityArray,Nn as isArrowKeyCode,Ze as isCombiningMark,Cn as isComment,Bn as isForwardArrowKeyCode,tn as isHighSurrogateHalf,Yn as isInsideCombinedSymbol,qn as isInsideEmojiSequence,$n as isInsideSurrogatePair,Z as isIterable,en as isLowSurrogateHalf,dt as isNode,et as isRange,tt as isText,Fn as isValidAttributeName,Et as isViewWithFocusTracker,Fe as isVisible,w as keyCodes,pn as logError,dn as logWarning,Un as parseBase64EncodedObject,Ut as parseKeystroke,Y as priorities,gn as releaseDate,Rn as remove,Sn as scrollViewportToShowTarget,In as setDataInElement,Kn as spliceArray,He as toArray,Wn as toMap,Ln as toUnit,J as uid,fe as version};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{getSideAxis as L,getAlignmentAxis as H,getSide as F,getAlignment as C,getAxisLength as J,evaluate as _,getOppositePlacement as K,getExpandedPlacements as N,getOppositeAxisPlacements as Q,getAlignmentSides as q,getPaddingObject as U,rectToClientRect as I,placements as X,getOppositeAlignmentPlacement as W}from"../../../../../@floating-ui_utils@0.2.9/node_modules/@floating-ui/utils/dist/floating-ui.utils.js";function Y(n,l,f){let{reference:t,floating:e}=n;const i=L(l),c=H(l),a=J(c),w=F(l),p=i==="y",g=t.x+t.width/2-e.width/2,r=t.y+t.height/2-e.height/2,d=t[a]/2-e[a]/2;let o;switch(w){case"top":o={x:g,y:t.y-e.height};break;case"bottom":o={x:g,y:t.y+t.height};break;case"right":o={x:t.x+t.width,y:r};break;case"left":o={x:t.x-e.width,y:r};break;default:o={x:t.x,y:t.y}}switch(C(l)){case"start":o[c]-=d*(f&&p?-1:1);break;case"end":o[c]+=d*(f&&p?-1:1);break}return o}const te=async(n,l,f)=>{const{placement:t="bottom",strategy:e="absolute",middleware:i=[],platform:c}=f,a=i.filter(Boolean),w=await(c.isRTL==null?void 0:c.isRTL(l));let p=await c.getElementRects({reference:n,floating:l,strategy:e}),{x:g,y:r}=Y(p,t,w),d=t,o={},x=0;for(let h=0;h<a.length;h++){const{name:y,fn:v}=a[h],{x:u,y:P,data:b,reset:s}=await v({x:g,y:r,initialPlacement:t,placement:d,strategy:e,middlewareData:o,rects:p,platform:c,elements:{reference:n,floating:l}});g=u??g,r=P??r,o={...o,[y]:{...o[y],...b}},s&&x<=50&&(x++,typeof s=="object"&&(s.placement&&(d=s.placement),s.rects&&(p=s.rects===!0?await c.getElementRects({reference:n,floating:l,strategy:e}):s.rects),{x:g,y:r}=Y(p,d,w)),h=-1)}return{x:g,y:r,placement:d,strategy:e,middlewareData:o}};async function z(n,l){var f;l===void 0&&(l={});const{x:t,y:e,platform:i,rects:c,elements:a,strategy:w}=n,{boundary:p="clippingAncestors",rootBoundary:g="viewport",elementContext:r="floating",altBoundary:d=!1,padding:o=0}=_(l,n),x=U(o),y=a[d?r==="floating"?"reference":"floating":r],v=I(await i.getClippingRect({element:(f=await(i.isElement==null?void 0:i.isElement(y)))==null||f?y:y.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:p,rootBoundary:g,strategy:w})),u=r==="floating"?{x:t,y:e,width:c.floating.width,height:c.floating.height}:c.reference,P=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),b=await(i.isElement==null?void 0:i.isElement(P))?await(i.getScale==null?void 0:i.getScale(P))||{x:1,y:1}:{x:1,y:1},s=I(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:u,offsetParent:P,strategy:w}):u);return{top:(v.top-s.top+x.top)/b.y,bottom:(s.bottom-v.bottom+x.bottom)/b.y,left:(v.left-s.left+x.left)/b.x,right:(s.right-v.right+x.right)/b.x}}function Z(n,l,f){return(n?[...f.filter(e=>C(e)===n),...f.filter(e=>C(e)!==n)]:f.filter(e=>F(e)===e)).filter(e=>n?C(e)===n||(l?W(e)!==e:!1):!0)}const ne=function(n){return n===void 0&&(n={}),{name:"autoPlacement",options:n,async fn(l){var f,t,e;const{rects:i,middlewareData:c,placement:a,platform:w,elements:p}=l,{crossAxis:g=!1,alignment:r,allowedPlacements:d=X,autoAlignment:o=!0,...x}=_(n,l),h=r!==void 0||d===X?Z(r||null,o,d):d,y=await z(l,x),v=((f=c.autoPlacement)==null?void 0:f.index)||0,u=h[v];if(u==null)return{};const P=q(u,i,await(w.isRTL==null?void 0:w.isRTL(p.floating)));if(a!==u)return{reset:{placement:h[0]}};const b=[y[F(u)],y[P[0]],y[P[1]]],s=[...((t=c.autoPlacement)==null?void 0:t.overflows)||[],{placement:u,overflows:b}],T=h[v+1];if(T)return{data:{index:v+1,overflows:s},reset:{placement:T}};const B=s.map(m=>{const O=C(m.placement);return[m.placement,O&&g?m.overflows.slice(0,2).reduce((j,M)=>j+M,0):m.overflows[0],m.overflows]}).sort((m,O)=>m[1]-O[1]),S=((e=B.filter(m=>m[2].slice(0,C(m[0])?2:3).every(O=>O<=0))[0])==null?void 0:e[0])||B[0][0];return S!==a?{data:{index:v+1,overflows:s},reset:{placement:S}}:{}}}},le=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(l){var f,t;const{placement:e,middlewareData:i,rects:c,initialPlacement:a,platform:w,elements:p}=l,{mainAxis:g=!0,crossAxis:r=!0,fallbackPlacements:d,fallbackStrategy:o="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:h=!0,...y}=_(n,l);if((f=i.arrow)!=null&&f.alignmentOffset)return{};const v=F(e),u=L(a),P=F(a)===a,b=await(w.isRTL==null?void 0:w.isRTL(p.floating)),s=d||(P||!h?[K(a)]:N(a)),T=x!=="none";!d&&T&&s.push(...Q(a,h,x,b));const B=[a,...s],$=await z(l,y),S=[];let m=((t=i.flip)==null?void 0:t.overflows)||[];if(g&&S.push($[v]),r){const k=q(e,c,b);S.push($[k[0]],$[k[1]])}if(m=[...m,{placement:e,overflows:S}],!S.every(k=>k<=0)){var O,j;const k=(((O=i.flip)==null?void 0:O.index)||0)+1,V=B[k];if(V&&(!(r==="alignment"?u!==L(V):!1)||m.every(A=>A.overflows[0]>0&&L(A.placement)===u)))return{data:{index:k,overflows:m},reset:{placement:V}};let D=(j=m.filter(E=>E.overflows[0]<=0).sort((E,A)=>E.overflows[1]-A.overflows[1])[0])==null?void 0:j.placement;if(!D)switch(o){case"bestFit":{var M;const E=(M=m.filter(A=>{if(T){const R=L(A.placement);return R===u||R==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(R=>R>0).reduce((R,G)=>R+G,0)]).sort((A,R)=>A[1]-R[1])[0])==null?void 0:M[0];E&&(D=E);break}case"initialPlacement":D=a;break}if(e!==D)return{reset:{placement:D}}}return{}}}};export{ne as autoPlacement,te as computePosition,z as detectOverflow,le as flip,I as rectToClientRect};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{computePosition as ot,flip as st,autoPlacement as rt}from"../../../../../@floating-ui_core@1.7.1/node_modules/@floating-ui/core/dist/floating-ui.core.js";import{createCoords as w,rectToClientRect as J,floor as A,max as E,round as H,min as z}from"../../../../../@floating-ui_utils@0.2.9/node_modules/@floating-ui/utils/dist/floating-ui.utils.js";import{getOverflowAncestors as M,isElement as v,getDocumentElement as O,getWindow as L,getFrameElement as K,getComputedStyle as R,isHTMLElement as b,isWebKit as Q,isTopLayer as S,getParentNode as W,isLastTraversableNode as N,isTableElement as ct,isContainingBlock as Y,getContainingBlock as lt,getNodeName as _,isOverflowElement as P,getNodeScroll as I}from"../../../../../@floating-ui_utils@0.2.9/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js";function Z(t){const e=R(t);let n=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const o=b(t),r=o?t.offsetWidth:n,s=o?t.offsetHeight:i,c=H(n)!==r||H(i)!==s;return c&&(n=r,i=s),{width:n,height:i,$:c}}function $(t){return v(t)?t:t.contextElement}function F(t){const e=$(t);if(!b(e))return w(1);const n=e.getBoundingClientRect(),{width:i,height:o,$:r}=Z(e);let s=(r?H(n.width):n.width)/i,c=(r?H(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}const ft=w(0);function X(t){const e=L(t);return!Q()||!e.visualViewport?ft:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function ut(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==L(t)?!1:e}function T(t,e,n,i){e===void 0&&(e=!1),n===void 0&&(n=!1);const o=t.getBoundingClientRect(),r=$(t);let s=w(1);e&&(i?v(i)&&(s=F(i)):s=F(t));const c=ut(r,n,i)?X(r):w(0);let l=(o.left+c.x)/s.x,f=(o.top+c.y)/s.y,u=o.width/s.x,h=o.height/s.y;if(r){const p=L(r),a=i&&v(i)?L(i):i;let y=p,g=K(y);for(;g&&i&&a!==y;){const m=F(g),d=g.getBoundingClientRect(),x=R(g),C=d.left+(g.clientLeft+parseFloat(x.paddingLeft))*m.x,B=d.top+(g.clientTop+parseFloat(x.paddingTop))*m.y;l*=m.x,f*=m.y,u*=m.x,h*=m.y,l+=C,f+=B,y=L(g),g=K(y)}}return J({width:u,height:h,x:l,y:f})}function q(t,e){const n=I(t).scrollLeft;return e?e.left+n:T(O(t)).left+n}function tt(t,e,n){n===void 0&&(n=!1);const i=t.getBoundingClientRect(),o=i.left+e.scrollLeft-(n?0:q(t,i)),r=i.top+e.scrollTop;return{x:o,y:r}}function ht(t){let{elements:e,rect:n,offsetParent:i,strategy:o}=t;const r=o==="fixed",s=O(i),c=e?S(e.floating):!1;if(i===s||c&&r)return n;let l={scrollLeft:0,scrollTop:0},f=w(1);const u=w(0),h=b(i);if((h||!h&&!r)&&((_(i)!=="body"||P(s))&&(l=I(i)),b(i))){const a=T(i);f=F(i),u.x=a.x+i.clientLeft,u.y=a.y+i.clientTop}const p=s&&!h&&!r?tt(s,l,!0):w(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-l.scrollLeft*f.x+u.x+p.x,y:n.y*f.y-l.scrollTop*f.y+u.y+p.y}}function at(t){return Array.from(t.getClientRects())}function dt(t){const e=O(t),n=I(t),i=t.ownerDocument.body,o=E(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),r=E(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let s=-n.scrollLeft+q(t);const c=-n.scrollTop;return R(i).direction==="rtl"&&(s+=E(e.clientWidth,i.clientWidth)-o),{width:o,height:r,x:s,y:c}}function gt(t,e){const n=L(t),i=O(t),o=n.visualViewport;let r=i.clientWidth,s=i.clientHeight,c=0,l=0;if(o){r=o.width,s=o.height;const f=Q();(!f||f&&e==="fixed")&&(c=o.offsetLeft,l=o.offsetTop)}return{width:r,height:s,x:c,y:l}}function pt(t,e){const n=T(t,!0,e==="fixed"),i=n.top+t.clientTop,o=n.left+t.clientLeft,r=b(t)?F(t):w(1),s=t.clientWidth*r.x,c=t.clientHeight*r.y,l=o*r.x,f=i*r.y;return{width:s,height:c,x:l,y:f}}function j(t,e,n){let i;if(e==="viewport")i=gt(t,n);else if(e==="document")i=dt(O(t));else if(v(e))i=pt(e,n);else{const o=X(t);i={x:e.x-o.x,y:e.y-o.y,width:e.width,height:e.height}}return J(i)}function et(t,e){const n=W(t);return n===e||!v(n)||N(n)?!1:R(n).position==="fixed"||et(n,e)}function mt(t,e){const n=e.get(t);if(n)return n;let i=M(t,[],!1).filter(c=>v(c)&&_(c)!=="body"),o=null;const r=R(t).position==="fixed";let s=r?W(t):t;for(;v(s)&&!N(s);){const c=R(s),l=Y(s);!l&&c.position==="fixed"&&(o=null),(r?!l&&!o:!l&&c.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||P(s)&&!l&&et(t,s))?i=i.filter(u=>u!==s):o=c,s=W(s)}return e.set(t,i),i}function wt(t){let{element:e,boundary:n,rootBoundary:i,strategy:o}=t;const s=[...n==="clippingAncestors"?S(e)?[]:mt(e,this._c):[].concat(n),i],c=s[0],l=s.reduce((f,u)=>{const h=j(e,u,o);return f.top=E(h.top,f.top),f.right=z(h.right,f.right),f.bottom=z(h.bottom,f.bottom),f.left=E(h.left,f.left),f},j(e,c,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function yt(t){const{width:e,height:n}=Z(t);return{width:e,height:n}}function xt(t,e,n){const i=b(e),o=O(e),r=n==="fixed",s=T(t,!0,r,e);let c={scrollLeft:0,scrollTop:0};const l=w(0);function f(){l.x=q(o)}if(i||!i&&!r)if((_(e)!=="body"||P(o))&&(c=I(e)),i){const a=T(e,!0,r,e);l.x=a.x+e.clientLeft,l.y=a.y+e.clientTop}else o&&f();r&&!i&&o&&f();const u=o&&!i&&!r?tt(o,c):w(0),h=s.left+c.scrollLeft-l.x-u.x,p=s.top+c.scrollTop-l.y-u.y;return{x:h,y:p,width:s.width,height:s.height}}function V(t){return R(t).position==="static"}function G(t,e){if(!b(t)||R(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return O(t)===n&&(n=n.ownerDocument.body),n}function nt(t,e){const n=L(t);if(S(t))return n;if(!b(t)){let o=W(t);for(;o&&!N(o);){if(v(o)&&!V(o))return o;o=W(o)}return n}let i=G(t,e);for(;i&&ct(i)&&V(i);)i=G(i,e);return i&&N(i)&&V(i)&&!Y(i)?n:i||lt(t)||n}const vt=async function(t){const e=this.getOffsetParent||nt,n=this.getDimensions,i=await n(t.floating);return{reference:xt(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Rt(t){return R(t).direction==="rtl"}const Ot={convertOffsetParentRelativeRectToViewportRelativeRect:ht,getDocumentElement:O,getClippingRect:wt,getOffsetParent:nt,getElementRects:vt,getClientRects:at,getDimensions:yt,getScale:F,isElement:v,isRTL:Rt};function it(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function bt(t,e){let n=null,i;const o=O(t);function r(){var c;clearTimeout(i),(c=n)==null||c.disconnect(),n=null}function s(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),r();const f=t.getBoundingClientRect(),{left:u,top:h,width:p,height:a}=f;if(c||e(),!p||!a)return;const y=A(h),g=A(o.clientWidth-(u+p)),m=A(o.clientHeight-(h+a)),d=A(u),C={rootMargin:-y+"px "+-g+"px "+-m+"px "+-d+"px",threshold:E(0,z(1,l))||1};let B=!0;function k(U){const D=U[0].intersectionRatio;if(D!==l){if(!B)return s();D?s(!1,D):i=setTimeout(()=>{s(!1,1e-7)},1e3)}D===1&&!it(f,t.getBoundingClientRect())&&s(),B=!1}try{n=new IntersectionObserver(k,{...C,root:o.ownerDocument})}catch{n=new IntersectionObserver(k,C)}n.observe(t)}return s(!0),r}function Et(t,e,n,i){i===void 0&&(i={});const{ancestorScroll:o=!0,ancestorResize:r=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=i,f=$(t),u=o||r?[...f?M(f):[],...M(e)]:[];u.forEach(d=>{o&&d.addEventListener("scroll",n,{passive:!0}),r&&d.addEventListener("resize",n)});const h=f&&c?bt(f,n):null;let p=-1,a=null;s&&(a=new ResizeObserver(d=>{let[x]=d;x&&x.target===f&&a&&(a.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var C;(C=a)==null||C.observe(e)})),n()}),f&&!l&&a.observe(f),a.observe(e));let y,g=l?T(t):null;l&&m();function m(){const d=T(t);g&&!it(g,d)&&n(),g=d,y=requestAnimationFrame(m)}return n(),()=>{var d;u.forEach(x=>{o&&x.removeEventListener("scroll",n),r&&x.removeEventListener("resize",n)}),h==null||h(),(d=a)==null||d.disconnect(),a=null,l&&cancelAnimationFrame(y)}}const Ft=rt,Wt=st,Bt=(t,e,n)=>{const i=new Map,o={platform:Ot,...n},r={...o.platform,_c:i};return ot(t,e,{...o,platform:r})};export{Ft as autoPlacement,Et as autoUpdate,Bt as computePosition,Wt as flip,M as getOverflowAncestors,Ot as platform};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function c(){return typeof window<"u"}function s(n){return p(n)?(n.nodeName||"").toLowerCase():"#document"}function i(n){var t;return(n==null||(t=n.ownerDocument)==null?void 0:t.defaultView)||window}function E(n){var t;return(t=(p(n)?n.ownerDocument:n.document)||window.document)==null?void 0:t.documentElement}function p(n){return c()?n instanceof Node||n instanceof i(n).Node:!1}function m(n){return c()?n instanceof Element||n instanceof i(n).Element:!1}function w(n){return c()?n instanceof HTMLElement||n instanceof i(n).HTMLElement:!1}function a(n){return!c()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof i(n).ShadowRoot}function y(n){const{overflow:t,overflowX:e,overflowY:o,display:r}=b(n);return/auto|scroll|overlay|hidden|clip/.test(t+o+e)&&!["inline","contents"].includes(r)}function D(n){return["table","td","th"].includes(s(n))}function N(n){return[":popover-open",":modal"].some(t=>{try{return n.matches(t)}catch{return!1}})}function T(n){const t=L(),e=m(n)?b(n):n;return["transform","translate","scale","rotate","perspective"].some(o=>e[o]?e[o]!=="none":!1)||(e.containerType?e.containerType!=="normal":!1)||!t&&(e.backdropFilter?e.backdropFilter!=="none":!1)||!t&&(e.filter?e.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(o=>(e.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(e.contain||"").includes(o))}function k(n){let t=u(n);for(;w(t)&&!g(t);){if(T(t))return t;if(N(t))return null;t=u(t)}return null}function L(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function g(n){return["html","body","#document"].includes(s(n))}function b(n){return i(n).getComputedStyle(n)}function C(n){return m(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function u(n){if(s(n)==="html")return n;const t=n.assignedSlot||n.parentNode||a(n)&&n.host||E(n);return a(t)?t.host:t}function h(n){const t=u(n);return g(t)?n.ownerDocument?n.ownerDocument.body:n.body:w(t)&&y(t)?t:h(t)}function d(n,t,e){var o;t===void 0&&(t=[]),e===void 0&&(e=!0);const r=h(n),S=r===((o=n.ownerDocument)==null?void 0:o.body),l=i(r);if(S){const f=v(l);return t.concat(l,l.visualViewport||[],y(r)?r:[],f&&e?d(f):[])}return t.concat(r,d(r,[],e))}function v(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}export{b as getComputedStyle,k as getContainingBlock,E as getDocumentElement,v as getFrameElement,h as getNearestOverflowAncestor,s as getNodeName,C as getNodeScroll,d as getOverflowAncestors,u as getParentNode,i as getWindow,T as isContainingBlock,m as isElement,w as isHTMLElement,g as isLastTraversableNode,p as isNode,y as isOverflowElement,a as isShadowRoot,D as isTableElement,N as isTopLayer,L as isWebKit};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const a=["top","right","bottom","left"],u=["start","end"],P=a.reduce((t,n)=>t.concat(n,n+"-"+u[0],n+"-"+u[1]),[]),M=Math.min,O=Math.max,S=Math.round,w=Math.floor,j=t=>({x:t,y:t}),m={left:"right",right:"left",bottom:"top",top:"bottom"},p={start:"end",end:"start"};function C(t,n){return typeof t=="function"?t(n):t}function g(t){return t.split("-")[0]}function l(t){return t.split("-")[1]}function h(t){return t==="x"?"y":"x"}function b(t){return t==="y"?"height":"width"}function x(t){return["top","bottom"].includes(g(t))?"y":"x"}function d(t){return h(x(t))}function L(t,n,e){e===void 0&&(e=!1);const r=l(t),o=d(t),i=b(o);let c=o==="x"?r===(e?"end":"start")?"right":"left":r==="start"?"bottom":"top";return n.reference[i]>n.floating[i]&&(c=f(c)),[c,f(c)]}function E(t){const n=f(t);return[s(t),n,s(n)]}function s(t){return t.replace(/start|end/g,n=>p[n])}function A(t,n,e){const r=["left","right"],o=["right","left"],i=["top","bottom"],c=["bottom","top"];switch(t){case"top":case"bottom":return e?n?o:r:n?r:o;case"left":case"right":return n?i:c;default:return[]}}function R(t,n,e,r){const o=l(t);let i=A(g(t),e==="start",r);return o&&(i=i.map(c=>c+"-"+o),n&&(i=i.concat(i.map(s)))),i}function f(t){return t.replace(/left|right|bottom|top/g,n=>m[n])}function y(t){return{top:0,right:0,bottom:0,left:0,...t}}function T(t){return typeof t!="number"?y(t):{top:t,right:t,bottom:t,left:t}}function k(t){const{x:n,y:e,width:r,height:o}=t;return{width:r,height:o,top:e,left:n,right:n+r,bottom:e+o,x:n,y:e}}export{u as alignments,j as createCoords,C as evaluate,y as expandPaddingObject,w as floor,l as getAlignment,d as getAlignmentAxis,L as getAlignmentSides,b as getAxisLength,E as getExpandedPlacements,s as getOppositeAlignmentPlacement,h as getOppositeAxis,R as getOppositeAxisPlacements,f as getOppositePlacement,T as getPaddingObject,g as getSide,x as getSideAxis,O as max,M as min,P as placements,k as rectToClientRect,S as round,a as sides};
|