@hkyhy/marsun-components-core 0.1.82 → 0.1.98
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/components/Audit/AuditLogList.d.ts +27 -0
- package/dist/components/Audit/AuditLogList.js +272 -0
- package/dist/components/Audit/AuditLogList.js.map +1 -0
- package/dist/components/Audit/formatAuditCurl.d.ts +27 -0
- package/dist/components/Audit/formatAuditCurl.js +115 -0
- package/dist/components/Audit/formatAuditCurl.js.map +1 -0
- package/dist/components/Audit/formatAuditJson.d.ts +15 -0
- package/dist/components/Audit/formatAuditJson.js +135 -0
- package/dist/components/Audit/formatAuditJson.js.map +1 -0
- package/dist/components/Audit/index.d.ts +3 -0
- package/dist/components/Audit/style.module.scss.js +30 -0
- package/dist/components/Audit/style.module.scss.js.map +1 -0
- package/dist/components/Audit/types.d.ts +39 -0
- package/dist/components/Editor/RichTextEditor/RichTextEditor.d.ts +24 -0
- package/dist/components/Editor/RichTextEditor/RichTextEditor.js +93 -0
- package/dist/components/Editor/RichTextEditor/RichTextEditor.js.map +1 -0
- package/dist/components/Editor/RichTextEditor/index.d.ts +2 -0
- package/dist/components/Editor/RichTextEditor/style.module.scss.js +11 -0
- package/dist/components/Editor/RichTextEditor/style.module.scss.js.map +1 -0
- package/dist/components/Editor/VariablePicker.d.ts +19 -0
- package/dist/components/Editor/VariablePicker.js +55 -0
- package/dist/components/Editor/VariablePicker.js.map +1 -0
- package/dist/components/Editor/index.d.ts +7 -0
- package/dist/components/Editor/index.js +21 -0
- package/dist/components/Editor/index.js.map +1 -0
- package/dist/components/Editor/msgVarTokenPlugin.d.ts +13 -0
- package/dist/components/Editor/msgVarTokenPlugin.js +94 -0
- package/dist/components/Editor/msgVarTokenPlugin.js.map +1 -0
- package/dist/components/Editor/variableMention.d.ts +37 -0
- package/dist/components/Editor/variableMention.js +64 -0
- package/dist/components/Editor/variableMention.js.map +1 -0
- package/dist/components/FormInfo/RichTextField/index.d.ts +21 -0
- package/dist/components/FormInfo/RichTextField/index.js +82 -0
- package/dist/components/FormInfo/RichTextField/index.js.map +1 -0
- package/dist/components/FormInfo/RichTextField/style.module.scss.js +9 -0
- package/dist/components/FormInfo/RichTextField/style.module.scss.js.map +1 -0
- package/dist/components/FormInfo/VariableMentionInput/index.d.ts +17 -0
- package/dist/components/FormInfo/VariableMentionInput/index.js +73 -0
- package/dist/components/FormInfo/VariableMentionInput/index.js.map +1 -0
- package/dist/components/FormInfo/VariableMentionInput/style.module.scss.js +11 -0
- package/dist/components/FormInfo/VariableMentionInput/style.module.scss.js.map +1 -0
- package/dist/components/FormInfo/fields.d.ts +5 -0
- package/dist/components/FormInfo/fields.js +32 -23
- package/dist/components/FormInfo/fields.js.map +1 -1
- package/dist/components/FormInfo/index.d.ts +4 -0
- package/dist/components/StateBar/StateBar.d.ts +19 -6
- package/dist/components/StateBar/StateBar.js +87 -50
- package/dist/components/StateBar/StateBar.js.map +1 -1
- package/dist/components/StateBar/style.module.scss.js +13 -10
- package/dist/components/StateBar/style.module.scss.js.map +1 -1
- package/dist/components/Table/ResizableHeaderCell.js +37 -38
- package/dist/components/Table/ResizableHeaderCell.js.map +1 -1
- package/dist/components/Table/Table.js +88 -89
- package/dist/components/Table/Table.js.map +1 -1
- package/dist/components/Table/columnConfigUtils.d.ts +1 -1
- package/dist/components/Table/columnConfigUtils.js.map +1 -1
- package/dist/components/Table/style.module.scss.js +34 -34
- package/dist/components/Tools/Inbox/InboxBell/InboxBell.d.ts +45 -0
- package/dist/components/Tools/Inbox/InboxBell/InboxBell.js +156 -0
- package/dist/components/Tools/Inbox/InboxBell/InboxBell.js.map +1 -0
- package/dist/components/Tools/Inbox/InboxBell/index.d.ts +2 -0
- package/dist/components/Tools/Inbox/InboxBell/style.module.scss.js +30 -0
- package/dist/components/Tools/Inbox/InboxBell/style.module.scss.js.map +1 -0
- package/dist/components/Tools/Inbox/index.d.ts +2 -0
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/List/columns.d.ts +8 -0
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/List/columns.js +56 -0
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/List/columns.js.map +1 -0
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/MessageTemplateAdmin.d.ts +8 -0
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/MessageTemplateAdmin.js +216 -0
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/MessageTemplateAdmin.js.map +1 -0
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/Modal/TemplateFormModal.d.ts +26 -0
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/Modal/TemplateFormModal.js +190 -0
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/Modal/TemplateFormModal.js.map +1 -0
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/index.d.ts +3 -0
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/style.module.scss.js +12 -0
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/style.module.scss.js.map +1 -0
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/types.d.ts +76 -0
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/types.js +26 -0
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/types.js.map +1 -0
- package/dist/components/Tools/MessageCenter/index.d.ts +3 -0
- package/dist/components/Tools/MessageCenter/utils/templateCode.d.ts +8 -0
- package/dist/components/Tools/MessageCenter/utils/templateCode.js +25 -0
- package/dist/components/Tools/MessageCenter/utils/templateCode.js.map +1 -0
- package/dist/components/Tools/index.d.ts +5 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/editor.d.ts +5 -0
- package/dist/editor.js +21 -0
- package/dist/editor.js.map +1 -0
- package/dist/form-info.js +33 -29
- package/dist/form-info.js.map +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.js +805 -773
- package/dist/index.js.map +1 -1
- package/dist/marsun-components-core.css +4 -1
- package/dist/node_modules/@ckeditor/ckeditor5-basic-styles/dist/index.js +301 -0
- package/dist/node_modules/@ckeditor/ckeditor5-basic-styles/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-clipboard/dist/index.js +1256 -0
- package/dist/node_modules/@ckeditor/ckeditor5-clipboard/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-core/dist/index.js +2107 -0
- package/dist/node_modules/@ckeditor/ckeditor5-core/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-editor-classic/dist/index.js +259 -0
- package/dist/node_modules/@ckeditor/ckeditor5-editor-classic/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-engine/dist/index.js +23990 -0
- package/dist/node_modules/@ckeditor/ckeditor5-engine/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-enter/dist/index.js +249 -0
- package/dist/node_modules/@ckeditor/ckeditor5-enter/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-essentials/dist/index.js +47 -0
- package/dist/node_modules/@ckeditor/ckeditor5-essentials/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-font/dist/index.js +100 -0
- package/dist/node_modules/@ckeditor/ckeditor5-font/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-icons/dist/index.js +31 -0
- package/dist/node_modules/@ckeditor/ckeditor5-icons/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-integrations-common/dist/index.js +194 -0
- package/dist/node_modules/@ckeditor/ckeditor5-integrations-common/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-list/dist/index.js +2042 -0
- package/dist/node_modules/@ckeditor/ckeditor5-list/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-mention/dist/index.js +9 -0
- package/dist/node_modules/@ckeditor/ckeditor5-mention/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-paragraph/dist/index.js +167 -0
- package/dist/node_modules/@ckeditor/ckeditor5-paragraph/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-react/dist/index.js +471 -0
- package/dist/node_modules/@ckeditor/ckeditor5-react/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-select-all/dist/index.js +139 -0
- package/dist/node_modules/@ckeditor/ckeditor5-select-all/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-typing/dist/index.js +755 -0
- package/dist/node_modules/@ckeditor/ckeditor5-typing/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-ui/dist/index.js +7838 -0
- package/dist/node_modules/@ckeditor/ckeditor5-ui/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-ui/node_modules/color-convert/conversions.js +422 -0
- package/dist/node_modules/@ckeditor/ckeditor5-ui/node_modules/color-convert/conversions.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-ui/node_modules/color-convert/index.js +33 -0
- package/dist/node_modules/@ckeditor/ckeditor5-ui/node_modules/color-convert/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-ui/node_modules/color-convert/route.js +47 -0
- package/dist/node_modules/@ckeditor/ckeditor5-ui/node_modules/color-convert/route.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-ui/node_modules/color-name/index.js +156 -0
- package/dist/node_modules/@ckeditor/ckeditor5-ui/node_modules/color-name/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-undo/dist/index.js +313 -0
- package/dist/node_modules/@ckeditor/ckeditor5-undo/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-utils/dist/index.js +2942 -0
- package/dist/node_modules/@ckeditor/ckeditor5-utils/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-watchdog/dist/index.js +892 -0
- package/dist/node_modules/@ckeditor/ckeditor5-watchdog/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-widget/dist/index.js +1047 -0
- package/dist/node_modules/@ckeditor/ckeditor5-widget/dist/index.js.map +1 -0
- package/dist/node_modules/color-parse/node_modules/color-name/index.js +153 -0
- package/dist/node_modules/color-parse/node_modules/color-name/index.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/_internal/globalThis.js +7 -0
- package/dist/node_modules/es-toolkit/dist/_internal/globalThis.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/_internal/isUnsafeProperty.js +7 -0
- package/dist/node_modules/es-toolkit/dist/_internal/isUnsafeProperty.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/_internal/isUnsafeToWriteProperty.js +7 -0
- package/dist/node_modules/es-toolkit/dist/_internal/isUnsafeToWriteProperty.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/assignValue.js +9 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/assignValue.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/getSymbols.js +7 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/getSymbols.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/getTag.js +7 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/getTag.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/isDeepKey.js +16 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/isDeepKey.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/isIndex.js +15 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/isIndex.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/isKey.js +9 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/isKey.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/isPrototype.js +8 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/isPrototype.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/tags.js +30 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/tags.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/toKey.js +8 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/toKey.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/function/debounce.js +17 -0
- package/dist/node_modules/es-toolkit/dist/compat/function/debounce.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/function/throttle.js +13 -0
- package/dist/node_modules/es-toolkit/dist/compat/function/throttle.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/assignIn.js +17 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/assignIn.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/clone.js +102 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/clone.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/cloneDeep.js +8 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/cloneDeep.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/cloneDeepWith.js +33 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/cloneDeepWith.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/get.js +39 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/get.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/has.js +21 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/has.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/keysIn.js +33 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/keysIn.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/mapValues.js +10 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/mapValues.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/merge.js +9 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/merge.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/mergeWith.js +53 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/mergeWith.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/property.js +10 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/property.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/set.js +9 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/set.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/updateWith.js +31 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/updateWith.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isArguments.js +8 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isArguments.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isArray.js +7 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isArray.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isArrayLike.js +8 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isArrayLike.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isArrayLikeObject.js +9 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isArrayLikeObject.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isElement.js +9 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isElement.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isEqualWith.js +15 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isEqualWith.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isFunction.js +7 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isFunction.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isMatch.js +9 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isMatch.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isMatchWith.js +81 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isMatchWith.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isObject.js +7 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isObject.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isObjectLike.js +7 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isObjectLike.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isPlainObject.js +16 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isPlainObject.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isString.js +7 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isString.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isSymbol.js +7 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isSymbol.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isTypedArray.js +8 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isTypedArray.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/matches.js +9 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/matches.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/matchesProperty.js +23 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/matchesProperty.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/eq.js +7 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/eq.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/iteratee.js +19 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/iteratee.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/times.js +11 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/times.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/toFinite.js +8 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/toFinite.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/toInteger.js +9 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/toInteger.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/toNumber.js +8 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/toNumber.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/toPath.js +37 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/toPath.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/toString.js +15 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/toString.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/function/after.js +11 -0
- package/dist/node_modules/es-toolkit/dist/function/after.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/function/debounce.js +30 -0
- package/dist/node_modules/es-toolkit/dist/function/debounce.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/function/identity.js +7 -0
- package/dist/node_modules/es-toolkit/dist/function/identity.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/function/noop.js +6 -0
- package/dist/node_modules/es-toolkit/dist/function/noop.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/object/clone.js +27 -0
- package/dist/node_modules/es-toolkit/dist/object/clone.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/object/cloneDeep.js +8 -0
- package/dist/node_modules/es-toolkit/dist/object/cloneDeep.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/object/cloneDeepWith.js +121 -0
- package/dist/node_modules/es-toolkit/dist/object/cloneDeepWith.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/object/mapValues.js +12 -0
- package/dist/node_modules/es-toolkit/dist/object/mapValues.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/predicate/isBuffer.js +8 -0
- package/dist/node_modules/es-toolkit/dist/predicate/isBuffer.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/predicate/isEqual.js +9 -0
- package/dist/node_modules/es-toolkit/dist/predicate/isEqual.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/predicate/isEqualWith.js +110 -0
- package/dist/node_modules/es-toolkit/dist/predicate/isEqualWith.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/predicate/isLength.js +7 -0
- package/dist/node_modules/es-toolkit/dist/predicate/isLength.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/predicate/isPlainObject.js +9 -0
- package/dist/node_modules/es-toolkit/dist/predicate/isPlainObject.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/predicate/isPrimitive.js +7 -0
- package/dist/node_modules/es-toolkit/dist/predicate/isPrimitive.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/predicate/isTypedArray.js +7 -0
- package/dist/node_modules/es-toolkit/dist/predicate/isTypedArray.js.map +1 -0
- package/dist/styles/global.css +4 -1
- package/dist/utils/copyText.d.ts +4 -0
- package/dist/utils/copyText.js +21 -0
- package/dist/utils/copyText.js.map +1 -0
- package/package.json +9 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../node_modules/@ckeditor/ckeditor5-utils/dist/index.js"],"sourcesContent":["/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nimport { cloneDeepWith, isElement, isFunction, isObject, isPlainObject, isString, merge } from \"es-toolkit/compat\";\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* A helper (module) giving an access to the global DOM objects such as `window` and\n* `document`. Accessing these objects using this helper allows easy and bulletproof\n* testing, i.e. stubbing native properties:\n*\n* ```ts\n* import { global } from 'ckeditor5';\n*\n* // This stub will work for any code using global module.\n* vi.spyOn( global, 'window', 'get' ).mockReturnValue( {\n* \tinnerWidth: 10000\n* } );\n*\n* console.log( global.window.innerWidth );\n* ```\n*/\nlet globalVar;\ntry {\n\tglobalVar = {\n\t\twindow,\n\t\tdocument\n\t};\n} catch {\n\t/* v8 ignore start -- @preserve */\n\tglobalVar = {\n\t\twindow: {},\n\t\tdocument: {}\n\t};\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/env\n*/\n/**\n* Safely returns `userAgent` from browser's navigator API in a lower case.\n* If navigator API is not available it will return an empty string.\n*\n* @internal\n*/\nfunction getUserAgent() {\n\ttry {\n\t\treturn navigator.userAgent.toLowerCase();\n\t} catch {\n\t\treturn \"\";\n\t}\n}\nconst userAgent = /* #__PURE__ */ getUserAgent();\n/**\n* A namespace containing environment and browser information.\n*/\nconst env = {\n\tisMac: /* #__PURE__ */ isMac(userAgent),\n\tisWindows: /* #__PURE__ */ isWindows(userAgent),\n\tisGecko: /* #__PURE__ */ isGecko(userAgent),\n\tisSafari: /* #__PURE__ */ isSafari(userAgent),\n\tisiOS: /* #__PURE__ */ isiOS(userAgent),\n\tisAndroid: /* #__PURE__ */ isAndroid(userAgent),\n\tisBlink: /* #__PURE__ */ isBlink(userAgent),\n\tget isMediaForcedColors() {\n\t\treturn isMediaForcedColors();\n\t},\n\tget isMotionReduced() {\n\t\treturn isMotionReduced();\n\t},\n\tfeatures: { isRegExpUnicodePropertySupported: /* #__PURE__ */ isRegExpUnicodePropertySupported() }\n};\n/**\n* Checks if User Agent represented by the string is running on Macintosh.\n*\n* @internal\n* @param userAgent **Lowercase** `navigator.userAgent` string.\n* @returns Whether User Agent is running on Macintosh or not.\n*/\nfunction isMac(userAgent) {\n\treturn userAgent.indexOf(\"macintosh\") > -1;\n}\n/**\n* Checks if User Agent represented by the string is running on Windows.\n*\n* @internal\n* @param userAgent **Lowercase** `navigator.userAgent` string.\n* @returns Whether User Agent is running on Windows or not.\n*/\nfunction isWindows(userAgent) {\n\treturn userAgent.indexOf(\"windows\") > -1;\n}\n/**\n* Checks if User Agent represented by the string is Firefox (Gecko).\n*\n* @internal\n* @param userAgent **Lowercase** `navigator.userAgent` string.\n* @returns Whether User Agent is Firefox or not.\n*/\nfunction isGecko(userAgent) {\n\treturn !!userAgent.match(/gecko\\/\\d+/);\n}\n/**\n* Checks if User Agent represented by the string is Safari.\n*\n* @internal\n* @param userAgent **Lowercase** `navigator.userAgent` string.\n* @returns Whether User Agent is Safari or not.\n*/\nfunction isSafari(userAgent) {\n\treturn userAgent.indexOf(\" applewebkit/\") > -1 && userAgent.indexOf(\"chrome\") === -1;\n}\n/**\n* Checks if User Agent represented by the string is running in iOS.\n*\n* @internal\n* @param userAgent **Lowercase** `navigator.userAgent` string.\n* @returns Whether User Agent is running in iOS or not.\n*/\nfunction isiOS(userAgent) {\n\treturn !!userAgent.match(/iphone|ipad/i) || isMac(userAgent) && navigator.maxTouchPoints > 0;\n}\n/**\n* Checks if User Agent represented by the string is Android mobile device.\n*\n* @internal\n* @param userAgent **Lowercase** `navigator.userAgent` string.\n* @returns Whether User Agent is Safari or not.\n*/\nfunction isAndroid(userAgent) {\n\treturn userAgent.indexOf(\"android\") > -1;\n}\n/**\n* Checks if User Agent represented by the string is Blink engine.\n*\n* @internal\n* @param userAgent **Lowercase** `navigator.userAgent` string.\n* @returns Whether User Agent is Blink engine or not.\n*/\nfunction isBlink(userAgent) {\n\treturn userAgent.indexOf(\"chrome/\") > -1 && userAgent.indexOf(\"edge/\") < 0;\n}\n/**\n* Checks if the current environment supports ES2018 Unicode properties like `\\p{P}` or `\\p{L}`.\n* More information about unicode properties might be found\n* [in Unicode Standard Annex #44](https://www.unicode.org/reports/tr44/#GC_Values_Table).\n*\n* @internal\n*/\nfunction isRegExpUnicodePropertySupported() {\n\tlet isSupported = false;\n\ttry {\n\t\tisSupported = \"ć\".search(new RegExp(\"[\\\\p{L}]\", \"u\")) === 0;\n\t} catch {}\n\treturn isSupported;\n}\n/**\n* Checks if the user agent has enabled a forced colors mode (e.g. Windows High Contrast mode).\n*\n* Returns `false` in environments where `window` global object is not available.\n*\n* @internal\n*/\nfunction isMediaForcedColors() {\n\treturn globalVar.window.matchMedia ? globalVar.window.matchMedia(\"(forced-colors: active)\").matches : false;\n}\n/**\n* Checks if the user enabled \"prefers reduced motion\" setting in browser.\n*\n* Returns `false` in environments where `window` global object is not available.\n*\n* @internal\n*/\nfunction isMotionReduced() {\n\treturn globalVar.window.matchMedia ? globalVar.window.matchMedia(\"(prefers-reduced-motion)\").matches : false;\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* Finds positions of the first and last change in the given string/array and generates a set of changes:\n*\n* ```ts\n* fastDiff( '12a', '12xyza' );\n* // [ { index: 2, type: 'insert', values: [ 'x', 'y', 'z' ] } ]\n*\n* fastDiff( '12a', '12aa' );\n* // [ { index: 3, type: 'insert', values: [ 'a' ] } ]\n*\n* fastDiff( '12xyza', '12a' );\n* // [ { index: 2, type: 'delete', howMany: 3 } ]\n*\n* fastDiff( [ '1', '2', 'a', 'a' ], [ '1', '2', 'a' ] );\n* // [ { index: 3, type: 'delete', howMany: 1 } ]\n*\n* fastDiff( [ '1', '2', 'a', 'b', 'c', '3' ], [ '2', 'a', 'b' ] );\n* // [ { index: 0, type: 'insert', values: [ '2', 'a', 'b' ] }, { index: 3, type: 'delete', howMany: 6 } ]\n* ```\n*\n* Passed arrays can contain any type of data, however to compare them correctly custom comparator function\n* should be passed as a third parameter:\n*\n* ```ts\n* fastDiff( [ { value: 1 }, { value: 2 } ], [ { value: 1 }, { value: 3 } ], ( a, b ) => {\n* \treturn a.value === b.value;\n* } );\n* // [ { index: 1, type: 'insert', values: [ { value: 3 } ] }, { index: 2, type: 'delete', howMany: 1 } ]\n* ```\n*\n* The resulted set of changes can be applied to the input in order to transform it into the output, for example:\n*\n* ```ts\n* let input = '12abc3';\n* const output = '2ab';\n* const changes = fastDiff( input, output );\n*\n* changes.forEach( change => {\n* \tif ( change.type == 'insert' ) {\n* \t\tinput = input.substring( 0, change.index ) + change.values.join( '' ) + input.substring( change.index );\n* \t} else if ( change.type == 'delete' ) {\n* \t\tinput = input.substring( 0, change.index ) + input.substring( change.index + change.howMany );\n* \t}\n* } );\n*\n* // input equals output now\n* ```\n*\n* or in case of arrays:\n*\n* ```ts\n* let input = [ '1', '2', 'a', 'b', 'c', '3' ];\n* const output = [ '2', 'a', 'b' ];\n* const changes = fastDiff( input, output );\n*\n* changes.forEach( change => {\n* \tif ( change.type == 'insert' ) {\n* \t\tinput = input.slice( 0, change.index ).concat( change.values, input.slice( change.index ) );\n* \t} else if ( change.type == 'delete' ) {\n* \t\tinput = input.slice( 0, change.index ).concat( input.slice( change.index + change.howMany ) );\n* \t}\n* } );\n*\n* // input equals output now\n* ```\n*\n* By passing `true` as the fourth parameter (`atomicChanges`) the output of this function will become compatible with\n* the {@link module:utils/diff~diff `diff()`} function:\n*\n* ```ts\n* fastDiff( '12a', '12xyza', undefined, true );\n* // [ 'equal', 'equal', 'insert', 'insert', 'insert', 'equal' ]\n* ```\n*\n* The default output format of this function is compatible with the output format of\n* {@link module:utils/difftochanges~diffToChanges `diffToChanges()`}. The `diffToChanges()` input format is, in turn,\n* compatible with the output of {@link module:utils/diff~diff `diff()`}:\n*\n* ```ts\n* const a = '1234';\n* const b = '12xyz34';\n*\n* // Both calls will return the same results (grouped changes format).\n* fastDiff( a, b );\n* diffToChanges( diff( a, b ) );\n*\n* // Again, both calls will return the same results (atomic changes format).\n* fastDiff( a, b, undefined, true );\n* diff( a, b );\n* ```\n*\n* @typeParam T The type of array elements.\n* @typeParam AtomicChanges The type of `atomicChanges` parameter (selects the result type).\n* @param a Input array or string.\n* @param b Input array or string.\n* @param cmp Optional function used to compare array values, by default `===` (strict equal operator) is used.\n* @param atomicChanges Whether an array of `inset|delete|equal` operations should\n* be returned instead of changes set. This makes this function compatible with {@link module:utils/diff~diff `diff()`}.\n* Defaults to `false`.\n* @returns Array of changes. The elements are either {@link module:utils/diff~DiffResult} or {@link module:utils/difftochanges~Change},\n* depending on `atomicChanges` parameter.\n*/\nfunction fastDiff(a, b, cmp, atomicChanges) {\n\tcmp = cmp || function(a, b) {\n\t\treturn a === b;\n\t};\n\tconst arrayA = Array.isArray(a) ? a : Array.prototype.slice.call(a);\n\tconst arrayB = Array.isArray(b) ? b : Array.prototype.slice.call(b);\n\tconst changeIndexes = findChangeBoundaryIndexes(arrayA, arrayB, cmp);\n\treturn atomicChanges ? changeIndexesToAtomicChanges(changeIndexes, arrayB.length) : changeIndexesToChanges(arrayB, changeIndexes);\n}\n/**\n* Finds position of the first and last change in the given arrays. For example:\n*\n* ```ts\n* const indexes = findChangeBoundaryIndexes( [ '1', '2', '3', '4' ], [ '1', '3', '4', '2', '4' ] );\n* console.log( indexes ); // { firstIndex: 1, lastIndexOld: 3, lastIndexNew: 4 }\n* ```\n*\n* The above indexes means that in the first array the modified part is `1[23]4` and in the second array it is `1[342]4`.\n* Based on such indexes, array with `insert`/`delete` operations which allows transforming first value into the second one\n* can be generated.\n*/\nfunction findChangeBoundaryIndexes(arr1, arr2, cmp) {\n\tconst firstIndex = findFirstDifferenceIndex(arr1, arr2, cmp);\n\tif (firstIndex === -1) return {\n\t\tfirstIndex: -1,\n\t\tlastIndexOld: -1,\n\t\tlastIndexNew: -1\n\t};\n\tconst lastIndex = findFirstDifferenceIndex(cutAndReverse(arr1, firstIndex), cutAndReverse(arr2, firstIndex), cmp);\n\treturn {\n\t\tfirstIndex,\n\t\tlastIndexOld: arr1.length - lastIndex,\n\t\tlastIndexNew: arr2.length - lastIndex\n\t};\n}\n/**\n* Returns a first index on which given arrays differ. If both arrays are the same, -1 is returned.\n*/\nfunction findFirstDifferenceIndex(arr1, arr2, cmp) {\n\tfor (let i = 0; i < Math.max(arr1.length, arr2.length); i++) if (arr1[i] === void 0 || arr2[i] === void 0 || !cmp(arr1[i], arr2[i])) return i;\n\treturn -1;\n}\n/**\n* Returns a copy of the given array with `howMany` elements removed starting from the beginning and in reversed order.\n*\n* @param arr Array to be processed.\n* @param howMany How many elements from array beginning to remove.\n* @returns Shortened and reversed array.\n*/\nfunction cutAndReverse(arr, howMany) {\n\treturn arr.slice(howMany).reverse();\n}\n/**\n* Generates changes array based on change indexes from `findChangeBoundaryIndexes` function. This function will\n* generate array with 0 (no changes), 1 (deletion or insertion) or 2 records (insertion and deletion).\n*\n* @param newArray New array for which change indexes were calculated.\n* @param changeIndexes Change indexes object from `findChangeBoundaryIndexes` function.\n* @returns Array of changes compatible with {@link module:utils/difftochanges~diffToChanges} format.\n*/\nfunction changeIndexesToChanges(newArray, changeIndexes) {\n\tconst result = [];\n\tconst { firstIndex, lastIndexOld, lastIndexNew } = changeIndexes;\n\tif (lastIndexNew - firstIndex > 0) result.push({\n\t\tindex: firstIndex,\n\t\ttype: \"insert\",\n\t\tvalues: newArray.slice(firstIndex, lastIndexNew)\n\t});\n\tif (lastIndexOld - firstIndex > 0) result.push({\n\t\tindex: firstIndex + (lastIndexNew - firstIndex),\n\t\ttype: \"delete\",\n\t\thowMany: lastIndexOld - firstIndex\n\t});\n\treturn result;\n}\n/**\n* Generates array with set `equal|insert|delete` operations based on change indexes from `findChangeBoundaryIndexes` function.\n*\n* @param changeIndexes Change indexes object from `findChangeBoundaryIndexes` function.\n* @param newLength Length of the new array on which `findChangeBoundaryIndexes` calculated change indexes.\n* @returns Array of changes compatible with {@link module:utils/diff~diff} format.\n*/\nfunction changeIndexesToAtomicChanges(changeIndexes, newLength) {\n\tconst { firstIndex, lastIndexOld, lastIndexNew } = changeIndexes;\n\tif (firstIndex === -1) return Array(newLength).fill(\"equal\");\n\tlet result = [];\n\tif (firstIndex > 0) result = result.concat(Array(firstIndex).fill(\"equal\"));\n\tif (lastIndexNew - firstIndex > 0) result = result.concat(Array(lastIndexNew - firstIndex).fill(\"insert\"));\n\tif (lastIndexOld - firstIndex > 0) result = result.concat(Array(lastIndexOld - firstIndex).fill(\"delete\"));\n\tif (lastIndexNew < newLength) result = result.concat(Array(newLength - lastIndexNew).fill(\"equal\"));\n\treturn result;\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/diff\n*/\n/**\n* Calculates the difference between two arrays or strings producing an array containing a list of changes\n* necessary to transform input into output.\n*\n* ```ts\n* diff( 'aba', 'acca' ); // [ 'equal', 'insert', 'insert', 'delete', 'equal' ]\n* ```\n*\n* This function is based on the \"O(NP) Sequence Comparison Algorithm\" by Sun Wu, Udi Manber, Gene Myers, Webb Miller.\n* Unfortunately, while it gives the most precise results, its to complex for longer strings/arrow (above 200 items).\n* Therefore, `diff()` automatically switches to {@link module:utils/fastdiff~fastDiff `fastDiff()`} when detecting\n* such a scenario. The return formats of both functions are identical.\n*\n* @param a Input array or string.\n* @param b Output array or string.\n* @param cmp Optional function used to compare array values, by default === is used.\n* @returns Array of changes.\n*/\nconst diff = function(a, b, cmp) {\n\tcmp = cmp || function(a, b) {\n\t\treturn a === b;\n\t};\n\tconst aLength = a.length;\n\tconst bLength = b.length;\n\tif (aLength > 200 || bLength > 200 || aLength + bLength > 300) return diff.fastDiff(a, b, cmp, true);\n\tlet _insert, _delete;\n\tif (bLength < aLength) {\n\t\tconst tmp = a;\n\t\ta = b;\n\t\tb = tmp;\n\t\t_insert = \"delete\";\n\t\t_delete = \"insert\";\n\t} else {\n\t\t_insert = \"insert\";\n\t\t_delete = \"delete\";\n\t}\n\tconst m = a.length;\n\tconst n = b.length;\n\tconst delta = n - m;\n\tconst es = {};\n\tconst fp = {};\n\tfunction snake(k) {\n\t\tconst y1 = (fp[k - 1] !== void 0 ? fp[k - 1] : -1) + 1;\n\t\tconst y2 = fp[k + 1] !== void 0 ? fp[k + 1] : -1;\n\t\tconst dir = y1 > y2 ? -1 : 1;\n\t\tif (es[k + dir]) es[k] = es[k + dir].slice(0);\n\t\tif (!es[k]) es[k] = [];\n\t\tes[k].push(y1 > y2 ? _insert : _delete);\n\t\tlet y = Math.max(y1, y2);\n\t\tlet x = y - k;\n\t\twhile (x < m && y < n && cmp(a[x], b[y])) {\n\t\t\tx++;\n\t\t\ty++;\n\t\t\tes[k].push(\"equal\");\n\t\t}\n\t\treturn y;\n\t}\n\tlet p = 0;\n\tlet k;\n\tdo {\n\t\tfor (k = -p; k < delta; k++) fp[k] = snake(k);\n\t\tfor (k = delta + p; k > delta; k--) fp[k] = snake(k);\n\t\tfp[delta] = snake(delta);\n\t\tp++;\n\t} while (fp[delta] !== n);\n\treturn es[delta].slice(1);\n};\ndiff.fastDiff = fastDiff;\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* Creates a set of changes which need to be applied to the input in order to transform\n* it into the output. This function can be used with strings or arrays.\n*\n* ```ts\n* const input = Array.from( 'abc' );\n* const output = Array.from( 'xaby' );\n* const changes = diffToChanges( diff( input, output ), output );\n*\n* changes.forEach( change => {\n* \tif ( change.type == 'insert' ) {\n* \t\tinput.splice( change.index, 0, ...change.values );\n* \t} else if ( change.type == 'delete' ) {\n* \t\tinput.splice( change.index, change.howMany );\n* \t}\n* } );\n*\n* input.join( '' ) == output.join( '' ); // -> true\n* ```\n*\n* @typeParam T The type of output array element.\n* @param diff Result of {@link module:utils/diff~diff}.\n* @param output The string or array which was passed as diff's output.\n* @returns Set of changes (insert or delete) which need to be applied to the input\n* in order to transform it into the output.\n*/\nfunction diffToChanges(diff, output) {\n\tconst changes = [];\n\tlet index = 0;\n\tlet lastOperation = null;\n\tdiff.forEach((change) => {\n\t\tif (change == \"equal\") {\n\t\t\tpushLast();\n\t\t\tindex++;\n\t\t} else if (change == \"insert\") {\n\t\t\tif (lastOperation && lastOperation.type == \"insert\") lastOperation.values.push(output[index]);\n\t\t\telse {\n\t\t\t\tpushLast();\n\t\t\t\tlastOperation = {\n\t\t\t\t\ttype: \"insert\",\n\t\t\t\t\tindex,\n\t\t\t\t\tvalues: [output[index]]\n\t\t\t\t};\n\t\t\t}\n\t\t\tindex++;\n\t\t} else if (lastOperation && lastOperation.type == \"delete\") lastOperation.howMany++;\n\t\telse {\n\t\t\tpushLast();\n\t\t\tlastOperation = {\n\t\t\t\ttype: \"delete\",\n\t\t\t\tindex,\n\t\t\t\thowMany: 1\n\t\t\t};\n\t\t}\n\t});\n\tpushLast();\n\treturn changes;\n\tfunction pushLast() {\n\t\tif (lastOperation) {\n\t\t\tchanges.push(lastOperation);\n\t\t\tlastOperation = null;\n\t\t}\n\t}\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/areconnectedthroughproperties\n*/\n/**\n* Traverses both structures to find out whether there is a reference that is shared between both structures.\n*/\nfunction areConnectedThroughProperties(obj1, obj2) {\n\tif (obj1 === obj2 && isObject$1(obj1)) return true;\n\tconst subNodes1 = getSubNodes(obj1);\n\tconst subNodes2 = getSubNodes(obj2);\n\tfor (const node of subNodes1) if (subNodes2.has(node)) return true;\n\treturn false;\n}\n/**\n* Traverses JS structure and stores all sub-nodes, including the head node.\n* It walks into each iterable structures with the `try catch` block to omit errors that might be thrown during\n* tree walking. All primitives, functions and built-ins are skipped.\n*/\nfunction getSubNodes(head) {\n\tconst nodes = [head];\n\tconst subNodes = /* @__PURE__ */ new Set();\n\twhile (nodes.length > 0) {\n\t\tconst node = nodes.shift();\n\t\tif (subNodes.has(node) || shouldNodeBeSkipped(node)) continue;\n\t\tsubNodes.add(node);\n\t\tif (node[Symbol.iterator]) try {\n\t\t\tnodes.push(...node);\n\t\t} catch {}\n\t\telse nodes.push(...Object.values(node));\n\t}\n\treturn subNodes;\n}\nfunction shouldNodeBeSkipped(node) {\n\tconst type = Object.prototype.toString.call(node);\n\treturn type === \"[object Number]\" || type === \"[object Boolean]\" || type === \"[object String]\" || type === \"[object Symbol]\" || type === \"[object Function]\" || type === \"[object Date]\" || type === \"[object RegExp]\" || node === void 0 || node === null || node instanceof EventTarget || node instanceof Event;\n}\nfunction isObject$1(structure) {\n\treturn typeof structure === \"object\" && structure !== null;\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/spy\n*/\n/**\n* Creates a spy function (ala Sinon.js) that can be used to inspect call to it.\n*\n* The following are the present features:\n*\n* * spy.called: property set to `true` if the function has been called at least once.\n*\n* @returns The spy function.\n*/\nfunction spy() {\n\treturn function spy() {\n\t\tspy.called = true;\n\t};\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/eventinfo\n*/\n/**\n* The event object passed to event callbacks. It is used to provide information about the event as well as a tool to\n* manipulate it.\n*/\nvar EventInfo = class {\n\t/**\n\t* The object that fired the event.\n\t*/\n\tsource;\n\t/**\n\t* The event name.\n\t*/\n\tname;\n\t/**\n\t* Path this event has followed. See {@link module:utils/emittermixin~Emitter#delegate}.\n\t*/\n\tpath;\n\t/**\n\t* Stops the event emitter to call further callbacks for this event interaction.\n\t*/\n\tstop;\n\t/**\n\t* Removes the current callback from future interactions of this event.\n\t*/\n\toff;\n\t/**\n\t* The value which will be returned by {@link module:utils/emittermixin~Emitter#fire}.\n\t*\n\t* It's `undefined` by default and can be changed by an event listener:\n\t*\n\t* ```ts\n\t* dataController.fire( 'getSelectedContent', ( evt ) => {\n\t* \t// This listener will make `dataController.fire( 'getSelectedContent' )`\n\t* \t// always return an empty DocumentFragment.\n\t* \tevt.return = new DocumentFragment();\n\t*\n\t* \t// Make sure no other listeners are executed.\n\t* \tevt.stop();\n\t* } );\n\t* ```\n\t*/\n\treturn;\n\t/**\n\t* @param source The emitter.\n\t* @param name The event name.\n\t*/\n\tconstructor(source, name) {\n\t\tthis.source = source;\n\t\tthis.name = name;\n\t\tthis.path = [];\n\t\tthis.stop = spy();\n\t\tthis.off = spy();\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/uid\n*/\n/**\n* A hash table of hex numbers to avoid using toString() in uid() which is costly.\n* [ '00', '01', '02', ..., 'fe', 'ff' ]\n*/\nconst HEX_NUMBERS = new Array(256).fill(\"\").map((_, index) => (\"0\" + index.toString(16)).slice(-2));\n/**\n* Returns a unique id. The id starts with an \"e\" character and a randomly generated string of\n* 32 alphanumeric characters.\n*\n* **Note**: The characters the unique id is built from correspond to the hex number notation\n* (from \"0\" to \"9\", from \"a\" to \"f\"). In other words, each id corresponds to an \"e\" followed\n* by 16 8-bit numbers next to each other.\n*\n* @returns An unique id string.\n*/\nfunction uid() {\n\tconst [r1, r2, r3, r4] = crypto.getRandomValues(/* @__PURE__ */ new Uint32Array(4));\n\treturn \"e\" + HEX_NUMBERS[r1 >> 0 & 255] + HEX_NUMBERS[r1 >> 8 & 255] + HEX_NUMBERS[r1 >> 16 & 255] + HEX_NUMBERS[r1 >> 24 & 255] + HEX_NUMBERS[r2 >> 0 & 255] + HEX_NUMBERS[r2 >> 8 & 255] + HEX_NUMBERS[r2 >> 16 & 255] + HEX_NUMBERS[r2 >> 24 & 255] + HEX_NUMBERS[r3 >> 0 & 255] + HEX_NUMBERS[r3 >> 8 & 255] + HEX_NUMBERS[r3 >> 16 & 255] + HEX_NUMBERS[r3 >> 24 & 255] + HEX_NUMBERS[r4 >> 0 & 255] + HEX_NUMBERS[r4 >> 8 & 255] + HEX_NUMBERS[r4 >> 16 & 255] + HEX_NUMBERS[r4 >> 24 & 255];\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* Provides group of constants to use instead of hardcoding numeric priority values.\n*/\nconst priorities = {\n\tget(priority = \"normal\") {\n\t\tif (typeof priority != \"number\") return this[priority] || this.normal;\n\t\telse return priority;\n\t},\n\thighest: 1e5,\n\thigh: 1e3,\n\tnormal: 0,\n\tlow: -1e3,\n\tlowest: -1e5\n};\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/inserttopriorityarray\n*/\n/**\n* Inserts any object with priority at correct index by priority so registered objects are always sorted from highest to lowest priority.\n*\n* @param objects Array of objects with priority to insert object to.\n* @param objectToInsert Object with `priority` property.\n*/\nfunction insertToPriorityArray(objects, objectToInsert) {\n\tconst priority = priorities.get(objectToInsert.priority);\n\tlet left = 0;\n\tlet right = objects.length;\n\twhile (left < right) {\n\t\tconst mid = left + right >> 1;\n\t\tif (priorities.get(objects[mid].priority) < priority) right = mid;\n\t\telse left = mid + 1;\n\t}\n\tobjects.splice(left, 0, objectToInsert);\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/ckeditorerror\n*/\n/**\n* URL to the documentation with error codes.\n*/\nconst DOCUMENTATION_URL = \"https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html\";\n/**\n* The CKEditor error class.\n*\n* You should throw `CKEditorError` when:\n*\n* * An unexpected situation occurred and the editor (most probably) will not work properly. Such exception will be handled\n* by the {@link module:watchdog/watchdog~Watchdog watchdog} (if it is integrated),\n* * If the editor is incorrectly integrated or the editor API is used in the wrong way. This way you will give\n* feedback to the developer as soon as possible. Keep in mind that for common integration issues which should not\n* stop editor initialization (like missing upload adapter, wrong name of a toolbar component) we use\n* {@link module:utils/ckeditorerror~logWarning `logWarning()`} and\n* {@link module:utils/ckeditorerror~logError `logError()`}\n* to improve developers experience and let them see the a working editor as soon as possible.\n*\n* ```ts\n* /**\n* * Error thrown when a plugin cannot be loaded due to JavaScript errors, lack of plugins with a given name, etc.\n* *\n* * @error plugin-load\n* * @param pluginName The name of the plugin that could not be loaded.\n* * @param moduleName The name of the module which tried to load this plugin.\n* *\\/\n* throw new CKEditorError( 'plugin-load', {\n* \tpluginName: 'foo',\n* \tmoduleName: 'bar'\n* } );\n* ```\n*/\nvar CKEditorError = class CKEditorError extends Error {\n\t/**\n\t* A context of the error by which the Watchdog is able to determine which editor crashed.\n\t*/\n\tcontext;\n\t/**\n\t* The additional error data passed to the constructor. Undefined if none was passed.\n\t*/\n\tdata;\n\t/**\n\t* Creates an instance of the CKEditorError class.\n\t*\n\t* @param errorName The error id in an `error-name` format. A link to this error documentation page will be added\n\t* to the thrown error's `message`.\n\t* @param context A context of the error by which the {@link module:watchdog/watchdog~Watchdog watchdog}\n\t* is able to determine which editor crashed. It should be an editor instance or a property connected to it. It can be also\n\t* a `null` value if the editor should not be restarted in case of the error (e.g. during the editor initialization).\n\t* The error context should be checked using the `areConnectedThroughProperties( editor, context )` utility\n\t* to check if the object works as the context.\n\t* @param data Additional data describing the error. A stringified version of this object\n\t* will be appended to the error message, so the data are quickly visible in the console. The original\n\t* data object will also be later available under the {@link #data} property.\n\t* @param originalError An optional original error that is being wrapped in the `CKEditorError` instance.\n\t*/\n\tconstructor(errorName, context, data, originalError) {\n\t\tsuper(getErrorMessage(errorName, data, originalError));\n\t\tthis.name = \"CKEditorError\";\n\t\tthis.context = context;\n\t\tthis.data = data;\n\t\tif (originalError) this.stack = originalError.stack;\n\t}\n\t/**\n\t* Checks if the error is of the `CKEditorError` type.\n\t*/\n\tis(type) {\n\t\treturn type === \"CKEditorError\";\n\t}\n\t/**\n\t* A utility that ensures that the thrown error is a {@link module:utils/ckeditorerror~CKEditorError} one.\n\t* It is useful when combined with the {@link module:watchdog/watchdog~Watchdog} feature, which can restart the editor in case\n\t* of a {@link module:utils/ckeditorerror~CKEditorError} error.\n\t*\n\t* @param error The error to rethrow.\n\t* @param context An object connected through properties with the editor instance. This context will be used\n\t* by the watchdog to verify which editor should be restarted.\n\t*/\n\tstatic rethrowUnexpectedError(error, context) {\n\t\tif (error.is && error.is(\"CKEditorError\")) throw error;\n\t\t/**\n\t\t* An unexpected error occurred inside the CKEditor 5 codebase. This error will look like the original one\n\t\t* to make the debugging easier.\n\t\t*\n\t\t* This error is only useful when the editor is initialized using the {@link module:watchdog/watchdog~Watchdog} feature.\n\t\t* In case of such error (or any {@link module:utils/ckeditorerror~CKEditorError} error) the watchdog should restart the editor.\n\t\t*\n\t\t* @error unexpected-error\n\t\t*/\n\t\tthrow new CKEditorError(\"unexpected-error\", context, void 0, error);\n\t}\n};\n/**\n* Logs a warning to the console with a properly formatted message and adds a link to the documentation.\n* Use whenever you want to log a warning to the console.\n*\n* ```ts\n* /**\n* * There was a problem processing the configuration of the toolbar. The item with the given\n* * name does not exist, so it was omitted when rendering the toolbar.\n* *\n* * @error toolbarview-item-unavailable\n* * @param {String} name The name of the component.\n* *\\/\n* logWarning( 'toolbarview-item-unavailable', { name } );\n* ```\n*\n* See also {@link module:utils/ckeditorerror~CKEditorError} for an explanation when to throw an error and when to log\n* a warning or an error to the console.\n*\n* @param errorName The error name to be logged.\n* @param data Additional data to be logged.\n*/\nfunction logWarning(errorName, data) {\n\tconsole.warn(...formatConsoleArguments(errorName, data));\n}\n/**\n* Logs an error to the console with a properly formatted message and adds a link to the documentation.\n* Use whenever you want to log an error to the console.\n*\n* ```ts\n* /**\n* * There was a problem processing the configuration of the toolbar. The item with the given\n* * name does not exist, so it was omitted when rendering the toolbar.\n* *\n* * @error toolbarview-item-unavailable\n* * @param {String} name The name of the component.\n* *\\/\n* logError( 'toolbarview-item-unavailable', { name } );\n* ```\n*\n* **Note**: In most cases logging a warning using {@link module:utils/ckeditorerror~logWarning} is enough.\n*\n* See also {@link module:utils/ckeditorerror~CKEditorError} for an explanation when to use each method.\n*\n* @param errorName The error name to be logged.\n* @param data Additional data to be logged.\n*/\nfunction logError(errorName, data) {\n\tconsole.error(...formatConsoleArguments(errorName, data));\n}\n/**\n* Returns formatted link to documentation message.\n*/\nfunction getLinkToDocumentationMessage(errorName) {\n\treturn `\\nRead more: ${DOCUMENTATION_URL}#error-${errorName}`;\n}\n/**\n* Returns formatted error message.\n*/\nfunction getErrorMessage(errorName, data, originalError) {\n\tconst processedObjects = /* @__PURE__ */ new WeakSet();\n\tconst circularReferencesReplacer = (key, value) => {\n\t\tif (typeof value === \"object\" && value !== null) {\n\t\t\tif (processedObjects.has(value)) return `[object ${value.constructor.name}]`;\n\t\t\tprocessedObjects.add(value);\n\t\t}\n\t\treturn value;\n\t};\n\tconst stringifiedData = data ? ` ${JSON.stringify(data, circularReferencesReplacer)}` : \"\";\n\tconst documentationLink = getLinkToDocumentationMessage(errorName);\n\tconst originalErrorMessage = originalError ? `\\nOriginal error: ${originalError.name}: ${originalError.message}` : \"\";\n\treturn errorName + stringifiedData + documentationLink + originalErrorMessage;\n}\n/**\n* Returns formatted console error arguments.\n*/\nfunction formatConsoleArguments(errorName, data) {\n\tconst documentationMessage = getLinkToDocumentationMessage(errorName);\n\treturn data ? [\n\t\terrorName,\n\t\tdata,\n\t\tdocumentationMessage\n\t] : [errorName, documentationMessage];\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/version\n*/\nconst version = \"48.5.1\";\nconst releaseDate = new Date(2026, 5, 2);\n/* v8 ignore next -- @preserve */\nif (globalThis.CKEDITOR_VERSION)\n /**\n* This error is thrown when, due to a mistake in the way CKEditor 5 was installed,\n* imported, or initialized, some of its modules were evaluated and executed twice.\n* Duplicate modules inevitably lead to runtime errors and increased bundle size.\n*\n* # Check dependency versions\n*\n* First, make sure that you use the latest version of all CKEditor 5 dependencies.\n* Depending on the installation method, you should check the versions of the `ckeditor5`,\n* `ckeditor5-premium-features`, or `@ckeditor/ckeditor5-<NAME>` packages. If you cannot update\n* to the latest version, ensure that all the CKEditor 5 packages are\n* in the same version.\n*\n* If you use third-party plugins, make sure to update them, too. If they are incompatible\n* with the version of CKEditor 5 you use, you may need to downgrade the CKEditor 5 packages\n* (which we do not recommend). Ask the plugin's author to upgrade the dependencies,\n* or fork their project and update it yourself.\n*\n* # Check imports\n*\n* The next step is to look at how you import CKEditor 5 into your project.\n*\n* **The {@glink updating/nim-migration/migration-to-new-installation-methods new installation methods}\n* are designed to prevent module duplication, so if you are not using them yet, you should consider\n* updating your project**. However, several legacy installation methods are still supported for backward\n* compatibility, and mixing them may result in module duplication.\n*\n* These are the most common import methods of the CKEditor 5 packages.\n*\n* - **New installation methods (NIM)** – Imports from the `ckeditor5` and `ckeditor5-premium-features` packages.\n* - **Optimized build** for the new installation methods – Imports from the `@ckeditor/ckeditor5-<NAME>/dist/index.js`.\n* - **Predefined builds** (no longer supported) – Imports from the `@ckeditor/ckeditor5-build-<NAME>` packages.\n* - **Default imports** (legacy) – Imports from the `@ckeditor/ckeditor5-<NAME>` packages (default export).\n* - **`src`** (legacy) – Imports from the `@ckeditor/ckeditor5-<NAME>/src/*`.\n* - **DLL builds** (legacy) – Imports from the `ckeditor5/build/<NAME>` and `@ckeditor/ckeditor5-<NAME>/build/*`.\n*\n* The best way to avoid duplicate modules is to avoid mixing these installation methods. For example, if you use imports\n* specific to the optimized build, you should use them for all CKEditor 5 packages. In addition, since\n* the DLL builds already include the core of the editor, they cannot be used with other types of imports.\n*\n* Here is a matrix showing which installation methods are compatible with each other:\n*\n* | | NIM | Optimized build | Predefined builds | Default imports | `src` | DLL builds |\n* |------------------|-----|-----------------|-------------------|-----------------|-------|------------|\n* | NIM | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ |\n* | Optimized builds | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ |\n* | Predefined build | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ |\n* | Default imports | ❌ | ❌ | ❌ | ✅ | ✅ | ❌ |\n* | `src` | ❌ | ❌ | ❌ | ✅ | ✅ | ❌ |\n* | DLL builds | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ |\n*\n* If you use any third-party plugins, make sure the way you import them is compatible with\n* the way you import CKEditor 5.\n*\n* <details>\n* <summary>New installation methods and optimized builds</summary>\n*\n* If you use the {@glink updating/nim-migration/migration-to-new-installation-methods new installation methods},\n* you should only import { code } from the `ckeditor5` and `ckeditor5-premium-features` packages.\n* Do not import { code } from the `@ckeditor/ckeditor5-<NAME>` packages unless you follow\n* the {@glink getting-started/setup/optimizing-build-size Optimizing build size} guide and the imports from\n* the `@ckeditor/ckeditor5-<NAME>` packages end with `/dist/index.js`.\n*\n* If you use a CDN, ensure that some files are not included twice in your project.\n*\n* Examples of valid and invalid import paths:\n*\n* ```js\n* import { ClassicEditor, Highlight } from 'ckeditor5'; // ✅\n* import { Highlight } from '@ckeditor/ckeditor5-highlight/dist/index.js'; // ✅\n* import { Highlight } from '@ckeditor/ckeditor5-highlight/src/highlight.js'; // ❌\n* import { Highlight } from '@ckeditor/ckeditor5-highlight'; // ❌\n* import '@ckeditor/ckeditor5-highlight/build/highlight.js'; // ❌\n* ```\n* </details>\n*\n* <details>\n* <summary>(Deprecated) Predefined builds</summary>\n*\n* **As of April, 2025 predefined build are no longer supported. Please refer to the\n* {@glink getting-started/index Quick Start} guide\n* to choose one of the modern installation and integration methods available**.\n*\n* If you use the predefined builds, you cannot import any additional plugins.\n* These builds already include the editor's core and selected plugins and importing additional\n* ones will cause some modules to be bundled and loaded twice.\n*\n* Examples of valid and invalid import paths:\n*\n* ```js\n* import { ClassicEditor } from '@ckeditor/ckeditor5-build-classic'; // ✅\n* import { Highlight } from 'ckeditor5'; // ❌\n* import { Highlight } from '@ckeditor/ckeditor5-highlight/dist/index.js'; // ❌\n* import { Highlight } from '@ckeditor/ckeditor5-highlight'; // ❌\n* import { Highlight } from '@ckeditor/ckeditor5-highlight/src/highlight'; // ❌\n* import '@ckeditor/ckeditor5-highlight/build/highlight'; // ❌\n* ```\n*\n* If you are missing some features from the list of plugins, you should switch to the\n* {@glink updating/nim-migration/migration-to-new-installation-methods new installation methods}\n* which do not have this limitation.\n* </details>\n*\n* <details>\n* <summary>(Legacy) Default imports and `src` imports</summary>\n*\n* If you use the legacy customized installation\n* method, you should only import code from the `@ckeditor/ckeditor5-<NAME>` packages. While you can import code from\n* the `@ckeditor/ckeditor5-<NAME>/src/*` files, it is not recommended as it can make migration to the new installation\n* methods more difficult.\n*\n* If you use this installation method, you should not import { code } from the `ckeditor5` or `ckeditor5-premium-features` packages.\n*\n* Examples of valid and invalid import paths:\n*\n* ```js\n* import { ClassicEditor } from '@ckeditor/ckeditor5-editor-classic'; // ✅\n* import { Highlight } from '@ckeditor/ckeditor5-highlight'; // ✅\n* import { Highlight } from '@ckeditor/ckeditor5-highlight/src/highlight.js'; // ✅ (not recommended)\n* import { Highlight } from 'ckeditor5'; // ❌\n* import { Highlight } from '@ckeditor/ckeditor5-highlight/dist/index.js'; // ❌\n* import '@ckeditor/ckeditor5-highlight/build/highlight'; // ❌\n* ```\n* </details>\n*\n* <details>\n* <summary>(Legacy) DLL builds</summary>\n*\n* If you are using the {@glink updating/nim-migration/dll-builds legacy DLL builds},\n* you should not import any non-DLL modules.\n*\n* Examples of valid and invalid import paths:\n*\n* ```js\n* import 'ckeditor5/build/ckeditor5-dll.js';// ✅\n* import '@ckeditor/ckeditor5-editor-classic/build/editor-classic.js';// ✅\n* import '@ckeditor/ckeditor5-highlight/build/highlight.js';// ✅\n* import { Highlight } from 'ckeditor5'; // ❌\n* import { Highlight } from '@ckeditor/ckeditor5-highlight/dist/index.js'; // ❌\n* import { Highlight } from '@ckeditor/ckeditor5-highlight'; // ❌\n* import { Highlight } from '@ckeditor/ckeditor5-highlight/src/highlight.js'; // ❌\n* ```\n* </details>\n*\n* # Reinstall `node_modules`\n*\n* Usually, npm and other package managers deduplicate all packages - for example, `ckeditor5` is only installed once\n* in `node_modules/`. However, it is known to fail to do so occasionally.\n*\n* To rule out this possibility, you can try the following:\n*\n* 1. Remove the `node_modules` directory.\n* 2. Remove the `package-lock.json`, `yarn.lock`, or `pnpm-lock.yaml` files (depending on the package manager used).\n* 3. Run `npm install` to reinstall all packages.\n* 4. Run `npm ls` to check how many times packages like `@ckeditor/ckeditor5-core` are installed.\n* If they are installed more than once, verify which package causes that.\n*\n* @error ckeditor-duplicated-modules\n*/\nthrow new CKEditorError(\"ckeditor-duplicated-modules\", null);\nelse globalThis.CKEDITOR_VERSION = version;\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/emittermixin\n*/\nconst _listeningTo = Symbol(\"listeningTo\");\nconst _emitterId = Symbol(\"emitterId\");\nconst _delegations = Symbol(\"delegations\");\nconst defaultEmitterClass$1 = /* #__PURE__ */ EmitterMixin(Object);\nfunction EmitterMixin(base) {\n\tif (!base) return defaultEmitterClass$1;\n\tclass Mixin extends base {\n\t\ton(event, callback, options) {\n\t\t\tthis.listenTo(this, event, callback, options);\n\t\t}\n\t\tonce(event, callback, options) {\n\t\t\tlet wasFired = false;\n\t\t\tconst onceCallback = (event, ...args) => {\n\t\t\t\tif (!wasFired) {\n\t\t\t\t\twasFired = true;\n\t\t\t\t\tevent.off();\n\t\t\t\t\tcallback.call(this, event, ...args);\n\t\t\t\t}\n\t\t\t};\n\t\t\tthis.listenTo(this, event, onceCallback, options);\n\t\t}\n\t\toff(event, callback) {\n\t\t\tthis.stopListening(this, event, callback);\n\t\t}\n\t\tlistenTo(emitter, event, callback, options = {}) {\n\t\t\tlet emitterInfo, eventCallbacks;\n\t\t\tif (!this[_listeningTo]) this[_listeningTo] = {};\n\t\t\tconst emitters = this[_listeningTo];\n\t\t\tif (!_getEmitterId(emitter)) _setEmitterId(emitter);\n\t\t\tconst emitterId = _getEmitterId(emitter);\n\t\t\tif (!(emitterInfo = emitters[emitterId])) emitterInfo = emitters[emitterId] = {\n\t\t\t\temitter,\n\t\t\t\tcallbacks: {}\n\t\t\t};\n\t\t\tif (!(eventCallbacks = emitterInfo.callbacks[event])) eventCallbacks = emitterInfo.callbacks[event] = [];\n\t\t\teventCallbacks.push(callback);\n\t\t\taddEventListener(this, emitter, event, callback, options);\n\t\t}\n\t\tstopListening(emitter, event, callback) {\n\t\t\tconst emitters = this[_listeningTo];\n\t\t\tlet emitterId = emitter && _getEmitterId(emitter);\n\t\t\tconst emitterInfo = emitters && emitterId ? emitters[emitterId] : void 0;\n\t\t\tconst eventCallbacks = emitterInfo && event ? emitterInfo.callbacks[event] : void 0;\n\t\t\tif (!emitters || emitter && !emitterInfo || event && !eventCallbacks) return;\n\t\t\tif (callback) {\n\t\t\t\tremoveEventListener(this, emitter, event, callback);\n\t\t\t\tif (eventCallbacks.indexOf(callback) !== -1) if (eventCallbacks.length === 1) delete emitterInfo.callbacks[event];\n\t\t\t\telse removeEventListener(this, emitter, event, callback);\n\t\t\t} else if (eventCallbacks) {\n\t\t\t\twhile (callback = eventCallbacks.pop()) removeEventListener(this, emitter, event, callback);\n\t\t\t\tdelete emitterInfo.callbacks[event];\n\t\t\t} else if (emitterInfo) {\n\t\t\t\tfor (event in emitterInfo.callbacks) this.stopListening(emitter, event);\n\t\t\t\tdelete emitters[emitterId];\n\t\t\t} else {\n\t\t\t\tfor (emitterId in emitters) this.stopListening(emitters[emitterId].emitter);\n\t\t\t\tdelete this[_listeningTo];\n\t\t\t}\n\t\t}\n\t\tfire(eventOrInfo, ...args) {\n\t\t\ttry {\n\t\t\t\tconst eventInfo = eventOrInfo instanceof EventInfo ? eventOrInfo : new EventInfo(this, eventOrInfo);\n\t\t\t\tconst event = eventInfo.name;\n\t\t\t\tlet callbacks = getCallbacksForEvent(this, event);\n\t\t\t\teventInfo.path.push(this);\n\t\t\t\tif (callbacks) {\n\t\t\t\t\tcallbacks = callbacks.slice();\n\t\t\t\t\tfor (let i = 0; i < callbacks.length; i++) {\n\t\t\t\t\t\tconst fn = callbacks[i].callback;\n\t\t\t\t\t\tfn.call(this, eventInfo, ...args);\n\t\t\t\t\t\tif (eventInfo.off.called) {\n\t\t\t\t\t\t\tdelete eventInfo.off.called;\n\t\t\t\t\t\t\tthis._removeEventListener(event, fn);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (eventInfo.stop.called) break;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconst delegations = this[_delegations];\n\t\t\t\tif (delegations) {\n\t\t\t\t\tconst destinations = delegations.get(event);\n\t\t\t\t\tconst passAllDestinations = delegations.get(\"*\");\n\t\t\t\t\tif (destinations) fireDelegatedEvents(destinations, eventInfo, args);\n\t\t\t\t\tif (passAllDestinations) fireDelegatedEvents(passAllDestinations, eventInfo, args);\n\t\t\t\t}\n\t\t\t\treturn eventInfo.return;\n\t\t\t} catch (err) {\n\t\t\t\t/* v8 ignore next -- @preserve */\n\t\t\t\tCKEditorError.rethrowUnexpectedError(err, this);\n\t\t\t}\n\t\t}\n\t\tdelegate(...events) {\n\t\t\treturn { to: (emitter, nameOrFunction) => {\n\t\t\t\tif (!this[_delegations]) this[_delegations] = /* @__PURE__ */ new Map();\n\t\t\t\tevents.forEach((eventName) => {\n\t\t\t\t\tconst destinations = this[_delegations].get(eventName);\n\t\t\t\t\tif (!destinations) this[_delegations].set(eventName, /* @__PURE__ */ new Map([[emitter, nameOrFunction]]));\n\t\t\t\t\telse destinations.set(emitter, nameOrFunction);\n\t\t\t\t});\n\t\t\t} };\n\t\t}\n\t\tstopDelegating(event, emitter) {\n\t\t\tif (!this[_delegations]) return;\n\t\t\tif (!event) this[_delegations].clear();\n\t\t\telse if (!emitter) this[_delegations].delete(event);\n\t\t\telse {\n\t\t\t\tconst destinations = this[_delegations].get(event);\n\t\t\t\tif (destinations) destinations.delete(emitter);\n\t\t\t}\n\t\t}\n\t\t_addEventListener(event, callback, options) {\n\t\t\tcreateEventNamespace(this, event);\n\t\t\tconst lists = getCallbacksListsForNamespace(this, event);\n\t\t\tconst callbackDefinition = {\n\t\t\t\tcallback,\n\t\t\t\tpriority: priorities.get(options.priority)\n\t\t\t};\n\t\t\tfor (const callbacks of lists) insertToPriorityArray(callbacks, callbackDefinition);\n\t\t}\n\t\t_removeEventListener(event, callback) {\n\t\t\tconst lists = getCallbacksListsForNamespace(this, event);\n\t\t\tfor (const callbacks of lists) for (let i = 0; i < callbacks.length; i++) if (callbacks[i].callback == callback) {\n\t\t\t\tcallbacks.splice(i, 1);\n\t\t\t\ti--;\n\t\t\t}\n\t\t}\n\t}\n\treturn Mixin;\n}\n/**\n* Checks if `listeningEmitter` listens to an emitter with given `listenedToEmitterId` and if so, returns that emitter.\n* If not, returns `null`.\n*\n* @internal\n* @param listeningEmitter An emitter that listens.\n* @param listenedToEmitterId Unique emitter id of emitter listened to.\n*/\nfunction _getEmitterListenedTo(listeningEmitter, listenedToEmitterId) {\n\tconst listeningTo = listeningEmitter[_listeningTo];\n\tif (listeningTo && listeningTo[listenedToEmitterId]) return listeningTo[listenedToEmitterId].emitter;\n\treturn null;\n}\n/**\n* Sets emitter's unique id.\n*\n* **Note:** `_emitterId` can be set only once.\n*\n* @internal\n* @param emitter An emitter for which id will be set.\n* @param id Unique id to set. If not passed, random unique id will be set.\n*/\nfunction _setEmitterId(emitter, id) {\n\tif (!emitter[_emitterId]) emitter[_emitterId] = id || uid();\n}\n/**\n* Returns emitter's unique id.\n*\n* @internal\n* @param emitter An emitter which id will be returned.\n*/\nfunction _getEmitterId(emitter) {\n\treturn emitter[_emitterId];\n}\n/**\n* Gets the internal `_events` property of the given object.\n* `_events` property store all lists with callbacks for registered event names.\n* If there were no events registered on the object, empty `_events` object is created.\n*/\nfunction getEvents(source) {\n\tif (!source._events) Object.defineProperty(source, \"_events\", { value: {} });\n\treturn source._events;\n}\n/**\n* Creates event node for generic-specific events relation architecture.\n*/\nfunction makeEventNode() {\n\treturn {\n\t\tcallbacks: [],\n\t\tchildEvents: []\n\t};\n}\n/**\n* Creates an architecture for generic-specific events relation.\n* If needed, creates all events for given eventName, i.e. if the first registered event\n* is foo:bar:abc, it will create foo:bar:abc, foo:bar and foo event and tie them together.\n* It also copies callbacks from more generic events to more specific events when\n* specific events are created.\n*/\nfunction createEventNamespace(source, eventName) {\n\tconst events = getEvents(source);\n\tif (events[eventName]) return;\n\tlet name = eventName;\n\tlet childEventName = null;\n\tconst newEventNodes = [];\n\twhile (name !== \"\") {\n\t\tif (events[name]) break;\n\t\tevents[name] = makeEventNode();\n\t\tnewEventNodes.push(events[name]);\n\t\tif (childEventName) events[name].childEvents.push(childEventName);\n\t\tchildEventName = name;\n\t\tname = name.substr(0, name.lastIndexOf(\":\"));\n\t}\n\tif (name !== \"\") {\n\t\tfor (const node of newEventNodes) node.callbacks = events[name].callbacks.slice();\n\t\tevents[name].childEvents.push(childEventName);\n\t}\n}\n/**\n* Gets an array containing callbacks list for a given event and it's more specific events.\n* I.e. if given event is foo:bar and there is also foo:bar:abc event registered, this will\n* return callback list of foo:bar and foo:bar:abc (but not foo).\n*/\nfunction getCallbacksListsForNamespace(source, eventName) {\n\tconst eventNode = getEvents(source)[eventName];\n\tif (!eventNode) return [];\n\tlet callbacksLists = [eventNode.callbacks];\n\tfor (let i = 0; i < eventNode.childEvents.length; i++) {\n\t\tconst childCallbacksLists = getCallbacksListsForNamespace(source, eventNode.childEvents[i]);\n\t\tcallbacksLists = callbacksLists.concat(childCallbacksLists);\n\t}\n\treturn callbacksLists;\n}\n/**\n* Get the list of callbacks for a given event, but only if there any callbacks have been registered.\n* If there are no callbacks registered for given event, it checks if this is a specific event and looks\n* for callbacks for it's more generic version.\n*/\nfunction getCallbacksForEvent(source, eventName) {\n\tif (!source._events) return null;\n\tlet currentEventName = eventName;\n\tdo {\n\t\tconst event = source._events[currentEventName];\n\t\tif (event && event.callbacks && event.callbacks.length) return event.callbacks;\n\t\tconst colonIndex = currentEventName.lastIndexOf(\":\");\n\t\tcurrentEventName = colonIndex > -1 ? currentEventName.substring(0, colonIndex) : \"\";\n\t} while (currentEventName);\n\treturn null;\n}\n/**\n* Fires delegated events for given map of destinations.\n*\n* @param destinations A map containing `[ {@link module:utils/emittermixin~Emitter}, \"event name\" ]` pair destinations.\n* @param eventInfo The original event info object.\n* @param fireArgs Arguments the original event was fired with.\n*/\nfunction fireDelegatedEvents(destinations, eventInfo, fireArgs) {\n\tfor (let [emitter, name] of destinations) {\n\t\tif (!name) name = eventInfo.name;\n\t\telse if (typeof name == \"function\") name = name(eventInfo.name);\n\t\tconst delegatedInfo = new EventInfo(eventInfo.source, name);\n\t\tdelegatedInfo.path = [...eventInfo.path];\n\t\temitter.fire(delegatedInfo, ...fireArgs);\n\t}\n}\n/**\n* Helper for registering event callback on the emitter.\n*/\nfunction addEventListener(listener, emitter, event, callback, options) {\n\tif (emitter._addEventListener) emitter._addEventListener(event, callback, options);\n\telse listener._addEventListener.call(emitter, event, callback, options);\n}\n/**\n* Helper for removing event callback from the emitter.\n*/\nfunction removeEventListener(listener, emitter, event, callback) {\n\tif (emitter._removeEventListener) emitter._removeEventListener(event, callback);\n\telse listener._removeEventListener.call(emitter, event, callback);\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/observablemixin\n*/\nconst observablePropertiesSymbol = Symbol(\"observableProperties\");\nconst boundObservablesSymbol = Symbol(\"boundObservables\");\nconst boundPropertiesSymbol = Symbol(\"boundProperties\");\nconst decoratedMethods = Symbol(\"decoratedMethods\");\nconst decoratedOriginal = Symbol(\"decoratedOriginal\");\nconst defaultObservableClass = /* #__PURE__ */ ObservableMixin(/* #__PURE__ */ EmitterMixin());\nfunction ObservableMixin(base) {\n\tif (!base) return defaultObservableClass;\n\tclass Mixin extends base {\n\t\tset(name, value) {\n\t\t\tif (isObject(name)) {\n\t\t\t\tObject.keys(name).forEach((property) => {\n\t\t\t\t\tthis.set(property, name[property]);\n\t\t\t\t}, this);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tinitObservable(this);\n\t\t\tconst properties = this[observablePropertiesSymbol];\n\t\t\tif (name in this && !properties.has(name))\n /**\n\t\t\t* Cannot override an existing property.\n\t\t\t*\n\t\t\t* This error is thrown when trying to {@link module:utils/observablemixin~Observable#set set} a property with\n\t\t\t* a name of an already existing property. For example:\n\t\t\t*\n\t\t\t* ```ts\n\t\t\t* let observable = new Model();\n\t\t\t* observable.property = 1;\n\t\t\t* observable.set( 'property', 2 );\t\t\t// throws\n\t\t\t*\n\t\t\t* observable.set( 'property', 1 );\n\t\t\t* observable.set( 'property', 2 );\t\t\t// ok, because this is an existing property.\n\t\t\t* ```\n\t\t\t*\n\t\t\t* @error observable-set-cannot-override\n\t\t\t*/\n\t\t\tthrow new CKEditorError(\"observable-set-cannot-override\", this);\n\t\t\tObject.defineProperty(this, name, {\n\t\t\t\tenumerable: true,\n\t\t\t\tconfigurable: true,\n\t\t\t\tget() {\n\t\t\t\t\treturn properties.get(name);\n\t\t\t\t},\n\t\t\t\tset(value) {\n\t\t\t\t\tconst oldValue = properties.get(name);\n\t\t\t\t\tlet newValue = this.fire(`set:${name}`, name, value, oldValue);\n\t\t\t\t\tif (newValue === void 0) newValue = value;\n\t\t\t\t\tif (oldValue !== newValue || !properties.has(name)) {\n\t\t\t\t\t\tproperties.set(name, newValue);\n\t\t\t\t\t\tthis.fire(`change:${name}`, name, newValue, oldValue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\tthis[name] = value;\n\t\t}\n\t\tbind(...bindProperties) {\n\t\t\tif (!bindProperties.length || !isStringArray(bindProperties))\n /**\n\t\t\t* All properties must be strings.\n\t\t\t*\n\t\t\t* @error observable-bind-wrong-properties\n\t\t\t*/\n\t\t\tthrow new CKEditorError(\"observable-bind-wrong-properties\", this);\n\t\t\tif (new Set(bindProperties).size !== bindProperties.length)\n /**\n\t\t\t* Properties must be unique.\n\t\t\t*\n\t\t\t* @error observable-bind-duplicate-properties\n\t\t\t*/\n\t\t\tthrow new CKEditorError(\"observable-bind-duplicate-properties\", this);\n\t\t\tinitObservable(this);\n\t\t\tconst boundProperties = this[boundPropertiesSymbol];\n\t\t\tbindProperties.forEach((propertyName) => {\n\t\t\t\tif (boundProperties.has(propertyName))\n /**\n\t\t\t\t* Cannot bind the same property more than once.\n\t\t\t\t*\n\t\t\t\t* @error observable-bind-rebind\n\t\t\t\t*/\n\t\t\t\tthrow new CKEditorError(\"observable-bind-rebind\", this);\n\t\t\t});\n\t\t\tconst bindings = /* @__PURE__ */ new Map();\n\t\t\tbindProperties.forEach((a) => {\n\t\t\t\tconst binding = {\n\t\t\t\t\tproperty: a,\n\t\t\t\t\tto: []\n\t\t\t\t};\n\t\t\t\tboundProperties.set(a, binding);\n\t\t\t\tbindings.set(a, binding);\n\t\t\t});\n\t\t\treturn {\n\t\t\t\tto: bindTo,\n\t\t\t\ttoMany: bindToMany,\n\t\t\t\t_observable: this,\n\t\t\t\t_bindProperties: bindProperties,\n\t\t\t\t_to: [],\n\t\t\t\t_bindings: bindings\n\t\t\t};\n\t\t}\n\t\tunbind(...unbindProperties) {\n\t\t\tif (!this[observablePropertiesSymbol]) return;\n\t\t\tconst boundProperties = this[boundPropertiesSymbol];\n\t\t\tconst boundObservables = this[boundObservablesSymbol];\n\t\t\tif (unbindProperties.length) {\n\t\t\t\tif (!isStringArray(unbindProperties))\n /**\n\t\t\t\t* Properties must be strings.\n\t\t\t\t*\n\t\t\t\t* @error observable-unbind-wrong-properties\n\t\t\t\t*/\n\t\t\t\tthrow new CKEditorError(\"observable-unbind-wrong-properties\", this);\n\t\t\t\tunbindProperties.forEach((propertyName) => {\n\t\t\t\t\tconst binding = boundProperties.get(propertyName);\n\t\t\t\t\tif (!binding) return;\n\t\t\t\t\tbinding.to.forEach(([toObservable, toProperty]) => {\n\t\t\t\t\t\tconst toProperties = boundObservables.get(toObservable);\n\t\t\t\t\t\tconst toPropertyBindings = toProperties[toProperty];\n\t\t\t\t\t\ttoPropertyBindings.delete(binding);\n\t\t\t\t\t\tif (!toPropertyBindings.size) delete toProperties[toProperty];\n\t\t\t\t\t\tif (!Object.keys(toProperties).length) {\n\t\t\t\t\t\t\tboundObservables.delete(toObservable);\n\t\t\t\t\t\t\tthis.stopListening(toObservable, \"change\");\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tboundProperties.delete(propertyName);\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tboundObservables.forEach((bindings, boundObservable) => {\n\t\t\t\t\tthis.stopListening(boundObservable, \"change\");\n\t\t\t\t});\n\t\t\t\tboundObservables.clear();\n\t\t\t\tboundProperties.clear();\n\t\t\t}\n\t\t}\n\t\tdecorate(methodName) {\n\t\t\tinitObservable(this);\n\t\t\tconst originalMethod = this[methodName];\n\t\t\tif (!originalMethod)\n /**\n\t\t\t* Cannot decorate an undefined method.\n\t\t\t*\n\t\t\t* @error observablemixin-cannot-decorate-undefined\n\t\t\t* @param {object} object The object which method should be decorated.\n\t\t\t* @param {string} methodName Name of the method which does not exist.\n\t\t\t*/\n\t\t\tthrow new CKEditorError(\"observablemixin-cannot-decorate-undefined\", this, {\n\t\t\t\tobject: this,\n\t\t\t\tmethodName\n\t\t\t});\n\t\t\tthis.on(methodName, (evt, args) => {\n\t\t\t\tevt.return = originalMethod.apply(this, args);\n\t\t\t});\n\t\t\tthis[methodName] = function(...args) {\n\t\t\t\treturn this.fire(methodName, args);\n\t\t\t};\n\t\t\tthis[methodName][decoratedOriginal] = originalMethod;\n\t\t\tif (!this[decoratedMethods]) this[decoratedMethods] = [];\n\t\t\tthis[decoratedMethods].push(methodName);\n\t\t}\n\t\tstopListening(emitter, event, callback) {\n\t\t\tif (!emitter && this[decoratedMethods]) {\n\t\t\t\tfor (const methodName of this[decoratedMethods]) this[methodName] = this[methodName][decoratedOriginal];\n\t\t\t\tdelete this[decoratedMethods];\n\t\t\t}\n\t\t\tsuper.stopListening(emitter, event, callback);\n\t\t}\n\t\t[observablePropertiesSymbol];\n\t\t[decoratedMethods];\n\t\t[boundPropertiesSymbol];\n\t\t[boundObservablesSymbol];\n\t}\n\treturn Mixin;\n}\nfunction initObservable(observable) {\n\tif (observable[observablePropertiesSymbol]) return;\n\tObject.defineProperty(observable, observablePropertiesSymbol, { value: /* @__PURE__ */ new Map() });\n\tObject.defineProperty(observable, boundObservablesSymbol, { value: /* @__PURE__ */ new Map() });\n\tObject.defineProperty(observable, boundPropertiesSymbol, { value: /* @__PURE__ */ new Map() });\n}\n/**\n* A chaining for {@link module:utils/observablemixin~Observable#bind} providing `.to()` interface.\n*\n* @param args Arguments of the `.to( args )` binding.\n*/\nfunction bindTo(...args) {\n\tconst parsedArgs = parseBindToArgs(...args);\n\tconst bindingsKeys = Array.from(this._bindings.keys());\n\tconst numberOfBindings = bindingsKeys.length;\n\tif (!parsedArgs.callback && parsedArgs.to.length > 1)\n /**\n\t* Binding multiple observables only possible with callback.\n\t*\n\t* @error observable-bind-to-no-callback\n\t*/\n\tthrow new CKEditorError(\"observable-bind-to-no-callback\", this);\n\tif (numberOfBindings > 1 && parsedArgs.callback)\n /**\n\t* Cannot bind multiple properties and use a callback in one binding.\n\t*\n\t* @error observable-bind-to-extra-callback\n\t*/\n\tthrow new CKEditorError(\"observable-bind-to-extra-callback\", this);\n\tparsedArgs.to.forEach((to) => {\n\t\tif (to.properties.length && to.properties.length !== numberOfBindings)\n /**\n\t\t* The number of properties must match.\n\t\t*\n\t\t* @error observable-bind-to-properties-length\n\t\t*/\n\t\tthrow new CKEditorError(\"observable-bind-to-properties-length\", this);\n\t\tif (!to.properties.length) to.properties = this._bindProperties;\n\t});\n\tthis._to = parsedArgs.to;\n\tif (parsedArgs.callback) this._bindings.get(bindingsKeys[0]).callback = parsedArgs.callback;\n\tattachBindToListeners(this._observable, this._to);\n\tupdateBindToBound(this);\n\tthis._bindProperties.forEach((propertyName) => {\n\t\tupdateBoundObservableProperty(this._observable, propertyName);\n\t});\n}\n/**\n* Binds to an attribute in a set of iterable observables.\n*/\nfunction bindToMany(observables, attribute, callback) {\n\tif (this._bindings.size > 1)\n /**\n\t* Binding one attribute to many observables only possible with one attribute.\n\t*\n\t* @error observable-bind-to-many-not-one-binding\n\t*/\n\tthrow new CKEditorError(\"observable-bind-to-many-not-one-binding\", this);\n\tthis.to(...getBindingTargets(observables, attribute), callback);\n}\n/**\n* Returns an array of binding components for\n* {@link Observable#bind} from a set of iterable observables.\n*/\nfunction getBindingTargets(observables, attribute) {\n\tconst observableAndAttributePairs = observables.map((observable) => [observable, attribute]);\n\treturn Array.prototype.concat.apply([], observableAndAttributePairs);\n}\n/**\n* Check if all entries of the array are of `String` type.\n*/\nfunction isStringArray(arr) {\n\treturn arr.every((a) => typeof a == \"string\");\n}\n/**\n* Parses and validates {@link Observable#bind}`.to( args )` arguments and returns\n* an object with a parsed structure. For example\n*\n* ```ts\n* A.bind( 'x' ).to( B, 'a', C, 'b', call );\n* ```\n*\n* becomes\n*\n* ```ts\n* {\n* \tto: [\n* \t\t{ observable: B, properties: [ 'a' ] },\n* \t\t{ observable: C, properties: [ 'b' ] },\n* \t],\n* \tcallback: call\n* }\n*\n* @param args Arguments of {@link Observable#bind}`.to( args )`.\n*/\nfunction parseBindToArgs(...args) {\n\tif (!args.length)\n /**\n\t* Invalid argument syntax in `to()`.\n\t*\n\t* @error observable-bind-to-parse-error\n\t*/\n\tthrow new CKEditorError(\"observable-bind-to-parse-error\", null);\n\tconst parsed = { to: [] };\n\tlet lastObservable;\n\tif (typeof args[args.length - 1] == \"function\") parsed.callback = args.pop();\n\targs.forEach((a) => {\n\t\tif (typeof a == \"string\") lastObservable.properties.push(a);\n\t\telse if (typeof a == \"object\") {\n\t\t\tlastObservable = {\n\t\t\t\tobservable: a,\n\t\t\t\tproperties: []\n\t\t\t};\n\t\t\tparsed.to.push(lastObservable);\n\t\t} else throw new CKEditorError(\"observable-bind-to-parse-error\", null);\n\t});\n\treturn parsed;\n}\n/**\n* Synchronizes {@link module:utils/observable#_boundObservables} with {@link Binding}.\n*\n* @param binding A binding to store in {@link Observable#_boundObservables}.\n* @param toObservable A observable, which is a new component of `binding`.\n* @param toPropertyName A name of `toObservable`'s property, a new component of the `binding`.\n*/\nfunction updateBoundObservables(observable, binding, toObservable, toPropertyName) {\n\tconst boundObservables = observable[boundObservablesSymbol];\n\tconst bindingsToObservable = boundObservables.get(toObservable);\n\tconst bindings = bindingsToObservable || {};\n\tif (!bindings[toPropertyName]) bindings[toPropertyName] = /* @__PURE__ */ new Set();\n\tbindings[toPropertyName].add(binding);\n\tif (!bindingsToObservable) boundObservables.set(toObservable, bindings);\n}\n/**\n* Synchronizes {@link Observable#_boundProperties} and {@link Observable#_boundObservables}\n* with {@link BindChain}.\n*\n* Assuming the following binding being created\n*\n* ```ts\n* A.bind( 'a', 'b' ).to( B, 'x', 'y' );\n* ```\n*\n* the following bindings were initialized by {@link Observable#bind} in {@link BindChain#_bindings}:\n*\n* ```ts\n* {\n* \ta: { observable: A, property: 'a', to: [] },\n* \tb: { observable: A, property: 'b', to: [] },\n* }\n* ```\n*\n* Iterate over all bindings in this chain and fill their `to` properties with\n* corresponding to( ... ) arguments (components of the binding), so\n*\n* ```ts\n* {\n* \ta: { observable: A, property: 'a', to: [ B, 'x' ] },\n* \tb: { observable: A, property: 'b', to: [ B, 'y' ] },\n* }\n* ```\n*\n* Then update the structure of {@link Observable#_boundObservables} with updated\n* binding, so it becomes:\n*\n* ```ts\n* Map( {\n* \tB: {\n* \t\tx: Set( [\n* \t\t\t{ observable: A, property: 'a', to: [ [ B, 'x' ] ] }\n* \t\t] ),\n* \t\ty: Set( [\n* \t\t\t{ observable: A, property: 'b', to: [ [ B, 'y' ] ] },\n* \t\t] )\n* \t}\n* } )\n* ```\n*\n* @param chain The binding initialized by {@link Observable#bind}.\n*/\nfunction updateBindToBound(chain) {\n\tlet toProperty;\n\tchain._bindings.forEach((binding, propertyName) => {\n\t\tchain._to.forEach((to) => {\n\t\t\ttoProperty = to.properties[binding.callback ? 0 : chain._bindProperties.indexOf(propertyName)];\n\t\t\tbinding.to.push([to.observable, toProperty]);\n\t\t\tupdateBoundObservables(chain._observable, binding, to.observable, toProperty);\n\t\t});\n\t});\n}\n/**\n* Updates an property of a {@link Observable} with a value\n* determined by an entry in {@link Observable#_boundProperties}.\n*\n* @param observable A observable which property is to be updated.\n* @param propertyName An property to be updated.\n*/\nfunction updateBoundObservableProperty(observable, propertyName) {\n\tconst binding = observable[boundPropertiesSymbol].get(propertyName);\n\tlet propertyValue;\n\tif (binding.callback) propertyValue = binding.callback.apply(observable, binding.to.map((to) => to[0][to[1]]));\n\telse {\n\t\tpropertyValue = binding.to[0];\n\t\tpropertyValue = propertyValue[0][propertyValue[1]];\n\t}\n\tif (Object.prototype.hasOwnProperty.call(observable, propertyName)) observable[propertyName] = propertyValue;\n\telse observable.set(propertyName, propertyValue);\n}\n/**\n* Starts listening to changes in {@link BindChain._to} observables to update\n* {@link BindChain._observable} {@link BindChain._bindProperties}. Also sets the\n* initial state of {@link BindChain._observable}.\n*\n* @param chain The chain initialized by {@link Observable#bind}.\n*/\nfunction attachBindToListeners(observable, toBindings) {\n\ttoBindings.forEach((to) => {\n\t\tconst boundObservables = observable[boundObservablesSymbol];\n\t\tlet bindings;\n\t\tif (!boundObservables.get(to.observable)) observable.listenTo(to.observable, \"change\", (evt, propertyName) => {\n\t\t\tbindings = boundObservables.get(to.observable)[propertyName];\n\t\t\tif (bindings) bindings.forEach((binding) => {\n\t\t\t\tupdateBoundObservableProperty(observable, binding.property);\n\t\t\t});\n\t\t});\n\t});\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/elementreplacer\n*/\n/**\n* Utility class allowing to hide existing HTML elements or replace them with given ones in a way that doesn't remove\n* the original elements from the DOM.\n*/\nvar ElementReplacer = class {\n\t/**\n\t* The elements replaced by {@link #replace} and their replacements.\n\t*/\n\t_replacedElements;\n\tconstructor() {\n\t\tthis._replacedElements = [];\n\t}\n\t/**\n\t* Hides the `element` and, if specified, inserts the the given element next to it.\n\t*\n\t* The effect of this method can be reverted by {@link #restore}.\n\t*\n\t* @param element The element to replace.\n\t* @param newElement The replacement element. If not passed, then the `element` will just be hidden.\n\t*/\n\treplace(element, newElement) {\n\t\tthis._replacedElements.push({\n\t\t\telement,\n\t\t\tnewElement\n\t\t});\n\t\telement.style.display = \"none\";\n\t\tif (newElement) element.parentNode.insertBefore(newElement, element.nextSibling);\n\t}\n\t/**\n\t* Restores what {@link #replace} did.\n\t*/\n\trestore() {\n\t\tthis._replacedElements.forEach(({ element, newElement }) => {\n\t\t\telement.style.display = \"\";\n\t\t\tif (newElement) newElement.remove();\n\t\t});\n\t\tthis._replacedElements = [];\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/abortabledebounce\n*/\n/**\n* Returns a function wrapper that will execute the provided function and abort any previous call that is still in progress.\n*\n* @param func The function to be called. It will be provided with `AbortSignal` as the first parameter.\n*/\nfunction abortableDebounce(func) {\n\tlet controller = new AbortController();\n\tfunction abortable(...args) {\n\t\tcontroller.abort();\n\t\tcontroller = new AbortController();\n\t\treturn func(controller.signal, ...args);\n\t}\n\tabortable.abort = () => controller.abort();\n\treturn abortable;\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/count\n*/\n/**\n* Returns the number of items return by the iterator.\n*\n* ```ts\n* count( [ 1, 2, 3, 4, 5 ] ); // 5;\n* ```\n*\n* @param iterable Any iterable.\n* @returns Number of items returned by that iterable.\n*/\nfunction count(iterable) {\n\tlet count = 0;\n\tfor (const _ of iterable) count++;\n\treturn count;\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/comparearrays\n*/\n/**\n* Compares how given arrays relate to each other. One array can be: same as another array, prefix of another array\n* or completely different. If arrays are different, first index at which they differ is returned. Otherwise,\n* a flag specifying the relation is returned. Flags are negative numbers, so whenever a number >= 0 is returned\n* it means that arrays differ.\n*\n* ```ts\n* compareArrays( [ 0, 2 ], [ 0, 2 ] );\t\t// 'same'\n* compareArrays( [ 0, 2 ], [ 0, 2, 1 ] );\t\t// 'prefix'\n* compareArrays( [ 0, 2 ], [ 0 ] );\t\t\t// 'extension'\n* compareArrays( [ 0, 2 ], [ 1, 2 ] );\t\t// 0\n* compareArrays( [ 0, 2 ], [ 0, 1 ] );\t\t// 1\n* ```\n*\n* @param a Array that is compared.\n* @param b Array to compare with.\n* @returns How array `a` is related to `b`.\n*/\nfunction compareArrays(a, b) {\n\tconst minLen = Math.min(a.length, b.length);\n\tfor (let i = 0; i < minLen; i++) if (a[i] != b[i]) return i;\n\tif (a.length == b.length) return \"same\";\n\telse if (a.length < b.length) return \"prefix\";\n\telse return \"extension\";\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/isiterable\n*/\n/**\n* Checks if value implements iterator interface.\n*\n* @param value The value to check.\n* @returns True if value implements iterator interface.\n*/\nfunction isIterable(value) {\n\treturn !!(value && value[Symbol.iterator]);\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/dom/createelement\n*/\n/**\n* Creates an HTML or SVG element with attributes and children elements.\n*\n* ```ts\n* createElement( document, 'p' ); // <p>\n* createElement( document, 'mask', { xmlns: 'http://www.w3.org/2000/svg' } ); // <mask>\n* ```\n*\n* @param doc Document used to create the element.\n* @param name Name of the element.\n* @param attributes Object where keys represent attribute keys and values represent attribute values.\n* @param children Child or any iterable of children. Strings will be automatically turned into Text nodes.\n* @returns HTML or SVG element.\n*/\nfunction createElement(doc, name, attributes = {}, children = []) {\n\tconst namespace = attributes && attributes.xmlns;\n\tconst element = namespace ? doc.createElementNS(namespace, name) : doc.createElement(name);\n\tfor (const key in attributes) element.setAttribute(key, attributes[key]);\n\tif (isString(children) || !isIterable(children)) children = [children];\n\tfor (let child of children) {\n\t\tif (isString(child)) child = doc.createTextNode(child);\n\t\telement.appendChild(child);\n\t}\n\treturn element;\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/config\n*/\n/**\n* Handles a configuration dictionary.\n*\n* @typeParam Cfg A type of the configuration dictionary.\n*/\nvar Config = class {\n\t/**\n\t* Store for the whole configuration.\n\t*/\n\t_config;\n\t/**\n\t* Creates an instance of the {@link ~Config} class.\n\t*\n\t* @param configurations The initial configurations to be set. Usually, provided by the user.\n\t* @param defaultConfigurations The default configurations. Usually, provided by the system.\n\t*/\n\tconstructor(configurations, defaultConfigurations) {\n\t\tthis._config = Object.create(null);\n\t\tif (defaultConfigurations) this.define(cloneConfig(defaultConfigurations));\n\t\tif (configurations) this._setObjectToTarget(this._config, configurations);\n\t}\n\tset(name, value) {\n\t\tthis._setToTarget(this._config, name, value);\n\t}\n\tdefine(name, value) {\n\t\tthis._setToTarget(this._config, name, value, true);\n\t}\n\t/**\n\t* Gets the value for a configuration entry.\n\t*\n\t* ```ts\n\t* config.get( 'name' );\n\t* ```\n\t*\n\t* Deep configurations can be retrieved by separating each part with a dot.\n\t*\n\t* ```ts\n\t* config.get( 'toolbar.collapsed' );\n\t* ```\n\t*\n\t* @param name The configuration name. Configuration names are case-sensitive.\n\t* @returns The configuration value or `undefined` if the configuration entry was not found.\n\t*/\n\tget(name) {\n\t\treturn this._getFromSource(this._config, name);\n\t}\n\t/**\n\t* Iterates over all top level configuration names.\n\t*/\n\t*names() {\n\t\tfor (const name of Object.keys(this._config)) yield name;\n\t}\n\t/**\n\t* Saves passed configuration to the specified target (nested object).\n\t*\n\t* @param target Nested config object.\n\t* @param name The configuration name or an object from which take properties as\n\t* configuration entries. Configuration names are case-sensitive.\n\t* @param value The configuration value. Used if a name is passed.\n\t* @param isDefine Define if passed configuration should overwrite existing one.\n\t*/\n\t_setToTarget(target, name, value, isDefine = false) {\n\t\tif (isPlainObject(name)) {\n\t\t\tthis._setObjectToTarget(target, name, isDefine);\n\t\t\treturn;\n\t\t}\n\t\tconst parts = name.split(\".\");\n\t\tname = parts.pop();\n\t\tfor (const part of parts) {\n\t\t\tif (!isPlainObject(target[part])) target[part] = Object.create(null);\n\t\t\ttarget = target[part];\n\t\t}\n\t\tif (isPlainObject(value)) {\n\t\t\tif (!isPlainObject(target[name])) target[name] = Object.create(null);\n\t\t\ttarget = target[name];\n\t\t\tthis._setObjectToTarget(target, value, isDefine);\n\t\t\treturn;\n\t\t}\n\t\tif (isDefine && typeof target[name] != \"undefined\") return;\n\t\ttarget[name] = value;\n\t}\n\t/**\n\t* Get specified configuration from specified source (nested object).\n\t*\n\t* @param source level of nested object.\n\t* @param name The configuration name. Configuration names are case-sensitive.\n\t* @returns The configuration value or `undefined` if the configuration entry was not found.\n\t*/\n\t_getFromSource(source, name) {\n\t\tconst parts = name.split(\".\");\n\t\tname = parts.pop();\n\t\tfor (const part of parts) {\n\t\t\tif (!isPlainObject(source[part])) {\n\t\t\t\tsource = null;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tsource = source[part];\n\t\t}\n\t\treturn source ? cloneConfig(source[name]) : void 0;\n\t}\n\t/**\n\t* Iterates through passed object and calls {@link #_setToTarget} method with object key and value for each property.\n\t*\n\t* @param target Nested config object.\n\t* @param configuration Configuration data set\n\t* @param isDefine Defines if passed configuration is default configuration or not.\n\t*/\n\t_setObjectToTarget(target, configuration, isDefine) {\n\t\tObject.keys(configuration).forEach((key) => {\n\t\t\tthis._setToTarget(target, key, configuration[key], isDefine);\n\t\t});\n\t}\n};\n/**\n* Clones configuration object or value.\n*/\nfunction cloneConfig(source) {\n\treturn cloneDeepWith(source, leaveItemReferences);\n}\n/**\n* A customized function for cloneDeepWith.\n* In case if it's a DOM Element it will leave references to DOM Elements instead of cloning them.\n* If it's a function it will leave reference to actuall function.\n*/\nfunction leaveItemReferences(value) {\n\treturn isElement(value) || typeof value === \"function\" ? value : void 0;\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/dom/isnode\n*/\n/**\n* Checks if the object is a native DOM Node.\n*/\nfunction isNode(obj) {\n\tif (obj) {\n\t\tif (obj.defaultView) return obj instanceof obj.defaultView.Document;\n\t\telse if (obj.ownerDocument && obj.ownerDocument.defaultView) return obj instanceof obj.ownerDocument.defaultView.Node;\n\t}\n\treturn false;\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/dom/iswindow\n*/\n/**\n* Checks if the object is a native DOM Window.\n*/\nfunction isWindow(obj) {\n\tconst stringifiedObject = Object.prototype.toString.apply(obj);\n\tif (stringifiedObject == \"[object Window]\") return true;\n\tif (stringifiedObject == \"[object global]\") return true;\n\treturn false;\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/dom/emittermixin\n*/\nconst defaultEmitterClass = /* #__PURE__ */ DomEmitterMixin(/* #__PURE__ */ EmitterMixin());\nconst ProxyEmitterBase = /* #__PURE__ */ EmitterMixin();\nfunction DomEmitterMixin(base) {\n\tif (!base) return defaultEmitterClass;\n\tclass Mixin extends base {\n\t\tlistenTo(emitter, event, callback, options = {}) {\n\t\t\tif (isNode(emitter) || isWindow(emitter) || emitter instanceof globalVar.window.EventTarget) {\n\t\t\t\tconst proxyOptions = {\n\t\t\t\t\tcapture: !!options.useCapture,\n\t\t\t\t\tpassive: !!options.usePassive\n\t\t\t\t};\n\t\t\t\tconst proxyEmitter = this._getProxyEmitter(emitter, proxyOptions) || new ProxyEmitter(emitter, proxyOptions);\n\t\t\t\tthis.listenTo(proxyEmitter, event, callback, options);\n\t\t\t} else super.listenTo(emitter, event, callback, options);\n\t\t}\n\t\tstopListening(emitter, event, callback) {\n\t\t\tif (isNode(emitter) || isWindow(emitter) || emitter instanceof globalVar.window.EventTarget) {\n\t\t\t\tconst proxyEmitters = this._getAllProxyEmitters(emitter);\n\t\t\t\tfor (const proxy of proxyEmitters) this.stopListening(proxy, event, callback);\n\t\t\t} else super.stopListening(emitter, event, callback);\n\t\t}\n\t\t/**\n\t\t* Retrieves ProxyEmitter instance for given DOM Node residing in this Host and given options.\n\t\t*\n\t\t* @param node DOM Node of the ProxyEmitter.\n\t\t* @param options Additional options.\n\t\t* @param options.useCapture Indicates that events of this type will be dispatched to the registered\n\t\t* listener before being dispatched to any EventTarget beneath it in the DOM tree.\n\t\t* @param options.usePassive Indicates that the function specified by listener will never call preventDefault()\n\t\t* and prevents blocking browser's main thread by this event handler.\n\t\t* @returns ProxyEmitter instance bound to the DOM Node.\n\t\t*/\n\t\t_getProxyEmitter(node, options) {\n\t\t\treturn _getEmitterListenedTo(this, getProxyEmitterId(node, options));\n\t\t}\n\t\t/**\n\t\t* Retrieves all the ProxyEmitter instances for given DOM Node residing in this Host.\n\t\t*\n\t\t* @param node DOM Node of the ProxyEmitter.\n\t\t*/\n\t\t_getAllProxyEmitters(node) {\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\tcapture: false,\n\t\t\t\t\tpassive: false\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcapture: false,\n\t\t\t\t\tpassive: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcapture: true,\n\t\t\t\t\tpassive: false\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcapture: true,\n\t\t\t\t\tpassive: true\n\t\t\t\t}\n\t\t\t].map((options) => this._getProxyEmitter(node, options)).filter((proxy) => !!proxy);\n\t\t}\n\t}\n\treturn Mixin;\n}\n/**\n* Creates a ProxyEmitter instance. Such an instance is a bridge between a DOM Node firing events\n* and any Host listening to them. It is backwards compatible with {@link module:utils/emittermixin~Emitter#on}.\n* There is a separate instance for each combination of modes (useCapture & usePassive). The mode is concatenated with\n* UID stored in HTMLElement to give each instance unique identifier.\n*\n* listenTo( click, ... )\n* +-----------------------------------------+\n* | stopListening( ... ) |\n* +----------------------------+ | addEventListener( click, ... )\n* | Host | | +---------------------------------------------+\n* +----------------------------+ | | removeEventListener( click, ... ) |\n* | _listeningTo: { | +----------v-------------+ |\n* | UID+mode: { | | ProxyEmitter | |\n* | emitter: ProxyEmitter, | +------------------------+ +------------v----------+\n* | callbacks: { | | events: { | | Node (HTMLElement) |\n* | click: [ callbacks ] | | click: [ callbacks ] | +-----------------------+\n* | } | | }, | | data-ck-expando: UID |\n* | } | | _domNode: Node, | +-----------------------+\n* | } | | _domListeners: {}, | |\n* | +------------------------+ | | _emitterId: UID+mode | |\n* | | DomEmitterMixin | | +--------------^---------+ |\n* | +------------------------+ | | | |\n* +--------------^-------------+ | +---------------------------------------------+\n* | | click (DOM Event)\n* +-----------------------------------------+\n* fire( click, DOM Event )\n*/\nvar ProxyEmitter = class extends ProxyEmitterBase {\n\t_domNode;\n\t_options;\n\t/**\n\t* @param node DOM Node that fires events.\n\t* @param options Additional options.\n\t* @param options.useCapture Indicates that events of this type will be dispatched to the registered\n\t* listener before being dispatched to any EventTarget beneath it in the DOM tree.\n\t* @param options.usePassive Indicates that the function specified by listener will never call preventDefault()\n\t* and prevents blocking browser's main thread by this event handler.\n\t*/\n\tconstructor(node, options) {\n\t\tsuper();\n\t\t_setEmitterId(this, getProxyEmitterId(node, options));\n\t\tthis._domNode = node;\n\t\tthis._options = options;\n\t}\n\t/**\n\t* Collection of native DOM listeners.\n\t*/\n\t_domListeners;\n\t/**\n\t* Registers a callback function to be executed when an event is fired.\n\t*\n\t* It attaches a native DOM listener to the DOM Node. When fired,\n\t* a corresponding Emitter event will also fire with DOM Event object as an argument.\n\t*\n\t* **Note**: This is automatically called by the\n\t* {@link module:utils/emittermixin~Emitter#listenTo `Emitter#listenTo()`}.\n\t*\n\t* @param event The name of the event.\n\t*/\n\tattach(event) {\n\t\tif (this._domListeners && this._domListeners[event]) return;\n\t\tconst domListener = this._createDomListener(event);\n\t\tthis._domNode.addEventListener(event, domListener, this._options);\n\t\tif (!this._domListeners) this._domListeners = {};\n\t\tthis._domListeners[event] = domListener;\n\t}\n\t/**\n\t* Stops executing the callback on the given event.\n\t*\n\t* **Note**: This is automatically called by the\n\t* {@link module:utils/emittermixin~Emitter#stopListening `Emitter#stopListening()`}.\n\t*\n\t* @param event The name of the event.\n\t*/\n\tdetach(event) {\n\t\tlet events;\n\t\tif (this._domListeners[event] && (!(events = this._events[event]) || !events.callbacks.length)) this._domListeners[event].removeListener();\n\t}\n\t/**\n\t* Adds callback to emitter for given event.\n\t*\n\t* @internal\n\t* @param event The name of the event.\n\t* @param callback The function to be called on event.\n\t* @param options Additional options.\n\t*/\n\t_addEventListener(event, callback, options) {\n\t\tthis.attach(event);\n\t\tEmitterMixin().prototype._addEventListener.call(this, event, callback, options);\n\t}\n\t/**\n\t* Removes callback from emitter for given event.\n\t*\n\t* @internal\n\t* @param event The name of the event.\n\t* @param callback The function to stop being called.\n\t*/\n\t_removeEventListener(event, callback) {\n\t\tEmitterMixin().prototype._removeEventListener.call(this, event, callback);\n\t\tthis.detach(event);\n\t}\n\t/**\n\t* Creates a native DOM listener callback. When the native DOM event\n\t* is fired it will fire corresponding event on this ProxyEmitter.\n\t* Note: A native DOM Event is passed as an argument.\n\t*\n\t* @param event The name of the event.\n\t* @returns The DOM listener callback.\n\t*/\n\t_createDomListener(event) {\n\t\tconst domListener = (domEvt) => {\n\t\t\tthis.fire(event, domEvt);\n\t\t};\n\t\tdomListener.removeListener = () => {\n\t\t\tthis._domNode.removeEventListener(event, domListener, this._options);\n\t\t\tdelete this._domListeners[event];\n\t\t};\n\t\treturn domListener;\n\t}\n};\n/**\n* Gets an unique DOM Node identifier. The identifier will be set if not defined.\n*\n* @returns UID for given DOM Node.\n*/\nfunction getNodeUID(node) {\n\treturn node[\"data-ck-expando\"] || (node[\"data-ck-expando\"] = uid());\n}\n/**\n* Gets id of the ProxyEmitter for the given node.\n*/\nfunction getProxyEmitterId(node, options) {\n\tlet id = getNodeUID(node);\n\tfor (const option of Object.keys(options).sort()) if (options[option]) id += \"-\" + option;\n\treturn id;\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/dom/findclosestscrollableancestor\n*/\n/**\n* Returns the closest scrollable ancestor of a DOM element.\n*\n* @param domElement DOM element.\n* @returns First ancestor of `domElement` that is scrollable or null if such ancestor doesn't exist.\n*/\nfunction findClosestScrollableAncestor(domElement) {\n\tlet element = domElement.parentElement;\n\tif (!element) return null;\n\twhile (element.tagName != \"BODY\") {\n\t\tconst overflow = element.style.overflowY || globalVar.window.getComputedStyle(element).overflowY;\n\t\tif (overflow === \"auto\" || overflow === \"scroll\") break;\n\t\telement = element.parentElement;\n\t\tif (!element) return null;\n\t}\n\treturn element;\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/dom/getancestors\n*/\n/**\n* Returns all ancestors of given DOM node, starting from the top-most (root). Includes the given node itself. If the\n* node is a part of `DocumentFragment` that `DocumentFragment` will be returned. In contrary, if the node is\n* appended to a `Document`, that `Document` will not be returned (algorithms operating on DOM tree care for `Document#documentElement`\n* at most, which will be returned).\n*\n* @param node DOM node.\n* @returns Array of given `node` parents.\n*/\nfunction getAncestors(node) {\n\tconst nodes = [];\n\tlet currentNode = node;\n\twhile (currentNode && currentNode.nodeType != Node.DOCUMENT_NODE) {\n\t\tnodes.unshift(currentNode);\n\t\tcurrentNode = currentNode.parentNode;\n\t}\n\treturn nodes;\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/dom/getdatafromelement\n*/\n/**\n* Gets data from a given source element.\n*\n* @param el The element from which the data will be retrieved.\n* @returns The data string.\n*/\nfunction getDataFromElement(el) {\n\tif (el instanceof HTMLTextAreaElement) return el.value;\n\treturn el.innerHTML;\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/dom/getborderwidths\n*/\n/**\n* Returns an object containing CSS border widths of a specified HTML element.\n*\n* @param element An element which has CSS borders.\n* @returns An object containing `top`, `left`, `right` and `bottom` properties\n* with numerical values of the `border-[top,left,right,bottom]-width` CSS styles.\n*/\nfunction getBorderWidths(element) {\n\tconst style = element.ownerDocument.defaultView.getComputedStyle(element);\n\treturn {\n\t\ttop: parseInt(style.borderTopWidth, 10),\n\t\tright: parseInt(style.borderRightWidth, 10),\n\t\tbottom: parseInt(style.borderBottomWidth, 10),\n\t\tleft: parseInt(style.borderLeftWidth, 10)\n\t};\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/dom/getrangefrommouseevent\n*/\n/**\n* Returns a DOM range from a given point specified by a mouse event.\n*\n* @param domEvent The mouse event.\n* @returns The DOM range.\n*/\nfunction getRangeFromMouseEvent(domEvent) {\n\tif (!domEvent.target) return null;\n\tconst domDoc = domEvent.target.ownerDocument;\n\tconst x = domEvent.clientX;\n\tconst y = domEvent.clientY;\n\tlet domRange = null;\n\tif (domDoc.caretRangeFromPoint && domDoc.caretRangeFromPoint(x, y)) domRange = domDoc.caretRangeFromPoint(x, y);\n\telse if (domEvent.rangeParent) {\n\t\tdomRange = domDoc.createRange();\n\t\tdomRange.setStart(domEvent.rangeParent, domEvent.rangeOffset);\n\t\tdomRange.collapse(true);\n\t}\n\treturn domRange;\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/dom/getcommonancestor\n*/\n/**\n* Searches and returns the lowest common ancestor of two given nodes.\n*\n* @param nodeA First node.\n* @param nodeB Second node.\n* @returns Lowest common ancestor of both nodes or `null` if nodes do not have a common ancestor.\n*/\nfunction getCommonAncestor(nodeA, nodeB) {\n\tconst ancestorsA = getAncestors(nodeA);\n\tconst ancestorsB = getAncestors(nodeB);\n\tlet i = 0;\n\twhile (ancestorsA[i] == ancestorsB[i] && ancestorsA[i]) i++;\n\treturn i === 0 ? null : ancestorsA[i - 1];\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/dom/getpositionedancestor\n*/\n/**\n* For a given element, returns the nearest ancestor element which CSS position is not \"static\".\n*\n* @param element The native DOM element to be checked.\n*/\nfunction getPositionedAncestor(element) {\n\tif (!element || !element.parentNode) return null;\n\tif (element.offsetParent === globalVar.document.body) return null;\n\treturn element.offsetParent;\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/dom/istext\n*/\n/**\n* Checks if the object is a native DOM Text node.\n*/\nfunction isText(obj) {\n\treturn Object.prototype.toString.call(obj) == \"[object Text]\";\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/dom/isrange\n*/\n/**\n* Checks if the object is a native DOM Range.\n*/\nfunction isRange(obj) {\n\treturn Object.prototype.toString.apply(obj) == \"[object Range]\";\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/dom/rect\n*/\nconst RECT_PROPERTIES = [\n\t\"top\",\n\t\"right\",\n\t\"bottom\",\n\t\"left\",\n\t\"width\",\n\t\"height\"\n];\nconst POSITIONING_VALUES = /* @__PURE__ */ new Set([\n\t\"relative\",\n\t\"absolute\",\n\t\"fixed\",\n\t\"sticky\"\n]);\n/**\n* A helper class representing a `ClientRect` object, e.g. value returned by\n* the native `object.getBoundingClientRect()` method. Provides a set of methods\n* to manipulate the rect and compare it against other rect instances.\n*/\nvar Rect = class Rect {\n\t/**\n\t* The \"top\" value of the rect.\n\t*\n\t* @readonly\n\t*/\n\ttop;\n\t/**\n\t* The \"right\" value of the rect.\n\t*\n\t* @readonly\n\t*/\n\tright;\n\t/**\n\t* The \"bottom\" value of the rect.\n\t*\n\t* @readonly\n\t*/\n\tbottom;\n\t/**\n\t* The \"left\" value of the rect.\n\t*\n\t* @readonly\n\t*/\n\tleft;\n\t/**\n\t* The \"width\" value of the rect.\n\t*\n\t* @readonly\n\t*/\n\twidth;\n\t/**\n\t* The \"height\" value of the rect.\n\t*\n\t* @readonly\n\t*/\n\theight;\n\t/**\n\t* The object this rect is for.\n\t*\n\t* @readonly\n\t*/\n\t_source;\n\t/**\n\t* Creates an instance of rect.\n\t*\n\t* ```ts\n\t* // Rect of an HTMLElement.\n\t* const rectA = new Rect( document.body );\n\t*\n\t* // Rect of a DOM Range.\n\t* const rectB = new Rect( document.getSelection().getRangeAt( 0 ) );\n\t*\n\t* // Rect of a window (web browser viewport).\n\t* const rectC = new Rect( window );\n\t*\n\t* // Rect out of an object.\n\t* const rectD = new Rect( { top: 0, right: 10, bottom: 10, left: 0, width: 10, height: 10 } );\n\t*\n\t* // Rect out of another Rect instance.\n\t* const rectE = new Rect( rectD );\n\t*\n\t* // Rect out of a ClientRect.\n\t* const rectF = new Rect( document.body.getClientRects().item( 0 ) );\n\t* ```\n\t*\n\t* **Note**: By default a rect of an HTML element includes its CSS borders and scrollbars (if any)\n\t* ant the rect of a `window` includes scrollbars too. Use {@link #excludeScrollbarsAndBorders}\n\t* to get the inner part of the rect.\n\t*\n\t* @param source A source object to create the rect.\n\t*/\n\tconstructor(source) {\n\t\tconst isSourceRange = isRange(source);\n\t\tObject.defineProperty(this, \"_source\", {\n\t\t\tvalue: source._source || source,\n\t\t\twritable: true,\n\t\t\tenumerable: false\n\t\t});\n\t\tif (isDomElement(source) || isSourceRange) if (isSourceRange) {\n\t\t\tconst rangeRects = Rect.getDomRangeRects(source);\n\t\t\tcopyRectProperties(this, Rect.getBoundingRect(rangeRects));\n\t\t} else copyRectProperties(this, source.getBoundingClientRect());\n\t\telse if (isWindow(source)) {\n\t\t\tconst { innerWidth, innerHeight } = source;\n\t\t\tcopyRectProperties(this, {\n\t\t\t\ttop: 0,\n\t\t\t\tright: innerWidth,\n\t\t\t\tbottom: innerHeight,\n\t\t\t\tleft: 0,\n\t\t\t\twidth: innerWidth,\n\t\t\t\theight: innerHeight\n\t\t\t});\n\t\t} else copyRectProperties(this, source);\n\t}\n\t/**\n\t* Returns a clone of the rect.\n\t*\n\t* @returns A cloned rect.\n\t*/\n\tclone() {\n\t\treturn new Rect(this);\n\t}\n\t/**\n\t* Moves the rect so that its upper–left corner lands in desired `[ x, y ]` location.\n\t*\n\t* @param x Desired horizontal location.\n\t* @param y Desired vertical location.\n\t* @returns A rect which has been moved.\n\t*/\n\tmoveTo(x, y) {\n\t\tthis.top = y;\n\t\tthis.right = x + this.width;\n\t\tthis.bottom = y + this.height;\n\t\tthis.left = x;\n\t\treturn this;\n\t}\n\t/**\n\t* Moves the rect in–place by a dedicated offset.\n\t*\n\t* @param x A horizontal offset.\n\t* @param y A vertical offset\n\t* @returns A rect which has been moved.\n\t*/\n\tmoveBy(x, y) {\n\t\tthis.top += y;\n\t\tthis.right += x;\n\t\tthis.left += x;\n\t\tthis.bottom += y;\n\t\treturn this;\n\t}\n\t/**\n\t* Returns a new rect a a result of intersection with another rect.\n\t*/\n\tgetIntersection(anotherRect) {\n\t\tconst rect = {\n\t\t\ttop: Math.max(this.top, anotherRect.top),\n\t\t\tright: Math.min(this.right, anotherRect.right),\n\t\t\tbottom: Math.min(this.bottom, anotherRect.bottom),\n\t\t\tleft: Math.max(this.left, anotherRect.left),\n\t\t\twidth: 0,\n\t\t\theight: 0\n\t\t};\n\t\trect.width = rect.right - rect.left;\n\t\trect.height = rect.bottom - rect.top;\n\t\tif (rect.width < 0 || rect.height < 0) return null;\n\t\telse {\n\t\t\tconst newRect = new Rect(rect);\n\t\t\tnewRect._source = this._source;\n\t\t\treturn newRect;\n\t\t}\n\t}\n\t/**\n\t* Returns the area of intersection with another rect.\n\t*\n\t* @returns Area of intersection.\n\t*/\n\tgetIntersectionArea(anotherRect) {\n\t\tconst rect = this.getIntersection(anotherRect);\n\t\tif (rect) return rect.getArea();\n\t\telse return 0;\n\t}\n\t/**\n\t* Returns the area of the rect.\n\t*/\n\tgetArea() {\n\t\treturn this.width * this.height;\n\t}\n\t/**\n\t* Returns a new rect, a part of the original rect, which is actually visible to the user and is relative to the,`body`,\n\t* e.g. an original rect cropped by parent element rects which have `overflow` set in CSS\n\t* other than `\"visible\"`.\n\t*\n\t* If there's no such visible rect, which is when the rect is limited by one or many of\n\t* the ancestors, `null` is returned.\n\t*\n\t* **Note**: This method does not consider the boundaries of the viewport (window).\n\t* To get a rect cropped by all ancestors and the viewport, use an intersection such as:\n\t*\n\t* ```ts\n\t* const visibleInViewportRect = new Rect( window ).getIntersection( new Rect( source ).getVisible() );\n\t* ```\n\t*\n\t* @returns A visible rect instance or `null`, if there's none.\n\t*/\n\tgetVisible() {\n\t\tconst source = this._source;\n\t\tlet visibleRect = this.clone();\n\t\tif (isBody(source)) return visibleRect;\n\t\tlet child = source;\n\t\tlet parent = source.parentNode || source.commonAncestorContainer;\n\t\tlet lastPositionedChildElement;\n\t\twhile (parent && !isBody(parent)) {\n\t\t\tconst isNonClippingParent = getElementOverflow(parent) === \"visible\";\n\t\t\tif (isPositioned(child)) lastPositionedChildElement = child;\n\t\t\tif (isNonClippingParent || lastPositionedChildElement && getElementPosition(lastPositionedChildElement) === \"absolute\" && !isPositioned(parent)) {\n\t\t\t\tchild = parent;\n\t\t\t\tparent = parent.parentNode;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst parentRect = new Rect(parent);\n\t\t\tconst intersectionRect = visibleRect.getIntersection(parentRect);\n\t\t\tif (intersectionRect) {\n\t\t\t\tif (intersectionRect.getArea() < visibleRect.getArea()) visibleRect = intersectionRect;\n\t\t\t} else return null;\n\t\t\tchild = parent;\n\t\t\tparent = parent.parentNode;\n\t\t}\n\t\treturn visibleRect;\n\t}\n\t/**\n\t* Checks if all property values ({@link #top}, {@link #left}, {@link #right},\n\t* {@link #bottom}, {@link #width} and {@link #height}) are the equal in both rect\n\t* instances.\n\t*\n\t* @param anotherRect A rect instance to compare with.\n\t* @returns `true` when Rects are equal. `false` otherwise.\n\t*/\n\tisEqual(anotherRect) {\n\t\tfor (const prop of RECT_PROPERTIES) if (this[prop] !== anotherRect[prop]) return false;\n\t\treturn true;\n\t}\n\t/**\n\t* Checks whether a rect fully contains another rect instance.\n\t*\n\t* @param anotherRect\n\t* @returns `true` if contains, `false` otherwise.\n\t*/\n\tcontains(anotherRect) {\n\t\tconst intersectRect = this.getIntersection(anotherRect);\n\t\treturn !!(intersectRect && intersectRect.isEqual(anotherRect));\n\t}\n\t/**\n\t* Recalculates screen coordinates to coordinates relative to the positioned ancestor offset.\n\t*/\n\ttoAbsoluteRect() {\n\t\tconst { scrollX, scrollY } = globalVar.window;\n\t\tconst absoluteRect = this.clone().moveBy(scrollX, scrollY);\n\t\tif (isDomElement(absoluteRect._source)) {\n\t\t\tconst positionedAncestor = getPositionedAncestor(absoluteRect._source);\n\t\t\tif (positionedAncestor) shiftRectToCompensatePositionedAncestor(absoluteRect, positionedAncestor);\n\t\t}\n\t\treturn absoluteRect;\n\t}\n\t/**\n\t* Excludes scrollbars and CSS borders from the rect.\n\t*\n\t* * Borders are removed when {@link #_source} is an HTML element.\n\t* * Scrollbars are excluded from HTML elements and the `window`.\n\t*\n\t* @returns A rect which has been updated.\n\t*/\n\texcludeScrollbarsAndBorders() {\n\t\tconst source = this._source;\n\t\tlet scrollBarWidth, scrollBarHeight, direction;\n\t\tif (isWindow(source)) {\n\t\t\tscrollBarWidth = source.innerWidth - source.document.documentElement.clientWidth;\n\t\t\tscrollBarHeight = source.innerHeight - source.document.documentElement.clientHeight;\n\t\t\tdirection = source.getComputedStyle(source.document.documentElement).direction;\n\t\t} else {\n\t\t\tconst borderWidths = getBorderWidths(source);\n\t\t\tscrollBarWidth = source.offsetWidth - source.clientWidth - borderWidths.left - borderWidths.right;\n\t\t\tscrollBarHeight = source.offsetHeight - source.clientHeight - borderWidths.top - borderWidths.bottom;\n\t\t\tdirection = source.ownerDocument.defaultView.getComputedStyle(source).direction;\n\t\t\tthis.left += borderWidths.left;\n\t\t\tthis.top += borderWidths.top;\n\t\t\tthis.right -= borderWidths.right;\n\t\t\tthis.bottom -= borderWidths.bottom;\n\t\t\tthis.width = this.right - this.left;\n\t\t\tthis.height = this.bottom - this.top;\n\t\t}\n\t\tthis.width -= scrollBarWidth;\n\t\tif (direction === \"ltr\") this.right -= scrollBarWidth;\n\t\telse this.left += scrollBarWidth;\n\t\tthis.height -= scrollBarHeight;\n\t\tthis.bottom -= scrollBarHeight;\n\t\treturn this;\n\t}\n\t/**\n\t* Returns an array of rects of the given native DOM Range.\n\t*\n\t* Also see {@link module:utils/dom/rect~Rect.getDomElementRects}.\n\t*\n\t* @param range A native DOM range.\n\t* @returns DOM Range rects.\n\t*/\n\tstatic getDomRangeRects(range) {\n\t\tconst rects = [];\n\t\tconst clientRects = Array.from(range.getClientRects());\n\t\tif (clientRects.length) for (const rect of clientRects) {\n\t\t\tconst r = new Rect(rect);\n\t\t\tr._source = range;\n\t\t\trects.push(r);\n\t\t}\n\t\telse {\n\t\t\tlet startContainer = range.startContainer;\n\t\t\tif (isText(startContainer)) startContainer = startContainer.parentNode;\n\t\t\tconst rect = new Rect(startContainer.getBoundingClientRect());\n\t\t\trect.right = rect.left;\n\t\t\trect.width = 0;\n\t\t\trects.push(rect);\n\t\t}\n\t\treturn rects;\n\t}\n\t/**\n\t* Returns an array of Rects of the given DOM Element based on its native `getClientRects()` method.\n\t*\n\t* Also see {@link module:utils/dom/rect~Rect.getDomRangeRects}.\n\t*/\n\tstatic getDomElementRects(element) {\n\t\treturn Array.from(element.getClientRects()).map((clientRect) => {\n\t\t\tconst rect = new Rect(clientRect);\n\t\t\trect._source = element;\n\t\t\treturn rect;\n\t\t});\n\t}\n\t/**\n\t* Returns a bounding rectangle that contains all the given `rects`.\n\t*\n\t* @param rects A list of rectangles that should be contained in the result rectangle.\n\t* @returns Bounding rectangle or `null` if no `rects` were given.\n\t*/\n\tstatic getBoundingRect(rects) {\n\t\tconst boundingRectData = {\n\t\t\tleft: Number.POSITIVE_INFINITY,\n\t\t\ttop: Number.POSITIVE_INFINITY,\n\t\t\tright: Number.NEGATIVE_INFINITY,\n\t\t\tbottom: Number.NEGATIVE_INFINITY,\n\t\t\twidth: 0,\n\t\t\theight: 0\n\t\t};\n\t\tlet rectangleCount = 0;\n\t\tfor (const rect of rects) {\n\t\t\trectangleCount++;\n\t\t\tboundingRectData.left = Math.min(boundingRectData.left, rect.left);\n\t\t\tboundingRectData.top = Math.min(boundingRectData.top, rect.top);\n\t\t\tboundingRectData.right = Math.max(boundingRectData.right, rect.right);\n\t\t\tboundingRectData.bottom = Math.max(boundingRectData.bottom, rect.bottom);\n\t\t}\n\t\tif (rectangleCount == 0) return null;\n\t\tboundingRectData.width = boundingRectData.right - boundingRectData.left;\n\t\tboundingRectData.height = boundingRectData.bottom - boundingRectData.top;\n\t\treturn new Rect(boundingRectData);\n\t}\n};\n/**\n* Acquires all the rect properties from the passed source.\n*/\nfunction copyRectProperties(rect, source) {\n\tfor (const p of RECT_PROPERTIES) rect[p] = source[p];\n}\n/**\n* Checks if provided object is a <body> HTML element.\n*/\nfunction isBody(value) {\n\tif (!isDomElement(value)) return false;\n\treturn value === value.ownerDocument.body;\n}\n/**\n* Checks if provided object \"looks like\" a DOM Element and has API required by `Rect` class.\n*/\nfunction isDomElement(value) {\n\treturn value !== null && typeof value === \"object\" && value.nodeType === 1 && typeof value.getBoundingClientRect === \"function\";\n}\n/**\n* Returns the value of the `position` style of an `HTMLElement`.\n*/\nfunction getElementPosition(element) {\n\treturn element.ownerDocument.defaultView.getComputedStyle(element).position;\n}\n/**\n* Returns the value of the `overflow` style of an `HTMLElement` or a `Range`.\n*/\nfunction getElementOverflow(element) {\n\treturn element instanceof HTMLElement ? element.ownerDocument.defaultView.getComputedStyle(element).overflow : \"visible\";\n}\n/**\n* Checks if the given node is positioned in any other way than `position: static`.\n*/\nfunction isPositioned(node) {\n\treturn node instanceof HTMLElement && POSITIONING_VALUES.has(getElementPosition(node));\n}\n/**\n* For a given absolute Rect coordinates object and a positioned element ancestor, it updates its\n* coordinates that make up for the position and the scroll of the ancestor.\n*\n* This is necessary because while Rects (and DOMRects) are relative to the browser's viewport, their coordinates\n* are used in real–life to position elements with `position: absolute`, which are scoped by any positioned\n* (and scrollable) ancestors.\n*/\nfunction shiftRectToCompensatePositionedAncestor(rect, positionedElementAncestor) {\n\tconst ancestorPosition = new Rect(positionedElementAncestor);\n\tconst ancestorBorderWidths = getBorderWidths(positionedElementAncestor);\n\tlet moveX = 0;\n\tlet moveY = 0;\n\tmoveX -= ancestorPosition.left;\n\tmoveY -= ancestorPosition.top;\n\tmoveX += positionedElementAncestor.scrollLeft;\n\tmoveY += positionedElementAncestor.scrollTop;\n\tmoveX -= ancestorBorderWidths.left;\n\tmoveY -= ancestorBorderWidths.top;\n\trect.moveBy(moveX, moveY);\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/dom/resizeobserver\n*/\n/**\n* A helper class which instances allow performing custom actions when native DOM elements are resized.\n*\n* ```ts\n* const editableElement = editor.editing.view.getDomRoot();\n*\n* const observer = new ResizeObserver( editableElement, entry => {\n* \tconsole.log( 'The editable element has been resized in DOM.' );\n* \tconsole.log( entry.target ); // -> editableElement\n* \tconsole.log( entry.contentRect.width ); // -> e.g. '423px'\n* } );\n* ```\n*\n* It uses the [native DOM resize observer](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver)\n* under the hood.\n*/\nvar ResizeObserver = class ResizeObserver {\n\t/**\n\t* The element observed by this observer.\n\t*/\n\t_element;\n\t/**\n\t* The callback executed each time {@link #_element} is resized.\n\t*/\n\t_callback;\n\t/**\n\t* The single native observer instance shared across all {@link module:utils/dom/resizeobserver~ResizeObserver} instances.\n\t*/\n\tstatic _observerInstance = null;\n\t/**\n\t* A mapping of native DOM elements and their callbacks shared across all\n\t* {@link module:utils/dom/resizeobserver~ResizeObserver} instances.\n\t*/\n\tstatic _elementCallbacks = null;\n\t/**\n\t* Creates an instance of the `ResizeObserver` class.\n\t*\n\t* @param element A DOM element that is to be observed for resizing. Note that\n\t* the element must be visible (i.e. not detached from DOM) for the observer to work.\n\t* @param callback A function called when the observed element was resized. It passes\n\t* the [`ResizeObserverEntry`](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserverEntry)\n\t* object with information about the resize event.\n\t*/\n\tconstructor(element, callback) {\n\t\tif (!ResizeObserver._observerInstance) ResizeObserver._createObserver();\n\t\tthis._element = element;\n\t\tthis._callback = callback;\n\t\tResizeObserver._addElementCallback(element, callback);\n\t\tResizeObserver._observerInstance.observe(element);\n\t}\n\t/**\n\t* The element observed by this observer.\n\t*/\n\tget element() {\n\t\treturn this._element;\n\t}\n\t/**\n\t* Destroys the observer which disables the `callback` passed to the {@link #constructor}.\n\t*/\n\tdestroy() {\n\t\tResizeObserver._deleteElementCallback(this._element, this._callback);\n\t}\n\t/**\n\t* Registers a new resize callback for the DOM element.\n\t*/\n\tstatic _addElementCallback(element, callback) {\n\t\tif (!ResizeObserver._elementCallbacks) ResizeObserver._elementCallbacks = /* @__PURE__ */ new Map();\n\t\tlet callbacks = ResizeObserver._elementCallbacks.get(element);\n\t\tif (!callbacks) {\n\t\t\tcallbacks = /* @__PURE__ */ new Set();\n\t\t\tResizeObserver._elementCallbacks.set(element, callbacks);\n\t\t}\n\t\tcallbacks.add(callback);\n\t}\n\t/**\n\t* Removes a resize callback from the DOM element. If no callbacks are left\n\t* for the element, it removes the element from the native observer.\n\t*/\n\tstatic _deleteElementCallback(element, callback) {\n\t\tconst callbacks = ResizeObserver._getElementCallbacks(element);\n\t\tif (callbacks) {\n\t\t\tcallbacks.delete(callback);\n\t\t\tif (!callbacks.size) {\n\t\t\t\tResizeObserver._elementCallbacks.delete(element);\n\t\t\t\tResizeObserver._observerInstance.unobserve(element);\n\t\t\t}\n\t\t}\n\t\tif (ResizeObserver._elementCallbacks && !ResizeObserver._elementCallbacks.size) {\n\t\t\tResizeObserver._observerInstance = null;\n\t\t\tResizeObserver._elementCallbacks = null;\n\t\t}\n\t}\n\t/**\n\t* Returns are registered resize callbacks for the DOM element.\n\t*/\n\tstatic _getElementCallbacks(element) {\n\t\tif (!ResizeObserver._elementCallbacks) return null;\n\t\treturn ResizeObserver._elementCallbacks.get(element);\n\t}\n\t/**\n\t* Creates the single native observer shared across all `ResizeObserver` instances.\n\t*/\n\tstatic _createObserver() {\n\t\tResizeObserver._observerInstance = new globalVar.window.ResizeObserver((entries) => {\n\t\t\tfor (const entry of entries) {\n\t\t\t\tconst callbacks = ResizeObserver._getElementCallbacks(entry.target);\n\t\t\t\tif (callbacks) for (const callback of callbacks) callback(entry);\n\t\t\t}\n\t\t});\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/dom/setdatainelement\n*/\n/**\n* Sets data in a given element.\n*\n* @param el The element in which the data will be set.\n* @param data The data string.\n*/\nfunction setDataInElement(el, data) {\n\tif (el instanceof HTMLTextAreaElement) el.value = data;\n\tel.innerHTML = data;\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/dom/tounit\n*/\n/**\n* Returns a helper function, which adds a desired trailing\n* `unit` to the passed value.\n*\n* @param unit An unit like \"px\" or \"em\".\n*/\nfunction toUnit(unit) {\n\treturn (value) => value + unit;\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/dom/indexof\n*/\n/**\n* Returns index of the node in the parent element.\n*\n* @param node Node which index is tested.\n* @returns Index of the node in the parent element. Returns 0 if node has no parent.\n*/\nfunction indexOf(node) {\n\tlet index = 0;\n\twhile (node.previousSibling) {\n\t\tnode = node.previousSibling;\n\t\tindex++;\n\t}\n\treturn index;\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/dom/insertat\n*/\n/**\n* Inserts node to the parent at given index.\n*\n* @param parentElement Parent element.\n* @param index Insertions index.\n* @param nodeToInsert Node to insert.\n*/\nfunction insertAt(parentElement, index, nodeToInsert) {\n\tparentElement.insertBefore(nodeToInsert, parentElement.childNodes[index] || null);\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/dom/iscomment\n*/\n/**\n* Checks whether the object is a native DOM Comment node.\n*/\nfunction isComment(obj) {\n\treturn obj && obj.nodeType === Node.COMMENT_NODE;\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/dom/isvalidattributename\n*/\n/**\n* Checks if the given attribute name is valid in terms of HTML.\n*\n* @param name Attribute name.\n*/\nfunction isValidAttributeName(name) {\n\ttry {\n\t\tglobalVar.document.createAttribute(name);\n\t} catch {\n\t\treturn false;\n\t}\n\treturn true;\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/dom/isvisible\n*/\n/**\n* Checks whether the element is visible to the user in DOM:\n*\n* * connected to the root of the document,\n* * has no `display: none`,\n* * has no ancestors with `display: none`.\n*\n* **Note**: This helper does not check whether the element is hidden by cropping, overflow, etc..\n* To check that, use {@link module:utils/dom/rect~Rect} instead.\n*/\nfunction isVisible(element) {\n\tif (!element) return false;\n\tif (isText(element)) return isVisible(element.parentElement);\n\tif (element.getClientRects) return !!element.getClientRects().length;\n\treturn false;\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/dom/position\n*/\n/**\n* Calculates the `position: absolute` coordinates of a given element so it can be positioned with respect to the\n* target in the visually most efficient way, taking various restrictions like viewport or limiter geometry\n* into consideration.\n*\n* **Note**: If there are no position coordinates found that meet the requirements (arguments of this helper),\n* `null` is returned.\n*\n* ```ts\n* // The element which is to be positioned.\n* const element = document.body.querySelector( '#toolbar' );\n*\n* // A target to which the element is positioned relatively.\n* const target = document.body.querySelector( '#container' );\n*\n* // Finding the optimal coordinates for the positioning.\n* const { left, top, name } = getOptimalPosition( {\n* \telement: element,\n* \ttarget: target,\n*\n* \t// The algorithm will chose among these positions to meet the requirements such\n* \t// as \"limiter\" element or \"fitInViewport\", set below. The positions are considered\n* \t// in the order of the array.\n* \tpositions: [\n* \t\t//\n* \t \t//\t[ Target ]\n* \t\t//\t+-----------------+\n* \t\t//\t| Element |\n* \t\t//\t+-----------------+\n* \t\t//\n* \t\ttargetRect => ( {\n* \t\t\ttop: targetRect.bottom,\n* \t\t\tleft: targetRect.left,\n* \t\t\tname: 'mySouthEastPosition'\n* \t\t} ),\n*\n* \t\t//\n* \t\t//\t+-----------------+\n* \t\t//\t| Element |\n* \t\t//\t+-----------------+\n* \t\t//\t[ Target ]\n* \t\t//\n* \t\t( targetRect, elementRect ) => ( {\n* \t\t\ttop: targetRect.top - elementRect.height,\n* \t\t\tleft: targetRect.left,\n* \t\t\tname: 'myNorthEastPosition'\n* \t\t} )\n* \t],\n*\n* \t// Find a position such guarantees the element remains within visible boundaries of <body>.\n* \tlimiter: document.body,\n*\n* \t// Find a position such guarantees the element remains within visible boundaries of the browser viewport.\n* \tfitInViewport: true\n* } );\n*\n* // The best position which fits into document.body and the viewport. May be useful\n* // to set proper class on the `element`.\n* console.log( name ); // -> \"myNorthEastPosition\"\n*\n* // Using the absolute coordinates which has been found to position the element\n* // as in the diagram depicting the \"myNorthEastPosition\" position.\n* element.style.top = top;\n* element.style.left = left;\n* ```\n*\n* @param options The input data and configuration of the helper.\n*/\nfunction getOptimalPosition({ element, target, positions, limiter, fitInViewport, viewportOffsetConfig }) {\n\tif (isFunction(target)) target = target();\n\tif (isFunction(limiter)) limiter = limiter();\n\tconst positionedElementAncestor = getPositionedAncestor(element);\n\tconst constrainedViewportRect = getConstrainedViewportRect(viewportOffsetConfig);\n\tconst elementRect = new Rect(element);\n\tconst visibleTargetRect = getVisibleViewportIntersectionRect(target, constrainedViewportRect);\n\tlet bestPosition;\n\tif (!visibleTargetRect || !constrainedViewportRect.getIntersection(visibleTargetRect)) return null;\n\tconst positionOptions = {\n\t\ttargetRect: visibleTargetRect,\n\t\telementRect,\n\t\tpositionedElementAncestor,\n\t\tviewportRect: constrainedViewportRect\n\t};\n\tif (!limiter && !fitInViewport) bestPosition = new PositionObject(positions[0], positionOptions);\n\telse {\n\t\tif (limiter) {\n\t\t\tconst visibleLimiterRect = getVisibleViewportIntersectionRect(limiter, constrainedViewportRect);\n\t\t\tif (visibleLimiterRect) positionOptions.limiterRect = visibleLimiterRect;\n\t\t}\n\t\tbestPosition = getBestPosition(positions, positionOptions);\n\t}\n\treturn bestPosition;\n}\n/**\n* Returns intersection of visible source `Rect` with Viewport `Rect`. In case when source `Rect` is not visible\n* or there is no intersection between source `Rect` and Viewport `Rect`, `null` will be returned.\n*/\nfunction getVisibleViewportIntersectionRect(source, viewportRect) {\n\tconst visibleSourceRect = new Rect(source).getVisible();\n\tif (!visibleSourceRect) return null;\n\treturn visibleSourceRect.getIntersection(viewportRect);\n}\n/**\n* Returns a viewport `Rect` shrunk by the viewport offset config from all sides.\n*/\nfunction getConstrainedViewportRect(viewportOffsetConfig) {\n\tviewportOffsetConfig = Object.assign({\n\t\ttop: 0,\n\t\tbottom: 0,\n\t\tleft: 0,\n\t\tright: 0\n\t}, viewportOffsetConfig);\n\tconst viewportRect = new Rect(globalVar.window);\n\tviewportRect.top += viewportOffsetConfig.top;\n\tviewportRect.height -= viewportOffsetConfig.top;\n\tviewportRect.bottom -= viewportOffsetConfig.bottom;\n\tviewportRect.height -= viewportOffsetConfig.bottom;\n\tviewportRect.left += viewportOffsetConfig.left;\n\tviewportRect.right -= viewportOffsetConfig.right;\n\tviewportRect.width -= viewportOffsetConfig.left + viewportOffsetConfig.right;\n\treturn viewportRect;\n}\n/**\n* For a given array of positioning functions, returns such that provides the best\n* fit of the `elementRect` into the `limiterRect` and `viewportRect`.\n*/\nfunction getBestPosition(positions, options) {\n\tconst { elementRect } = options;\n\tconst elementRectArea = elementRect.getArea();\n\tconst positionInstances = positions.map((positioningFunction) => new PositionObject(positioningFunction, options)).filter((position) => !!position.name);\n\tlet maxFitFactor = 0;\n\tlet bestPosition = null;\n\tfor (const position of positionInstances) {\n\t\tconst { limiterIntersectionArea, viewportIntersectionArea } = position;\n\t\tif (limiterIntersectionArea === elementRectArea) return position;\n\t\tconst fitFactor = viewportIntersectionArea ** 2 + limiterIntersectionArea ** 2;\n\t\tif (fitFactor > maxFitFactor) {\n\t\t\tmaxFitFactor = fitFactor;\n\t\t\tbestPosition = position;\n\t\t}\n\t}\n\treturn bestPosition;\n}\n/**\n* A position class which instances are created and used by the {@link module:utils/dom/position~getOptimalPosition} helper.\n*\n* {@link module:utils/dom/position~Position#top} and {@link module:utils/dom/position~Position#left} properties of the position instance\n* translate directly to the `top` and `left` properties in CSS \"`position: absolute` coordinate system\". If set on the positioned element\n* in DOM, they will make it display it in the right place in the viewport.\n*/\nvar PositionObject = class {\n\tname;\n\tconfig;\n\t_positioningFunctionCoordinates;\n\t_options;\n\t_cachedRect;\n\t_cachedAbsoluteRect;\n\t/**\n\t* Creates an instance of the {@link module:utils/dom/position~PositionObject} class.\n\t*\n\t* @param positioningFunction function The function that defines the expected\n\t* coordinates the positioned element should move to.\n\t* @param options options object.\n\t* @param options.elementRect The positioned element rect.\n\t* @param options.targetRect The target element rect.\n\t* @param options.viewportRect The viewport rect.\n\t* @param options.limiterRect The limiter rect.\n\t* @param options.positionedElementAncestor Nearest element ancestor element which CSS position is not \"static\".\n\t*/\n\tconstructor(positioningFunction, options) {\n\t\tconst positioningFunctionOutput = positioningFunction(options.targetRect, options.elementRect, options.viewportRect, options.limiterRect);\n\t\tif (!positioningFunctionOutput) return;\n\t\tconst { left, top, name, config } = positioningFunctionOutput;\n\t\tthis.name = name;\n\t\tthis.config = config;\n\t\tthis._positioningFunctionCoordinates = {\n\t\t\tleft,\n\t\t\ttop\n\t\t};\n\t\tthis._options = options;\n\t}\n\t/**\n\t* The left value in pixels in the CSS `position: absolute` coordinate system.\n\t* Set it on the positioned element in DOM to move it to the position.\n\t*/\n\tget left() {\n\t\treturn this._absoluteRect.left;\n\t}\n\t/**\n\t* The top value in pixels in the CSS `position: absolute` coordinate system.\n\t* Set it on the positioned element in DOM to move it to the position.\n\t*/\n\tget top() {\n\t\treturn this._absoluteRect.top;\n\t}\n\t/**\n\t* An intersection area between positioned element and limiter within viewport constraints.\n\t*/\n\tget limiterIntersectionArea() {\n\t\tconst limiterRect = this._options.limiterRect;\n\t\tif (limiterRect) return limiterRect.getIntersectionArea(this._rect);\n\t\treturn 0;\n\t}\n\t/**\n\t* An intersection area between positioned element and viewport.\n\t*/\n\tget viewportIntersectionArea() {\n\t\treturn this._options.viewportRect.getIntersectionArea(this._rect);\n\t}\n\t/**\n\t* An already positioned element rect. A clone of the element rect passed to the constructor\n\t* but placed in the viewport according to the positioning function.\n\t*/\n\tget _rect() {\n\t\tif (this._cachedRect) return this._cachedRect;\n\t\tthis._cachedRect = this._options.elementRect.clone().moveTo(this._positioningFunctionCoordinates.left, this._positioningFunctionCoordinates.top);\n\t\treturn this._cachedRect;\n\t}\n\t/**\n\t* An already absolutely positioned element rect. See ({@link #_rect}).\n\t*/\n\tget _absoluteRect() {\n\t\tif (this._cachedAbsoluteRect) return this._cachedAbsoluteRect;\n\t\tthis._cachedAbsoluteRect = this._rect.toAbsoluteRect();\n\t\treturn this._cachedAbsoluteRect;\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/dom/remove\n*/\n/**\n* Removes given node from parent.\n*\n* @param node Node to remove.\n*/\nfunction remove(node) {\n\tconst parent = node.parentNode;\n\tif (parent) parent.removeChild(node);\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/dom/getvisualviewportoffset\n*/\n/**\n* Returns the visual viewport offsets to adjust elements with `position: fixed` style.\n*/\nfunction getVisualViewportOffset() {\n\tconst visualViewport = globalVar.window.visualViewport;\n\tif (!visualViewport || !(env.isiOS || env.isSafari)) return {\n\t\tleft: 0,\n\t\ttop: 0\n\t};\n\treturn {\n\t\tleft: Math.max(Math.round(visualViewport.offsetLeft), 0),\n\t\ttop: Math.max(Math.round(visualViewport.offsetTop), 0)\n\t};\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/dom/scroll\n*/\n/**\n* Makes any page `HTMLElement` or `Range` (`target`) visible inside the browser viewport.\n* This helper will scroll all `target` ancestors and the web browser viewport to reveal the target to\n* the user. If the `target` is already visible, nothing will happen.\n*\n* @param options Additional configuration of the scrolling behavior.\n* @param options.target A target, which supposed to become visible to the user.\n* @param options.viewportOffset An offset from the edge of the viewport (in pixels)\n* the `target` will be moved by if the viewport is scrolled. It enhances the user experience\n* by keeping the `target` some distance from the edge of the viewport and thus making it easier to\n* read or edit by the user.\n* @param options.ancestorOffset An offset from the boundary of scrollable ancestors (if any)\n* the `target` will be moved by if the viewport is scrolled. It enhances the user experience\n* by keeping the `target` some distance from the edge of the ancestors and thus making it easier to\n* read or edit by the user.\n* @param options.alignToTop When set `true`, the helper will make sure the `target` is scrolled up\n* to the top boundary of the viewport and/or scrollable ancestors if scrolled up. When not set\n* (default), the `target` will be revealed by scrolling as little as possible. This option will\n* not affect `targets` that must be scrolled down because they will appear at the top of the boundary\n* anyway.\n*\n* ```\n* scrollViewportToShowTarget() with scrollViewportToShowTarget() with\n* Initial state alignToTop unset (default) alignToTop = true\n*\n* ┌────────────────────────────────┬─┐ ┌────────────────────────────────┬─┐ ┌────────────────────────────────┬─┐\n* │ │▲│ │ │▲│ │ [ Target to be revealed ] │▲│\n* │ │ │ │ │ │ │ │ │\n* │ │█│ │ │ │ │ │ │\n* │ │█│ │ │ │ │ │ │\n* │ │ │ │ │█│ │ │ │\n* │ │ │ │ │█│ │ │█│\n* │ │ │ │ │ │ │ │█│\n* │ │▼│ │ [ Target to be revealed ] │▼│ │ │▼│\n* └────────────────────────────────┴─┘ └────────────────────────────────┴─┘ └────────────────────────────────┴─┘\n*\n*\n* [ Target to be revealed ]\n*```\n*\n* @param options.forceScroll When set `true`, the `target` will be aligned to the top of the viewport\n* and scrollable ancestors whether it is already visible or not. This option will only work when `alignToTop`\n* is `true`\n*/\nfunction scrollViewportToShowTarget({ target, viewportOffset = 0, ancestorOffset = 0, alignToTop, forceScroll }) {\n\tconst targetWindow = getWindow(target);\n\tlet currentWindow = targetWindow;\n\tlet currentFrame = null;\n\tviewportOffset = normalizeViewportOffset(viewportOffset);\n\twhile (currentWindow) {\n\t\tlet firstAncestorToScroll;\n\t\tif (currentWindow == targetWindow) firstAncestorToScroll = getParentElement(target);\n\t\telse firstAncestorToScroll = getParentElement(currentFrame);\n\t\tscrollAncestorsToShowRect({\n\t\t\tparent: firstAncestorToScroll,\n\t\t\tgetRect: () => {\n\t\t\t\treturn getRectRelativeToWindow(target, currentWindow);\n\t\t\t},\n\t\t\talignToTop,\n\t\t\tancestorOffset,\n\t\t\tforceScroll\n\t\t});\n\t\tlet targetRect = getRectRelativeToWindow(target, currentWindow);\n\t\tconst ancestorWindowRelativeRect = getRectRelativeToWindow(firstAncestorToScroll, currentWindow);\n\t\tif (targetRect.height > ancestorWindowRelativeRect.height) {\n\t\t\tconst ancestorTargetIntersection = targetRect.getIntersection(ancestorWindowRelativeRect);\n\t\t\tif (ancestorTargetIntersection) targetRect = ancestorTargetIntersection;\n\t\t}\n\t\tscrollWindowToShowRect({\n\t\t\twindow: currentWindow,\n\t\t\trect: targetRect,\n\t\t\tviewportOffset,\n\t\t\talignToTop,\n\t\t\tforceScroll\n\t\t});\n\t\tif (currentWindow.parent != currentWindow) {\n\t\t\tcurrentFrame = currentWindow.frameElement;\n\t\t\tcurrentWindow = currentWindow.parent;\n\t\t\tif (!currentFrame) return;\n\t\t} else currentWindow = null;\n\t}\n}\n/**\n* Makes any page `HTMLElement` or `Range` (target) visible within its scrollable ancestors,\n* e.g. if they have `overflow: scroll` CSS style.\n*\n* @param target A target, which supposed to become visible to the user.\n* @param ancestorOffset An offset between the target and the boundary of scrollable ancestors\n* to be maintained while scrolling.\n* @param limiterElement The outermost ancestor that should be scrolled. If specified, it can prevent\n* scrolling the whole page.\n* @param alignToTop When set `true`, the function will make sure the `target` is scrolled up\n* to the top boundary of the scrollable ancestors if scrolled up. When not set (default), the `target`\n* will be revealed by scrolling as little as possible. This option will not affect target elements that must be\n* scrolled down because they will appear at the top of the boundary anyway.\n* @param forceScroll When set `true`, the `target` will be aligned to the top of scrollable ancestors\n* whether it is already visible or not. This option will only work when `alignToTop` is `true`\n*/\nfunction scrollAncestorsToShowTarget(target, ancestorOffset, limiterElement, alignToTop, forceScroll) {\n\tscrollAncestorsToShowRect({\n\t\tparent: getParentElement(target),\n\t\tgetRect: () => new Rect(target),\n\t\tancestorOffset,\n\t\tlimiterElement,\n\t\talignToTop,\n\t\tforceScroll\n\t});\n}\n/**\n* Makes a given rect visible within its parent window.\n*\n* Note: Avoid the situation where the caret is still in the viewport, but totally\n* at the edge of it. In such situation, if it moved beyond the viewport in the next\n* action e.g. after paste, the scrolling would move it to the viewportOffset level\n* and it all would look like the caret visually moved up/down:\n*\n* 1.\n* ```\n* | foo[]\n* | <--- N px of space below the caret\n* +---------------------------------...\n* ```\n*\n* 2. *paste*\n* 3.\n* ```\n* |\n* |\n* +-foo-----------------------------...\n* bar[] <--- caret below viewport, scrolling...\n* ```\n*\n* 4. *scrolling*\n* 5.\n* ```\n* |\n* | foo\n* | bar[] <--- caret precisely at the edge\n* +---------------------------------...\n* ```\n*\n* To prevent this, this method checks the rects moved by the viewportOffset to cover\n* the upper/lower edge of the viewport. It makes sure if the action repeats, there's\n* no twitching – it's a purely visual improvement:\n*\n* 5. (after fix)\n* ```\n* |\n* | foo\n* | bar[]\n* | <--- N px of space below the caret\n* +---------------------------------...\n* ```\n*\n* @param options Additional configuration of the scrolling behavior.\n* @param options.window A window which is scrolled to reveal the rect.\n* @param options.rect A rect which is to be revealed.\n* @param options.viewportOffset An offset from the edge of the viewport (in pixels) the `rect` will be\n* moved by if the viewport is scrolled.\n* @param options.alignToTop When set `true`, the helper will make sure the `rect` is scrolled up\n* to the top boundary of the viewport if scrolled up. When not set (default), the `rect` will be\n* revealed by scrolling as little as possible. This option will not affect rects that must be scrolled\n* down because they will appear at the top of the boundary anyway.\n* @param options.forceScroll When set `true`, the `rect` will be aligned to the top of the viewport\n* whether it is already visible or not. This option will only work when `alignToTop` is `true`\n*/\nfunction scrollWindowToShowRect({ window, rect, alignToTop, forceScroll, viewportOffset }) {\n\tconst targetShiftedDownRect = rect.clone().moveBy(0, viewportOffset.bottom);\n\tconst targetShiftedUpRect = rect.clone().moveBy(0, -viewportOffset.top);\n\tconst viewportRect = new Rect(window).excludeScrollbarsAndBorders();\n\tconst rects = [targetShiftedUpRect, targetShiftedDownRect];\n\tconst forceScrollToTop = alignToTop && forceScroll;\n\tconst allRectsFitInViewport = rects.every((rect) => viewportRect.contains(rect));\n\tlet { scrollX, scrollY } = window;\n\tconst initialScrollX = scrollX;\n\tconst initialScrollY = scrollY;\n\tif (forceScrollToTop) scrollY -= viewportRect.top - rect.top + viewportOffset.top;\n\telse if (!allRectsFitInViewport) {\n\t\tif (isAbove(targetShiftedUpRect, viewportRect)) scrollY -= viewportRect.top - rect.top + viewportOffset.top;\n\t\telse if (isBelow(targetShiftedDownRect, viewportRect)) if (alignToTop) scrollY += rect.top - viewportRect.top - viewportOffset.top;\n\t\telse scrollY += rect.bottom - viewportRect.bottom + viewportOffset.bottom;\n\t}\n\tif (!allRectsFitInViewport) {\n\t\tif (isLeftOf(rect, viewportRect)) scrollX -= viewportRect.left - rect.left + viewportOffset.left;\n\t\telse if (isRightOf(rect, viewportRect)) scrollX += rect.right - viewportRect.right + viewportOffset.right;\n\t}\n\tif (scrollX != initialScrollX || scrollY !== initialScrollY) window.scrollTo(scrollX, scrollY);\n}\n/**\n* Recursively scrolls element ancestors to visually reveal a rect.\n*\n* @param options Additional configuration of the scrolling behavior.\n* @param options.parent The first parent ancestor to start scrolling.\n* @param options.getRect A function which returns the Rect, which is to be revealed.\n* @param options.ancestorOffset An offset from the boundary of scrollable ancestors (if any)\n* the `Rect` instance will be moved by if the viewport is scrolled.\n* @param options.alignToTop When set `true`, the helper will make sure the `Rect` instance is scrolled up\n* to the top boundary of the scrollable ancestors if scrolled up. When not set (default), the `rect`\n* will be revealed by scrolling as little as possible. This option will not affect rects that must be\n* scrolled down because they will appear at the top of the boundary\n* anyway.\n* @param options.forceScroll When set `true`, the `rect` will be aligned to the top of scrollable ancestors\n* whether it is already visible or not. This option will only work when `alignToTop` is `true`\n* @param options.limiterElement The outermost ancestor that should be scrolled. Defaults to the `<body>` element.\n*/\nfunction scrollAncestorsToShowRect({ parent, getRect, alignToTop, forceScroll, ancestorOffset = 0, limiterElement }) {\n\tconst parentWindow = getWindow(parent);\n\tconst forceScrollToTop = alignToTop && forceScroll;\n\tlet parentRect, targetRect, targetFitsInTarget;\n\tconst limiter = limiterElement || parentWindow.document.body;\n\twhile (parent != limiter) {\n\t\ttargetRect = getRect();\n\t\tparentRect = new Rect(parent).excludeScrollbarsAndBorders();\n\t\ttargetFitsInTarget = parentRect.contains(targetRect);\n\t\tif (forceScrollToTop) parent.scrollTop -= parentRect.top - targetRect.top + ancestorOffset;\n\t\telse if (!targetFitsInTarget) {\n\t\t\tif (isAbove(targetRect, parentRect)) parent.scrollTop -= parentRect.top - targetRect.top + ancestorOffset;\n\t\t\telse if (isBelow(targetRect, parentRect)) if (alignToTop) parent.scrollTop += targetRect.top - parentRect.top - ancestorOffset;\n\t\t\telse parent.scrollTop += targetRect.bottom - parentRect.bottom + ancestorOffset;\n\t\t}\n\t\tif (!targetFitsInTarget) {\n\t\t\tif (isLeftOf(targetRect, parentRect)) parent.scrollLeft -= parentRect.left - targetRect.left + ancestorOffset;\n\t\t\telse if (isRightOf(targetRect, parentRect)) parent.scrollLeft += targetRect.right - parentRect.right + ancestorOffset;\n\t\t}\n\t\tparent = parent.parentNode;\n\t}\n}\n/**\n* Determines if a given `Rect` extends beyond the bottom edge of the second `Rect`.\n*/\nfunction isBelow(firstRect, secondRect) {\n\treturn firstRect.bottom > secondRect.bottom;\n}\n/**\n* Determines if a given `Rect` extends beyond the top edge of the second `Rect`.\n*/\nfunction isAbove(firstRect, secondRect) {\n\treturn firstRect.top < secondRect.top;\n}\n/**\n* Determines if a given `Rect` extends beyond the left edge of the second `Rect`.\n*/\nfunction isLeftOf(firstRect, secondRect) {\n\treturn firstRect.left < secondRect.left;\n}\n/**\n* Determines if a given `Rect` extends beyond the right edge of the second `Rect`.\n*/\nfunction isRightOf(firstRect, secondRect) {\n\treturn firstRect.right > secondRect.right;\n}\n/**\n* Returns the closest window of an element or range.\n*/\nfunction getWindow(elementOrRange) {\n\tif (isRange(elementOrRange)) return elementOrRange.startContainer.ownerDocument.defaultView;\n\telse return elementOrRange.ownerDocument.defaultView;\n}\n/**\n* Returns the closest parent of an element or DOM range.\n*/\nfunction getParentElement(elementOrRange) {\n\tif (isRange(elementOrRange)) {\n\t\tlet parent = elementOrRange.commonAncestorContainer;\n\t\tif (isText(parent)) parent = parent.parentNode;\n\t\treturn parent;\n\t} else return elementOrRange.parentNode;\n}\n/**\n* Returns the rect of an element or range residing in an iframe.\n* The result rect is relative to the geometry of the passed window instance.\n*\n* @param target Element or range which rect should be returned.\n* @param relativeWindow A window the rect should be relative to.\n*/\nfunction getRectRelativeToWindow(target, relativeWindow) {\n\tconst targetWindow = getWindow(target);\n\tconst rect = new Rect(target);\n\tif (targetWindow === relativeWindow) return rect;\n\telse {\n\t\tlet currentWindow = targetWindow;\n\t\twhile (currentWindow != relativeWindow) {\n\t\t\tconst frame = currentWindow.frameElement;\n\t\t\tconst frameRect = new Rect(frame).excludeScrollbarsAndBorders();\n\t\t\trect.moveBy(frameRect.left, frameRect.top);\n\t\t\tcurrentWindow = currentWindow.parent;\n\t\t}\n\t}\n\treturn rect;\n}\n/**\n* A helper that explodes the `viewportOffset` configuration if defined as a plain number into an object\n* with `top`, `bottom`, `left`, and `right` properties.\n*\n* If an object value is passed, this helper will pass it through.\n*\n* @param viewportOffset Viewport offset to be normalized.\n*/\nfunction normalizeViewportOffset(viewportOffset) {\n\tif (typeof viewportOffset === \"number\") return {\n\t\ttop: viewportOffset,\n\t\tbottom: viewportOffset,\n\t\tleft: viewportOffset,\n\t\tright: viewportOffset\n\t};\n\treturn viewportOffset;\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\nconst modifiersToGlyphsMac = {\n\tctrl: \"⌃\",\n\tcmd: \"⌘\",\n\talt: \"⌥\",\n\tshift: \"⇧\"\n};\nconst modifiersToGlyphsNonMac = {\n\tctrl: \"Ctrl+\",\n\talt: \"Alt+\",\n\tshift: \"Shift+\"\n};\nconst keyCodesToGlyphs = {\n\t37: \"←\",\n\t38: \"↑\",\n\t39: \"→\",\n\t40: \"↓\",\n\t9: \"⇥\",\n\t33: \"Page Up\",\n\t34: \"Page Down\"\n};\n/**\n* An object with `keyName => keyCode` pairs for a set of known keys.\n*\n* Contains:\n*\n* * `a-z`,\n* * `0-9`,\n* * `f1-f12`,\n* * `` ` ``, `-`, `=`, `[`, `]`, `;`, `'`, `,`, `.`, `/`, `\\`,\n* * `arrow(left|up|right|bottom)`,\n* * `backspace`, `delete`, `end`, `enter`, `esc`, `home`, `tab`,\n* * `ctrl`, `cmd`, `shift`, `alt`.\n*/\nconst keyCodes = /* #__PURE__ */ generateKnownKeyCodes();\nconst keyCodeNames = /* #__PURE__ */ Object.fromEntries(/* #__PURE__ */ Object.entries(keyCodes).map(([name, code]) => {\n\tlet prettyKeyName;\n\tif (code in keyCodesToGlyphs) prettyKeyName = keyCodesToGlyphs[code];\n\telse prettyKeyName = name.charAt(0).toUpperCase() + name.slice(1);\n\treturn [code, prettyKeyName];\n}));\n/**\n* Converts a key name or {@link module:utils/keyboard~KeystrokeInfo keystroke info} into a key code.\n*\n* Note: Key names are matched with {@link module:utils/keyboard#keyCodes} in a case-insensitive way.\n*\n* @param key A key name (see {@link module:utils/keyboard#keyCodes}) or a keystroke data object.\n* @returns Key or keystroke code.\n*/\nfunction getCode(key) {\n\tlet keyCode;\n\tif (typeof key == \"string\") {\n\t\tkeyCode = keyCodes[key.toLowerCase()];\n\t\tif (!keyCode)\n /**\n\t\t* Unknown key name. Only key names included in the {@link module:utils/keyboard#keyCodes} can be used.\n\t\t*\n\t\t* @error keyboard-unknown-key\n\t\t* @param {string} key Ths specified key name.\n\t\t*/\n\t\tthrow new CKEditorError(\"keyboard-unknown-key\", null, { key });\n\t} else keyCode = key.keyCode + (key.altKey ? keyCodes.alt : 0) + (key.ctrlKey ? keyCodes.ctrl : 0) + (key.shiftKey ? keyCodes.shift : 0) + (key.metaKey ? keyCodes.cmd : 0);\n\treturn keyCode;\n}\n/**\n* Parses the keystroke and returns a keystroke code that will match the code returned by\n* {@link module:utils/keyboard~getCode} for the corresponding {@link module:utils/keyboard~KeystrokeInfo keystroke info}.\n*\n* The keystroke can be passed in two formats:\n*\n* * as a single string – e.g. `ctrl + A`,\n* * as an array of {@link module:utils/keyboard~keyCodes known key names} and key codes – e.g.:\n* * `[ 'ctrl', 32 ]` (ctrl + space),\n* * `[ 'ctrl', 'a' ]` (ctrl + A).\n*\n* Note: Key names are matched with {@link module:utils/keyboard#keyCodes} in a case-insensitive way.\n*\n* Note: Only keystrokes with a single non-modifier key are supported (e.g. `ctrl+A` is OK, but `ctrl+A+B` is not).\n*\n* Note: On macOS, keystroke handling is translating the `Ctrl` key to the `Cmd` key and handling only that keystroke.\n* For example, a registered keystroke `Ctrl+A` will be translated to `Cmd+A` on macOS. To disable the translation of some keystroke,\n* use the forced modifier: `Ctrl!+A` (note the exclamation mark).\n*\n* @param keystroke The keystroke definition.\n* @returns Keystroke code.\n*/\nfunction parseKeystroke(keystroke) {\n\tif (typeof keystroke == \"string\") keystroke = splitKeystrokeText(keystroke);\n\treturn keystroke.map((key) => typeof key == \"string\" ? getEnvKeyCode(key) : key).reduce((key, sum) => sum + key, 0);\n}\n/**\n* Translates any keystroke string text like `\"Ctrl+A\"` to an\n* environment–specific keystroke, i.e. `\"⌘A\"` on macOS.\n*\n* @param keystroke The keystroke text.\n* @param [forcedEnv] The environment to force the key translation to. If not provided, the current environment is used.\n* @returns The keystroke text specific for the environment.\n*/\nfunction getEnvKeystrokeText(keystroke, forcedEnv) {\n\tlet keystrokeCode = parseKeystroke(keystroke);\n\tconst isMac = forcedEnv ? forcedEnv === \"Mac\" : env.isMac || env.isiOS;\n\treturn Object.entries(isMac ? modifiersToGlyphsMac : modifiersToGlyphsNonMac).reduce((modifiers, [name, glyph]) => {\n\t\tif ((keystrokeCode & keyCodes[name]) != 0) {\n\t\t\tkeystrokeCode &= ~keyCodes[name];\n\t\t\tmodifiers += glyph;\n\t\t}\n\t\treturn modifiers;\n\t}, \"\") + (keystrokeCode ? keyCodeNames[keystrokeCode] : \"\");\n}\n/**\n* Returns `true` if the provided key code represents one of the arrow keys.\n*\n* @param keyCode A key code as in {@link module:utils/keyboard~KeystrokeInfo#keyCode}.\n*/\nfunction isArrowKeyCode(keyCode) {\n\treturn keyCode == keyCodes.arrowright || keyCode == keyCodes.arrowleft || keyCode == keyCodes.arrowup || keyCode == keyCodes.arrowdown;\n}\n/**\n* Returns the direction in which the {@link module:engine/model/documentselection~ModelDocumentSelection selection}\n* will move when the provided arrow key code is pressed considering the language direction of the editor content.\n*\n* For instance, in right–to–left (RTL) content languages, pressing the left arrow means moving the selection right (forward)\n* in the model structure. Similarly, pressing the right arrow moves the selection left (backward).\n*\n* @param keyCode A key code as in {@link module:utils/keyboard~KeystrokeInfo#keyCode}.\n* @param contentLanguageDirection The content language direction, corresponding to\n* {@link module:utils/locale~Locale#contentLanguageDirection}.\n* @returns Localized arrow direction or `undefined` for non-arrow key codes.\n*/\nfunction getLocalizedArrowKeyCodeDirection(keyCode, contentLanguageDirection) {\n\tconst isLtrContent = contentLanguageDirection === \"ltr\";\n\tswitch (keyCode) {\n\t\tcase keyCodes.arrowleft: return isLtrContent ? \"left\" : \"right\";\n\t\tcase keyCodes.arrowright: return isLtrContent ? \"right\" : \"left\";\n\t\tcase keyCodes.arrowup: return \"up\";\n\t\tcase keyCodes.arrowdown: return \"down\";\n\t}\n}\n/**\n* Converts a key name to the key code with mapping based on the env.\n*\n* See: {@link module:utils/keyboard~getCode}.\n*\n* @param key The key name (see {@link module:utils/keyboard#keyCodes}).\n* @returns Key code.\n*/\nfunction getEnvKeyCode(key) {\n\tif (key.endsWith(\"!\")) return getCode(key.slice(0, -1));\n\tconst code = getCode(key);\n\treturn (env.isMac || env.isiOS) && code == keyCodes.ctrl ? keyCodes.cmd : code;\n}\n/**\n* Determines if the provided key code moves the {@link module:engine/model/documentselection~ModelDocumentSelection selection}\n* forward or backward considering the language direction of the editor content.\n*\n* For instance, in right–to–left (RTL) languages, pressing the left arrow means moving forward\n* in the model structure. Similarly, pressing the right arrow moves the selection backward.\n*\n* @param keyCode A key code as in {@link module:utils/keyboard~KeystrokeInfo#keyCode}.\n* @param contentLanguageDirection The content language direction, corresponding to\n* {@link module:utils/locale~Locale#contentLanguageDirection}.\n*/\nfunction isForwardArrowKeyCode(keyCode, contentLanguageDirection) {\n\tconst localizedKeyCodeDirection = getLocalizedArrowKeyCodeDirection(keyCode, contentLanguageDirection);\n\treturn localizedKeyCodeDirection === \"down\" || localizedKeyCodeDirection === \"right\";\n}\nfunction generateKnownKeyCodes() {\n\tconst keyCodes = {\n\t\tpageup: 33,\n\t\tpagedown: 34,\n\t\tend: 35,\n\t\thome: 36,\n\t\tarrowleft: 37,\n\t\tarrowup: 38,\n\t\tarrowright: 39,\n\t\tarrowdown: 40,\n\t\tbackspace: 8,\n\t\tdelete: 46,\n\t\tenter: 13,\n\t\tspace: 32,\n\t\tesc: 27,\n\t\ttab: 9,\n\t\tctrl: 1114112,\n\t\tshift: 2228224,\n\t\talt: 4456448,\n\t\tcmd: 8912896\n\t};\n\tfor (let code = 65; code <= 90; code++) {\n\t\tconst letter = String.fromCharCode(code);\n\t\tkeyCodes[letter.toLowerCase()] = code;\n\t}\n\tfor (let code = 48; code <= 57; code++) keyCodes[code - 48] = code;\n\tfor (let code = 112; code <= 123; code++) keyCodes[\"f\" + (code - 111)] = code;\n\tObject.assign(keyCodes, {\n\t\t\"'\": 222,\n\t\t\",\": 108,\n\t\t\"-\": 109,\n\t\t\".\": 110,\n\t\t\"/\": 111,\n\t\t\";\": 186,\n\t\t\"=\": 187,\n\t\t\"[\": 219,\n\t\t\"\\\\\": 220,\n\t\t\"]\": 221,\n\t\t\"`\": 223\n\t});\n\treturn keyCodes;\n}\nfunction splitKeystrokeText(keystroke) {\n\treturn keystroke.split(\"+\").map((key) => key.trim());\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\nconst RTL_LANGUAGE_CODES = [\n\t\"ar\",\n\t\"ara\",\n\t\"dv\",\n\t\"div\",\n\t\"fa\",\n\t\"per\",\n\t\"fas\",\n\t\"he\",\n\t\"heb\",\n\t\"ku\",\n\t\"kur\",\n\t\"ug\",\n\t\"uig\",\n\t\"ur\",\n\t\"urd\"\n];\n/**\n* Helps determine whether a language text direction is LTR or RTL.\n*\n* @param languageCode The ISO 639-1 or ISO 639-2 language code.\n*/\nfunction getLanguageDirection(languageCode) {\n\treturn RTL_LANGUAGE_CODES.includes(languageCode) ? \"rtl\" : \"ltr\";\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\nfunction toArray(data) {\n\treturn Array.isArray(data) ? data : [data];\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/* v8 ignore else -- @preserve */\nif (!globalVar.window.CKEDITOR_TRANSLATIONS) globalVar.window.CKEDITOR_TRANSLATIONS = {};\n/**\n* Adds translations to existing ones or overrides the existing translations. These translations will later\n* be available for the {@link module:utils/locale~Locale#t `t()`} function.\n*\n* The `translations` is an object which consists of `messageId: translation` pairs. Note that the message ID can be\n* either constructed from the message string or from the message ID if it was passed\n* (this happens rarely and mostly for short messages or messages with placeholders).\n* Since the editor displays only the message string, the message ID can be found either in the source code or in the\n* built translations for another language.\n*\n* ```ts\n* add( 'pl', {\n* \t'Cancel': 'Anuluj',\n* \t'IMAGE': 'obraz', // Note that the `IMAGE` comes from the message ID, while the string can be `image`.\n* } );\n* ```\n*\n* If the message is supposed to support various plural forms, make sure to provide an array with the singular form and all plural forms:\n*\n* ```ts\n* add( 'pl', {\n* \t'Add space': [ 'Dodaj spację', 'Dodaj %0 spacje', 'Dodaj %0 spacji' ]\n* } );\n* ```\n*\n* You should also specify the third argument (the `getPluralForm()` function) that will be used to determine the plural form if no\n* language file was loaded for that language. All language files coming from CKEditor 5 sources will have this option set, so\n* these plural form rules will be reused by other translations added to the registered languages. The `getPluralForm()` function\n* can return either a Boolean or a number.\n*\n* ```ts\n* add( 'en', {\n* \t// ... Translations.\n* }, n => n !== 1 );\n* add( 'pl', {\n* \t// ... Translations.\n* }, n => n == 1 ? 0 : n % 10 >= 2 && n % 10 <= 4 && ( n % 100 < 10 || n % 100 >= 20 ) ? 1 : 2 );\n* ```\n*\n* All translations extend the global `window.CKEDITOR_TRANSLATIONS` object. An example of this object can be found below:\n*\n* ```ts\n* {\n* \tpl: {\n* \t\tdictionary: {\n* \t\t\t'Cancel': 'Anuluj',\n* \t\t\t'Add space': [ 'Dodaj spację', 'Dodaj %0 spacje', 'Dodaj %0 spacji' ]\n* \t\t},\n* \t\t// A function that returns the plural form index.\n* \t\tgetPluralForm: n => n == 1 ? 0 : n % 10 >= 2 && n % 10 <= 4 && ( n % 100 < 10 || n % 100 >= 20 ) ? 1 : 2 );\n* \t}\n* \t// Other languages.\n* \t}\n* ```\n*\n* If you cannot import { this function } from this module (e.g. because you use a CKEditor 5 build), you can\n* still add translations by extending the global `window.CKEDITOR_TRANSLATIONS` object by using a function like\n* the one below:\n*\n* ```ts\n* function addTranslations( language, translations, getPluralForm ) {\n* \tif ( !global.window.CKEDITOR_TRANSLATIONS ) {\n* \t\tglobal.window.CKEDITOR_TRANSLATIONS = {};\n* \t}\n\n* \tif ( !global.window.CKEDITOR_TRANSLATIONS[ language ] ) {\n* \t\tglobal.window.CKEDITOR_TRANSLATIONS[ language ] = {};\n* \t}\n*\n* \tconst languageTranslations = global.window.CKEDITOR_TRANSLATIONS[ language ];\n*\n* \tlanguageTranslations.dictionary = languageTranslations.dictionary || {};\n* \tlanguageTranslations.getPluralForm = getPluralForm || languageTranslations.getPluralForm;\n*\n* \t// Extend the dictionary for the given language.\n* \tObject.assign( languageTranslations.dictionary, translations );\n* }\n* ```\n*\n* @param language Target language.\n* @param translations An object with translations which will be added to the dictionary.\n* For each message ID the value should be either a translation or an array of translations if the message\n* should support plural forms.\n* @param getPluralForm A function that returns the plural form index (a number).\n*/\nfunction add(language, translations, getPluralForm) {\n\tif (!globalVar.window.CKEDITOR_TRANSLATIONS[language]) globalVar.window.CKEDITOR_TRANSLATIONS[language] = {};\n\tconst languageTranslations = globalVar.window.CKEDITOR_TRANSLATIONS[language];\n\tlanguageTranslations.dictionary = languageTranslations.dictionary || {};\n\tlanguageTranslations.getPluralForm = getPluralForm || languageTranslations.getPluralForm;\n\tObject.assign(languageTranslations.dictionary, translations);\n}\n/**\n* **Note:** This method is internal, use {@link module:utils/locale~Locale#t the `t()` function} instead to translate\n* the editor UI parts.\n*\n* This function is responsible for translating messages to the specified language. It uses translations added perviously\n* by {@link module:utils/translation-service~add} (a translations dictionary and the `getPluralForm()` function\n* to provide accurate translations of plural forms).\n*\n* When no translation is defined in the dictionary or the dictionary does not exist, this function returns\n* the original message string or the message plural depending on the number of elements.\n*\n* ```ts\n* translate( 'pl', { string: 'Cancel' } ); // 'Cancel'\n* ```\n*\n* The third optional argument is the number of elements, based on which the single form or one of the plural forms\n* should be picked when the message is supposed to support various plural forms.\n*\n* ```ts\n* translate( 'en', { string: 'Add a space', plural: 'Add %0 spaces' }, 1 ); // 'Add a space'\n* translate( 'en', { string: 'Add a space', plural: 'Add %0 spaces' }, 3 ); // 'Add %0 spaces'\n* ```\n*\n* The message should provide an ID using the `id` property when the message strings are not unique and their\n* translations should be different.\n*\n* ```ts\n* translate( 'en', { string: 'image', id: 'ADD_IMAGE' } );\n* translate( 'en', { string: 'image', id: 'AN_IMAGE' } );\n* ```\n*\n* @internal\n* @param language Target language.\n* @param message A message that will be translated.\n* @param quantity The number of elements for which a plural form should be picked from the target language dictionary.\n* @param translations Translations passed in editor config, if not provided use the global `window.CKEDITOR_TRANSLATIONS`.\n* @returns Translated sentence.\n*/\nfunction _translate(language, message, quantity = 1, translations) {\n\tif (typeof quantity !== \"number\")\n /**\n\t* An incorrect value was passed to the translation function. This was probably caused\n\t* by an incorrect message interpolation of a plural form. Note that for messages supporting plural forms\n\t* the second argument of the `t()` function should always be a number or an array with a number as the first element.\n\t*\n\t* @error translation-service-quantity-not-a-number\n\t*/\n\tthrow new CKEditorError(\"translation-service-quantity-not-a-number\", null, { quantity });\n\tconst normalizedTranslations = translations || globalVar.window.CKEDITOR_TRANSLATIONS;\n\tconst numberOfLanguages = getNumberOfLanguages(normalizedTranslations);\n\tif (numberOfLanguages === 1) language = Object.keys(normalizedTranslations)[0];\n\tconst messageId = message.id || message.string;\n\tif (numberOfLanguages === 0 || !hasTranslation(language, messageId, normalizedTranslations)) {\n\t\tif (quantity !== 1) return message.plural;\n\t\treturn message.string;\n\t}\n\tconst dictionary = normalizedTranslations[language].dictionary;\n\tconst getPluralForm = normalizedTranslations[language].getPluralForm || ((n) => n === 1 ? 0 : 1);\n\tconst translation = dictionary[messageId];\n\tif (typeof translation === \"string\") return translation;\n\treturn translation[Number(getPluralForm(quantity))];\n}\n/**\n* Clears dictionaries for test purposes.\n*\n* @internal\n*/\nfunction _clear() {\n\tif (globalVar.window.CKEDITOR_TRANSLATIONS) globalVar.window.CKEDITOR_TRANSLATIONS = {};\n}\n/**\n* If array then merge objects which are inside otherwise return given object.\n*\n* @internal\n* @param translations Translations passed in editor config.\n*/\nfunction _unifyTranslations(translations) {\n\treturn Array.isArray(translations) ? translations.reduce((acc, translation) => merge(acc, translation)) : translations;\n}\n/**\n* Checks whether the dictionary exists and translation in that dictionary exists.\n*/\nfunction hasTranslation(language, messageId, translations) {\n\treturn !!translations[language] && !!translations[language].dictionary[messageId];\n}\nfunction getNumberOfLanguages(translations) {\n\treturn Object.keys(translations).length;\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/locale\n*/\n/**\n* Represents the localization services.\n*/\nvar Locale = class {\n\t/**\n\t* The editor UI language code in the [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) format.\n\t*\n\t* If the {@link #contentLanguage content language} was not specified in the `Locale` constructor,\n\t* it also defines the language of the content.\n\t*/\n\tuiLanguage;\n\t/**\n\t* Text direction of the {@link #uiLanguage editor UI language}. Either `'ltr'` or `'rtl'`.\n\t*/\n\tuiLanguageDirection;\n\t/**\n\t* The editor content language code in the [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) format.\n\t*\n\t* Usually the same as the {@link #uiLanguage editor language}, it can be customized by passing an optional\n\t* argument to the `Locale` constructor.\n\t*/\n\tcontentLanguage;\n\t/**\n\t* Text direction of the {@link #contentLanguage editor content language}.\n\t*\n\t* If the content language was passed directly to the `Locale` constructor, this property represents the\n\t* direction of that language.\n\t*\n\t* If the {@link #contentLanguage editor content language} was derived from the {@link #uiLanguage editor language},\n\t* the content language direction is the same as the {@link #uiLanguageDirection UI language direction}.\n\t*\n\t* The value is either `'ltr'` or `'rtl'`.\n\t*/\n\tcontentLanguageDirection;\n\t/**\n\t* Translates the given message to the {@link #uiLanguage}. This method is also available in\n\t* {@link module:core/editor/editor~Editor#t `Editor`} and {@link module:ui/view~View#t `View`}.\n\t*\n\t* This method's context is statically bound to the `Locale` instance and **should always be called as a function**:\n\t*\n\t* ```ts\n\t* const t = locale.t;\n\t* t( 'Label' );\n\t* ```\n\t*\n\t* The message can be either a string or an object implementing the {@link module:utils/translation-service~Message} interface.\n\t*\n\t* The message may contain placeholders (`%<index>`) for value(s) that are passed as a `values` parameter.\n\t* For an array of values, the `%<index>` will be changed to an element of that array at the given index.\n\t* For a single value passed as the second argument, only the `%0` placeholders will be changed to the provided value.\n\t*\n\t* ```ts\n\t* t( 'Created file \"%0\" in %1ms.', [ fileName, timeTaken ] );\n\t* t( 'Created file \"%0\", fileName );\n\t* ```\n\t*\n\t* The message supports plural forms. To specify the plural form, use the `plural` property. Singular or plural form\n\t* will be chosen depending on the first value from the passed `values`. The value of the `plural` property is used\n\t* as a default plural translation when the translation for the target language is missing.\n\t*\n\t* ```ts\n\t* t( { string: 'Add a space', plural: 'Add %0 spaces' }, 1 ); // 'Add a space' for the English language.\n\t* t( { string: 'Add a space', plural: 'Add %0 spaces' }, 5 ); // 'Add 5 spaces' for the English language.\n\t* t( { string: '%1 a space', plural: '%1 %0 spaces' }, [ 2, 'Add' ] ); // 'Add 2 spaces' for the English language.\n\t*\n\t* t( { string: 'Add a space', plural: 'Add %0 spaces' }, 1 ); // 'Dodaj spację' for the Polish language.\n\t* t( { string: 'Add a space', plural: 'Add %0 spaces' }, 5 ); // 'Dodaj 5 spacji' for the Polish language.\n\t* t( { string: '%1 a space', plural: '%1 %0 spaces' }, [ 2, 'Add' ] ); // 'Dodaj 2 spacje' for the Polish language.\n\t* ```\n\t*\n\t* * The message should provide an ID using the `id` property when the message strings are not unique and their\n\t* translations should be different.\n\t*\n\t* ```ts\n\t* translate( 'en', { string: 'image', id: 'ADD_IMAGE' } );\n\t* translate( 'en', { string: 'image', id: 'AN_IMAGE' } );\n\t* ```\n\t*/\n\tt;\n\t/**\n\t* Object that contains translations.\n\t*/\n\ttranslations;\n\t/**\n\t* Creates a new instance of the locale class. Learn more about\n\t* {@glink getting-started/setup/ui-language configuring the language of the editor}.\n\t*\n\t* @param options Locale configuration.\n\t* @param options.uiLanguage The editor UI language code in the\n\t* [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) format. See {@link #uiLanguage}.\n\t* @param options.contentLanguage The editor content language code in the\n\t* [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) format. If not specified, the same as `options.language`.\n\t* See {@link #contentLanguage}.\n\t* @param options.translations Translations passed as a editor config parameter.\n\t*/\n\tconstructor({ uiLanguage = \"en\", contentLanguage, translations } = {}) {\n\t\tthis.uiLanguage = uiLanguage;\n\t\tthis.contentLanguage = contentLanguage || this.uiLanguage;\n\t\tthis.uiLanguageDirection = getLanguageDirection(this.uiLanguage);\n\t\tthis.contentLanguageDirection = getLanguageDirection(this.contentLanguage);\n\t\tthis.translations = _unifyTranslations(translations);\n\t\tthis.t = (message, values) => this._t(message, values);\n\t}\n\t/**\n\t* An unbound version of the {@link #t} method.\n\t*/\n\t_t(message, values = []) {\n\t\tvalues = toArray(values);\n\t\tif (typeof message === \"string\") message = { string: message };\n\t\tconst quantity = !!message.plural ? values[0] : 1;\n\t\treturn interpolateString(_translate(this.uiLanguage, message, quantity, this.translations), values);\n\t}\n};\n/**\n* Fills the `%0, %1, ...` string placeholders with values.\n*/\nfunction interpolateString(string, values) {\n\treturn string.replace(/%(\\d+)/g, (match, index) => {\n\t\treturn index < values.length ? values[index] : match;\n\t});\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/collection\n*/\nconst CollectionBase = /* #__PURE__ */ EmitterMixin();\n/**\n* Collections are ordered sets of objects. Items in the collection can be retrieved by their indexes\n* in the collection (like in an array) or by their ids.\n*\n* If an object without an `id` property is being added to the collection, the `id` property will be generated\n* automatically. Note that the automatically generated id is unique only within this single collection instance.\n*\n* By default an item in the collection is identified by its `id` property. The name of the identifier can be\n* configured through the constructor of the collection.\n*\n* @typeParam T The type of the collection element.\n*/\nvar Collection = class extends CollectionBase {\n\t/**\n\t* The internal list of items in the collection.\n\t*/\n\t_items;\n\t/**\n\t* The internal map of items in the collection.\n\t*/\n\t_itemMap;\n\t/**\n\t* The name of the property which is considered to identify an item.\n\t*/\n\t_idProperty;\n\t/**\n\t* A collection instance this collection is bound to as a result\n\t* of calling {@link #bindTo} method.\n\t*/\n\t_bindToCollection;\n\t/**\n\t* A helper mapping external items of a bound collection ({@link #bindTo})\n\t* and actual items of this collection. It provides information\n\t* necessary to properly remove items bound to another collection.\n\t*\n\t* See {@link #_bindToInternalToExternalMap}.\n\t*/\n\t_bindToExternalToInternalMap;\n\t/**\n\t* A helper mapping items of this collection to external items of a bound collection\n\t* ({@link #bindTo}). It provides information necessary to manage the bindings, e.g.\n\t* to avoid loops in two–way bindings.\n\t*\n\t* See {@link #_bindToExternalToInternalMap}.\n\t*/\n\t_bindToInternalToExternalMap;\n\t/**\n\t* Stores indexes of skipped items from bound external collection.\n\t*/\n\t_skippedIndexesFromExternal;\n\tconstructor(initialItemsOrOptions = {}, options = {}) {\n\t\tsuper();\n\t\tconst hasInitialItems = isIterable(initialItemsOrOptions);\n\t\tif (!hasInitialItems) options = initialItemsOrOptions;\n\t\tthis._items = [];\n\t\tthis._itemMap = /* @__PURE__ */ new Map();\n\t\tthis._idProperty = options.idProperty || \"id\";\n\t\tthis._bindToExternalToInternalMap = /* @__PURE__ */ new WeakMap();\n\t\tthis._bindToInternalToExternalMap = /* @__PURE__ */ new WeakMap();\n\t\tthis._skippedIndexesFromExternal = [];\n\t\tif (hasInitialItems) for (const item of initialItemsOrOptions) {\n\t\t\tthis._items.push(item);\n\t\t\tthis._itemMap.set(this._getItemIdBeforeAdding(item), item);\n\t\t}\n\t}\n\t/**\n\t* The number of items available in the collection.\n\t*/\n\tget length() {\n\t\treturn this._items.length;\n\t}\n\t/**\n\t* Returns the first item from the collection or null when collection is empty.\n\t*/\n\tget first() {\n\t\treturn this._items[0] || null;\n\t}\n\t/**\n\t* Returns the last item from the collection or null when collection is empty.\n\t*/\n\tget last() {\n\t\treturn this._items[this.length - 1] || null;\n\t}\n\t/**\n\t* Adds an item into the collection.\n\t*\n\t* If the item does not have an id, then it will be automatically generated and set on the item.\n\t*\n\t* @param item\n\t* @param index The position of the item in the collection. The item\n\t* is pushed to the collection when `index` not specified.\n\t* @fires add\n\t* @fires change\n\t*/\n\tadd(item, index) {\n\t\treturn this.addMany([item], index);\n\t}\n\t/**\n\t* Adds multiple items into the collection.\n\t*\n\t* Any item not containing an id will get an automatically generated one.\n\t*\n\t* @param items\n\t* @param index The position of the insertion. Items will be appended if no `index` is specified.\n\t* @fires add\n\t* @fires change\n\t*/\n\taddMany(items, index) {\n\t\tif (index === void 0) index = this._items.length;\n\t\telse if (index > this._items.length || index < 0)\n /**\n\t\t* The `index` passed to {@link module:utils/collection~Collection#addMany `Collection#addMany()`}\n\t\t* is invalid. It must be a number between 0 and the collection's length.\n\t\t*\n\t\t* @error collection-add-item-invalid-index\n\t\t*/\n\t\tthrow new CKEditorError(\"collection-add-item-invalid-index\", this);\n\t\tlet offset = 0;\n\t\tfor (const item of items) {\n\t\t\tconst itemId = this._getItemIdBeforeAdding(item);\n\t\t\tconst currentItemIndex = index + offset;\n\t\t\tthis._items.splice(currentItemIndex, 0, item);\n\t\t\tthis._itemMap.set(itemId, item);\n\t\t\tthis.fire(\"add\", item, currentItemIndex);\n\t\t\toffset++;\n\t\t}\n\t\tthis.fire(\"change\", {\n\t\t\tadded: items,\n\t\t\tremoved: [],\n\t\t\tindex\n\t\t});\n\t\treturn this;\n\t}\n\t/**\n\t* Gets an item by its ID or index.\n\t*\n\t* @param idOrIndex The item ID or index in the collection.\n\t* @returns The requested item or `null` if such item does not exist.\n\t*/\n\tget(idOrIndex) {\n\t\tlet item;\n\t\tif (typeof idOrIndex == \"string\") item = this._itemMap.get(idOrIndex);\n\t\telse if (typeof idOrIndex == \"number\") item = this._items[idOrIndex];\n\t\telse\n /**\n\t\t* An index or ID must be given.\n\t\t*\n\t\t* @error collection-get-invalid-arg\n\t\t*/\n\t\tthrow new CKEditorError(\"collection-get-invalid-arg\", this);\n\t\treturn item || null;\n\t}\n\t/**\n\t* Returns a Boolean indicating whether the collection contains an item.\n\t*\n\t* @param itemOrId The item or its ID in the collection.\n\t* @returns `true` if the collection contains the item, `false` otherwise.\n\t*/\n\thas(itemOrId) {\n\t\tif (typeof itemOrId == \"string\") return this._itemMap.has(itemOrId);\n\t\telse {\n\t\t\tconst id = itemOrId[this._idProperty];\n\t\t\treturn id && this._itemMap.has(id);\n\t\t}\n\t}\n\t/**\n\t* Gets an index of an item in the collection.\n\t* When an item is not defined in the collection, the index will equal -1.\n\t*\n\t* @param itemOrId The item or its ID in the collection.\n\t* @returns The index of a given item.\n\t*/\n\tgetIndex(itemOrId) {\n\t\tlet item;\n\t\tif (typeof itemOrId == \"string\") item = this._itemMap.get(itemOrId);\n\t\telse item = itemOrId;\n\t\treturn item ? this._items.indexOf(item) : -1;\n\t}\n\t/**\n\t* Removes an item from the collection.\n\t*\n\t* @param subject The item to remove, its ID or index in the collection.\n\t* @returns The removed item.\n\t* @fires remove\n\t* @fires change\n\t*/\n\tremove(subject) {\n\t\tconst [item, index] = this._remove(subject);\n\t\tthis.fire(\"change\", {\n\t\t\tadded: [],\n\t\t\tremoved: [item],\n\t\t\tindex\n\t\t});\n\t\treturn item;\n\t}\n\t/**\n\t* Executes the callback for each item in the collection and composes an array or values returned by this callback.\n\t*\n\t* @typeParam U The result type of the callback.\n\t* @param callback\n\t* @param ctx Context in which the `callback` will be called.\n\t* @returns The result of mapping.\n\t*/\n\tmap(callback, ctx) {\n\t\treturn this._items.map(callback, ctx);\n\t}\n\t/**\n\t* Performs the specified action for each item in the collection.\n\t*\n\t* @param ctx Context in which the `callback` will be called.\n\t*/\n\tforEach(callback, ctx) {\n\t\tthis._items.forEach(callback, ctx);\n\t}\n\t/**\n\t* Finds the first item in the collection for which the `callback` returns a true value.\n\t*\n\t* @param callback\n\t* @param ctx Context in which the `callback` will be called.\n\t* @returns The item for which `callback` returned a true value.\n\t*/\n\tfind(callback, ctx) {\n\t\treturn this._items.find(callback, ctx);\n\t}\n\t/**\n\t* Returns an array with items for which the `callback` returned a true value.\n\t*\n\t* @param callback\n\t* @param ctx Context in which the `callback` will be called.\n\t* @returns The array with matching items.\n\t*/\n\tfilter(callback, ctx) {\n\t\treturn this._items.filter(callback, ctx);\n\t}\n\t/**\n\t* Removes all items from the collection and destroys the binding created using\n\t* {@link #bindTo}.\n\t*\n\t* @fires remove\n\t* @fires change\n\t*/\n\tclear() {\n\t\tif (this._bindToCollection) {\n\t\t\tthis.stopListening(this._bindToCollection);\n\t\t\tthis._bindToCollection = null;\n\t\t}\n\t\tconst removedItems = Array.from(this._items);\n\t\twhile (this.length) this._remove(0);\n\t\tthis.fire(\"change\", {\n\t\t\tadded: [],\n\t\t\tremoved: removedItems,\n\t\t\tindex: 0\n\t\t});\n\t}\n\t/**\n\t* Binds and synchronizes the collection with another one.\n\t*\n\t* The binding can be a simple factory:\n\t*\n\t* ```ts\n\t* class FactoryClass {\n\t* \tpublic label: string;\n\t*\n\t* \tconstructor( data: { label: string } ) {\n\t* \t\tthis.label = data.label;\n\t* \t}\n\t* }\n\t*\n\t* const source = new Collection<{ label: string }>( { idProperty: 'label' } );\n\t* const target = new Collection<FactoryClass>();\n\t*\n\t* target.bindTo( source ).as( FactoryClass );\n\t*\n\t* source.add( { label: 'foo' } );\n\t* source.add( { label: 'bar' } );\n\t*\n\t* console.log( target.length ); // 2\n\t* console.log( target.get( 1 ).label ); // 'bar'\n\t*\n\t* source.remove( 0 );\n\t* console.log( target.length ); // 1\n\t* console.log( target.get( 0 ).label ); // 'bar'\n\t* ```\n\t*\n\t* or the factory driven by a custom callback:\n\t*\n\t* ```ts\n\t* class FooClass {\n\t* \tpublic label: string;\n\t*\n\t* \tconstructor( data: { label: string } ) {\n\t* \t\tthis.label = data.label;\n\t* \t}\n\t* }\n\t*\n\t* class BarClass {\n\t* \tpublic label: string;\n\t*\n\t* \tconstructor( data: { label: string } ) {\n\t* \t\tthis.label = data.label;\n\t* \t}\n\t* }\n\t*\n\t* const source = new Collection<{ label: string }>( { idProperty: 'label' } );\n\t* const target = new Collection<FooClass | BarClass>();\n\t*\n\t* target.bindTo( source ).using( ( item ) => {\n\t* \tif ( item.label == 'foo' ) {\n\t* \t\treturn new FooClass( item );\n\t* \t} else {\n\t* \t\treturn new BarClass( item );\n\t* \t}\n\t* } );\n\t*\n\t* source.add( { label: 'foo' } );\n\t* source.add( { label: 'bar' } );\n\t*\n\t* console.log( target.length ); // 2\n\t* console.log( target.get( 0 ) instanceof FooClass ); // true\n\t* console.log( target.get( 1 ) instanceof BarClass ); // true\n\t* ```\n\t*\n\t* or the factory out of property name:\n\t*\n\t* ```ts\n\t* const source = new Collection<{ nested: { value: string } }>();\n\t* const target = new Collection<{ value: string }>();\n\t*\n\t* target.bindTo( source ).using( 'nested' );\n\t*\n\t* source.add( { nested: { value: 'foo' } } );\n\t* source.add( { nested: { value: 'bar' } } );\n\t*\n\t* console.log( target.length ); // 2\n\t* console.log( target.get( 0 ).value ); // 'foo'\n\t* console.log( target.get( 1 ).value ); // 'bar'\n\t* ```\n\t*\n\t* It's possible to skip specified items by returning null value:\n\t*\n\t* ```ts\n\t* const source = new Collection<{ hidden: boolean }>();\n\t* const target = new Collection<{ hidden: boolean }>();\n\t*\n\t* target.bindTo( source ).using( item => {\n\t* \tif ( item.hidden ) {\n\t* \t\treturn null;\n\t* \t}\n\t*\n\t* \treturn item;\n\t* } );\n\t*\n\t* source.add( { hidden: true } );\n\t* source.add( { hidden: false } );\n\t*\n\t* console.log( source.length ); // 2\n\t* console.log( target.length ); // 1\n\t* ```\n\t*\n\t* **Note**: {@link #clear} can be used to break the binding.\n\t*\n\t* @typeParam S The type of `externalCollection` element.\n\t* @param externalCollection A collection to be bound.\n\t* @returns The binding chain object.\n\t*/\n\tbindTo(externalCollection) {\n\t\tif (this._bindToCollection)\n /**\n\t\t* The collection cannot be bound more than once.\n\t\t*\n\t\t* @error collection-bind-to-rebind\n\t\t*/\n\t\tthrow new CKEditorError(\"collection-bind-to-rebind\", this);\n\t\tthis._bindToCollection = externalCollection;\n\t\treturn {\n\t\t\tas: (Class) => {\n\t\t\t\tthis._setUpBindToBinding((item) => new Class(item));\n\t\t\t},\n\t\t\tusing: (callbackOrProperty) => {\n\t\t\t\tif (typeof callbackOrProperty == \"function\") this._setUpBindToBinding(callbackOrProperty);\n\t\t\t\telse this._setUpBindToBinding((item) => item[callbackOrProperty]);\n\t\t\t}\n\t\t};\n\t}\n\t/**\n\t* Finalizes and activates a binding initiated by {@link #bindTo}.\n\t*\n\t* @param factory A function which produces collection items.\n\t*/\n\t_setUpBindToBinding(factory) {\n\t\tconst externalCollection = this._bindToCollection;\n\t\tconst addItem = (evt, externalItem, index) => {\n\t\t\tconst isExternalBoundToThis = externalCollection._bindToCollection == this;\n\t\t\tconst externalItemBound = externalCollection._bindToInternalToExternalMap.get(externalItem);\n\t\t\tif (isExternalBoundToThis && externalItemBound) {\n\t\t\t\tthis._bindToExternalToInternalMap.set(externalItem, externalItemBound);\n\t\t\t\tthis._bindToInternalToExternalMap.set(externalItemBound, externalItem);\n\t\t\t} else {\n\t\t\t\tconst item = factory(externalItem);\n\t\t\t\tif (!item) {\n\t\t\t\t\tthis._skippedIndexesFromExternal.push(index);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tlet finalIndex = index;\n\t\t\t\tfor (const skipped of this._skippedIndexesFromExternal) if (index > skipped) finalIndex--;\n\t\t\t\tfor (const skipped of externalCollection._skippedIndexesFromExternal) if (finalIndex >= skipped) finalIndex++;\n\t\t\t\tthis._bindToExternalToInternalMap.set(externalItem, item);\n\t\t\t\tthis._bindToInternalToExternalMap.set(item, externalItem);\n\t\t\t\tthis.add(item, finalIndex);\n\t\t\t\tfor (let i = 0; i < externalCollection._skippedIndexesFromExternal.length; i++) if (finalIndex <= externalCollection._skippedIndexesFromExternal[i]) externalCollection._skippedIndexesFromExternal[i]++;\n\t\t\t}\n\t\t};\n\t\tfor (const externalItem of externalCollection) addItem(null, externalItem, externalCollection.getIndex(externalItem));\n\t\tthis.listenTo(externalCollection, \"add\", addItem);\n\t\tthis.listenTo(externalCollection, \"remove\", (evt, externalItem, index) => {\n\t\t\tconst item = this._bindToExternalToInternalMap.get(externalItem);\n\t\t\tif (item) this.remove(item);\n\t\t\tthis._skippedIndexesFromExternal = this._skippedIndexesFromExternal.reduce((result, skipped) => {\n\t\t\t\tif (index < skipped) result.push(skipped - 1);\n\t\t\t\tif (index > skipped) result.push(skipped);\n\t\t\t\treturn result;\n\t\t\t}, []);\n\t\t});\n\t}\n\t/**\n\t* Returns an unique id property for a given `item`.\n\t*\n\t* The method will generate new id and assign it to the `item` if it doesn't have any.\n\t*\n\t* @param item Item to be added.\n\t*/\n\t_getItemIdBeforeAdding(item) {\n\t\tconst idProperty = this._idProperty;\n\t\tlet itemId;\n\t\tif (idProperty in item) {\n\t\t\titemId = item[idProperty];\n\t\t\tif (typeof itemId != \"string\")\n /**\n\t\t\t* This item's ID should be a string.\n\t\t\t*\n\t\t\t* @error collection-add-invalid-id\n\t\t\t*/\n\t\t\tthrow new CKEditorError(\"collection-add-invalid-id\", this);\n\t\t\tif (this.get(itemId))\n /**\n\t\t\t* This item already exists in the collection.\n\t\t\t*\n\t\t\t* @error collection-add-item-already-exists\n\t\t\t*/\n\t\t\tthrow new CKEditorError(\"collection-add-item-already-exists\", this);\n\t\t} else item[idProperty] = itemId = uid();\n\t\treturn itemId;\n\t}\n\t/**\n\t* Core {@link #remove} method implementation shared in other functions.\n\t*\n\t* In contrast this method **does not** fire the {@link #event:change} event.\n\t*\n\t* @param subject The item to remove, its id or index in the collection.\n\t* @returns Returns an array with the removed item and its index.\n\t* @fires remove\n\t*/\n\t_remove(subject) {\n\t\tlet index, id, item;\n\t\tlet itemDoesNotExist;\n\t\tconst idProperty = this._idProperty;\n\t\tif (typeof subject == \"string\") {\n\t\t\tid = subject;\n\t\t\titem = this._itemMap.get(id);\n\t\t\titemDoesNotExist = !item;\n\t\t\tif (item) index = this._items.indexOf(item);\n\t\t} else if (typeof subject == \"number\") {\n\t\t\tindex = subject;\n\t\t\titem = this._items[index];\n\t\t\titemDoesNotExist = !item;\n\t\t\tif (item) id = item[idProperty];\n\t\t} else {\n\t\t\titem = subject;\n\t\t\tid = item[idProperty];\n\t\t\tindex = this._items.indexOf(item);\n\t\t\titemDoesNotExist = index == -1 || !this._itemMap.get(id);\n\t\t}\n\t\tif (itemDoesNotExist)\n /**\n\t\t* Item not found.\n\t\t*\n\t\t* @error collection-remove-404\n\t\t*/\n\t\tthrow new CKEditorError(\"collection-remove-404\", this);\n\t\tthis._items.splice(index, 1);\n\t\tthis._itemMap.delete(id);\n\t\tconst externalItem = this._bindToInternalToExternalMap.get(item);\n\t\tthis._bindToInternalToExternalMap.delete(item);\n\t\tthis._bindToExternalToInternalMap.delete(externalItem);\n\t\tthis.fire(\"remove\", item, index);\n\t\treturn [item, index];\n\t}\n\t/**\n\t* Iterable interface.\n\t*/\n\t[Symbol.iterator]() {\n\t\treturn this._items[Symbol.iterator]();\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/first\n*/\n/**\n* Returns first item of the given `iterator`.\n*/\nfunction first(iterator) {\n\tconst iteratorItem = iterator.next();\n\tif (iteratorItem.done) return null;\n\treturn iteratorItem.value;\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/nth\n*/\n/**\n* Returns `nth` (starts from `0` of course) item of the given `iterable`.\n*\n* If the iterable is a generator, then it consumes **all its items**.\n* If it's a normal iterator, then it consumes **all items up to the given index**.\n* Refer to the [Iterators and Generators](https://developer.mozilla.org/en/docs/Web/JavaScript/Guide/Iterators_and_Generators)\n* guide to learn differences between these interfaces.\n*/\nfunction nth(index, iterable) {\n\tfor (const item of iterable) {\n\t\tif (index === 0) return item;\n\t\tindex -= 1;\n\t}\n\treturn null;\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/focustracker\n*/\nconst FocusTrackerBase = /* #__PURE__ */ DomEmitterMixin(/* #__PURE__ */ ObservableMixin());\n/**\n* Allows observing a group of DOM `Element`s or {@link module:ui/view~View view instances} whether at least one of them (or their child)\n* is focused.\n*\n* Used by the {@link module:core/editor/editor~Editor} in order to track whether the focus is still within the application,\n* or were used outside of its UI.\n*\n* **Note** `focus` and `blur` listeners use event capturing, so it is only needed to register wrapper `Element`\n* which contain other `focusable` elements. But note that this wrapper element has to be focusable too\n* (have e.g. `tabindex=\"-1\"`).\n*\n* Check out the {@glink framework/deep-dive/ui/focus-tracking \"Deep dive into focus tracking\"} guide to learn more.\n*/\nvar FocusTracker = class extends FocusTrackerBase {\n\t/**\n\t* List of registered DOM elements.\n\t*\n\t* @internal\n\t*/\n\t_elements = /* @__PURE__ */ new Set();\n\t/**\n\t* List of views with external focus trackers that contribute to the state of this focus tracker.\n\t*\n\t* @internal\n\t*/\n\t_externalViews = /* @__PURE__ */ new Set();\n\t/**\n\t* Asynchronous blur event timeout.\n\t*/\n\t_blurTimeout = null;\n\tconstructor() {\n\t\tsuper();\n\t\tthis.set(\"isFocused\", false);\n\t\tthis.set(\"focusedElement\", null);\n\t}\n\t/**\n\t* List of registered DOM elements.\n\t*\n\t* **Note**: The list does do not include elements from {@link #externalViews}.\n\t*/\n\tget elements() {\n\t\treturn Array.from(this._elements.values());\n\t}\n\t/**\n\t* List of external focusable views that contribute to the state of this focus tracker. See {@link #add} to learn more.\n\t*/\n\tget externalViews() {\n\t\treturn Array.from(this._externalViews.values());\n\t}\n\t/**\n\t* Starts tracking a specified DOM element or a {@link module:ui/view~View} instance.\n\t*\n\t* * If a DOM element is passed, the focus tracker listens to the `focus` and `blur` events on this element.\n\t* Tracked elements are listed in {@link #elements}.\n\t* * If a {@link module:ui/view~View} instance is passed that has a `FocusTracker` instance ({@link ~ViewWithFocusTracker}),\n\t* the external focus tracker's state ({@link #isFocused}, {@link #focusedElement}) starts contributing to the current tracker instance.\n\t* This allows for increasing the \"reach\" of a focus tracker instance, by connecting two or more focus trackers together when DOM\n\t* elements they track are located in different subtrees in DOM. External focus trackers are listed in {@link #externalViews}.\n\t* * If a {@link module:ui/view~View} instance is passed that has no `FocusTracker` (**not** a {@link ~ViewWithFocusTracker}),\n\t* its {@link module:ui/view~View#element} is used to track focus like any other DOM element.\n\t*/\n\tadd(elementOrView) {\n\t\tif (isElement$1(elementOrView)) this._addElement(elementOrView);\n\t\telse if (isViewWithFocusTracker(elementOrView)) this._addView(elementOrView);\n\t\telse {\n\t\t\tif (!elementOrView.element)\n /**\n\t\t\t* The {@link module:ui/view~View} added to the {@link module:utils/focustracker~FocusTracker} does not have an\n\t\t\t* {@link module:ui/view~View#element}. Make sure the view is {@link module:ui/view~View#render} before adding\n\t\t\t* it to the focus tracker.\n\t\t\t*\n\t\t\t* @error focustracker-add-view-missing-element\n\t\t\t*/\n\t\t\tthrow new CKEditorError(\"focustracker-add-view-missing-element\", {\n\t\t\t\tfocusTracker: this,\n\t\t\t\tview: elementOrView\n\t\t\t});\n\t\t\tthis._addElement(elementOrView.element);\n\t\t}\n\t}\n\t/**\n\t* Stops tracking focus in the specified DOM element or a {@link module:ui/view~View view instance}. See {@link #add} to learn more.\n\t*/\n\tremove(elementOrView) {\n\t\tif (isElement$1(elementOrView)) this._removeElement(elementOrView);\n\t\telse if (isViewWithFocusTracker(elementOrView)) this._removeView(elementOrView);\n\t\telse this._removeElement(elementOrView.element);\n\t}\n\t/**\n\t* Adds a DOM element to the focus tracker and starts listening to the `focus` and `blur` events on it.\n\t*/\n\t_addElement(element) {\n\t\tif (this._elements.has(element))\n /**\n\t\t* This element is already tracked by {@link module:utils/focustracker~FocusTracker}.\n\t\t*\n\t\t* @error focustracker-add-element-already-exist\n\t\t*/\n\t\tthrow new CKEditorError(\"focustracker-add-element-already-exist\", this);\n\t\tthis.listenTo(element, \"focus\", () => {\n\t\t\tconst externalFocusedViewInSubtree = this.externalViews.find((view) => isExternalViewSubtreeFocused(element, view));\n\t\t\tif (externalFocusedViewInSubtree) this._focus(externalFocusedViewInSubtree.element);\n\t\t\telse this._focus(element);\n\t\t}, { useCapture: true });\n\t\tthis.listenTo(element, \"blur\", () => {\n\t\t\tthis._blur();\n\t\t}, { useCapture: true });\n\t\tthis._elements.add(element);\n\t}\n\t/**\n\t* Removes a DOM element from the focus tracker.\n\t*/\n\t_removeElement(element) {\n\t\tif (this._elements.has(element)) {\n\t\t\tthis.stopListening(element);\n\t\t\tthis._elements.delete(element);\n\t\t}\n\t\tif (element === this.focusedElement) this._blur();\n\t}\n\t/**\n\t* Adds an external {@link module:ui/view~View view instance} to this focus tracker and makes it contribute to this focus tracker's\n\t* state either by its `View#element` or by its `View#focusTracker` instance.\n\t*/\n\t_addView(view) {\n\t\tif (view.element) this._addElement(view.element);\n\t\tthis.listenTo(view.focusTracker, \"change:focusedElement\", () => {\n\t\t\tif (view.focusTracker.focusedElement) {\n\t\t\t\tif (view.element) this._focus(view.element);\n\t\t\t} else this._blur();\n\t\t});\n\t\tthis._externalViews.add(view);\n\t}\n\t/**\n\t* Removes an external {@link module:ui/view~View view instance} from this focus tracker.\n\t*/\n\t_removeView(view) {\n\t\tif (view.element) this._removeElement(view.element);\n\t\tthis.stopListening(view.focusTracker);\n\t\tthis._externalViews.delete(view);\n\t}\n\t/**\n\t* Destroys the focus tracker by:\n\t* - Disabling all event listeners attached to tracked elements or external views.\n\t* - Removing all tracked elements and views that were previously added.\n\t*/\n\tdestroy() {\n\t\tthis.stopListening();\n\t\tthis._elements.clear();\n\t\tthis._externalViews.clear();\n\t\tthis.isFocused = false;\n\t\tthis.focusedElement = null;\n\t}\n\t/**\n\t* Stores currently focused element as {@link #focusedElement} and sets {@link #isFocused} `true`.\n\t*/\n\t_focus(element) {\n\t\tthis._clearBlurTimeout();\n\t\tthis.focusedElement = element;\n\t\tthis.isFocused = true;\n\t}\n\t/**\n\t* Clears currently {@link #focusedElement} and sets {@link #isFocused} `false`.\n\t*\n\t* This method uses `setTimeout()` to change order of `blur` and `focus` events calls, ensuring that moving focus between\n\t* two elements within a single focus tracker's scope, will not cause `[ blurA, focusB ]` sequence but just `[ focusB ]`.\n\t* The former would cause a momentary change of `#isFocused` to `false` which is not desired because any logic listening to\n\t* a focus tracker state would experience UI flashes and glitches as the user focus travels across the UI.\n\t*/\n\t_blur() {\n\t\tif (this.elements.find((element) => element.contains(document.activeElement))) return;\n\t\tif (this.externalViews.find((view) => {\n\t\t\treturn view.focusTracker.isFocused && !view.focusTracker._blurTimeout;\n\t\t})) return;\n\t\tthis._clearBlurTimeout();\n\t\tthis._blurTimeout = setTimeout(() => {\n\t\t\tthis.focusedElement = null;\n\t\t\tthis.isFocused = false;\n\t\t}, 0);\n\t}\n\t/**\n\t* Clears the asynchronous blur event timeout on demand. See {@link #_blur} to learn more.\n\t*/\n\t_clearBlurTimeout() {\n\t\tclearTimeout(this._blurTimeout);\n\t\tthis._blurTimeout = null;\n\t}\n};\n/**\n* Checks whether a view is an instance of {@link ~ViewWithFocusTracker}.\n*/\nfunction isViewWithFocusTracker(view) {\n\treturn \"focusTracker\" in view && view.focusTracker instanceof FocusTracker;\n}\nfunction isElement$1(value) {\n\treturn isElement(value);\n}\nfunction isExternalViewSubtreeFocused(subTreeRoot, view) {\n\tif (isFocusedView(subTreeRoot, view)) return true;\n\treturn !!view.focusTracker.externalViews.find((view) => isFocusedView(subTreeRoot, view));\n}\nfunction isFocusedView(subTreeRoot, view) {\n\treturn !!view.element && view.element.contains(document.activeElement) && subTreeRoot.contains(view.element);\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/keystrokehandler\n*/\n/**\n* Keystroke handler allows registering callbacks for given keystrokes.\n*\n* The most frequent use of this class is through the {@link module:core/editor/editor~Editor#keystrokes `editor.keystrokes`}\n* property. It allows listening to keystrokes executed in the editing view:\n*\n* ```ts\n* editor.keystrokes.set( 'Ctrl+A', ( keyEvtData, cancel ) => {\n* \tconsole.log( 'Ctrl+A has been pressed' );\n* \tcancel();\n* } );\n* ```\n*\n* However, this utility class can be used in various part of the UI. For instance, a certain {@link module:ui/view~View}\n* can use it like this:\n*\n* ```ts\n* class MyView extends View {\n* \tconstructor() {\n* \t\tthis.keystrokes = new KeystrokeHandler();\n*\n* \t\tthis.keystrokes.set( 'tab', handleTabKey );\n* \t}\n*\n* \trender() {\n* \t\tsuper.render();\n*\n* \t\tthis.keystrokes.listenTo( this.element );\n* \t}\n* }\n* ```\n*\n* That keystroke handler will listen to `keydown` events fired in this view's main element.\n*\n*/\nvar KeystrokeHandler = class {\n\t/**\n\t* Listener used to listen to events for easier keystroke handler destruction.\n\t*/\n\t_listener;\n\t/**\n\t* Creates an instance of the keystroke handler.\n\t*/\n\tconstructor() {\n\t\tthis._listener = new (DomEmitterMixin())();\n\t}\n\t/**\n\t* Starts listening for `keydown` events from a given emitter.\n\t*/\n\tlistenTo(emitter) {\n\t\tthis._listener.listenTo(emitter, \"keydown\", (evt, keyEvtData) => {\n\t\t\tthis._listener.fire(\"_keydown:\" + getCode(keyEvtData), keyEvtData);\n\t\t});\n\t}\n\t/**\n\t* Registers a handler for the specified keystroke.\n\t*\n\t* @param keystroke Keystroke defined in a format accepted by\n\t* the {@link module:utils/keyboard~parseKeystroke} function.\n\t* @param callback A function called with the\n\t* {@link module:engine/view/observer/keyobserver~ViewDocumentKeyEventData key event data} object and\n\t* a helper function to call both `preventDefault()` and `stopPropagation()` on the underlying event.\n\t* @param options Additional options.\n\t*/\n\tset(keystroke, callback, options = {}) {\n\t\tconst keyCode = parseKeystroke(keystroke);\n\t\tconst priority = options.priority;\n\t\tthis._listener.listenTo(this._listener, \"_keydown:\" + keyCode, (evt, keyEvtData) => {\n\t\t\tif (options.filter && !options.filter(keyEvtData)) return;\n\t\t\tcallback(keyEvtData, () => {\n\t\t\t\tkeyEvtData.preventDefault();\n\t\t\t\tkeyEvtData.stopPropagation();\n\t\t\t\tevt.stop();\n\t\t\t});\n\t\t\tevt.return = true;\n\t\t}, { priority });\n\t}\n\t/**\n\t* Triggers a keystroke handler for a specified key combination, if such a keystroke was {@link #set defined}.\n\t*\n\t* @param keyEvtData Key event data.\n\t* @returns Whether the keystroke was handled.\n\t*/\n\tpress(keyEvtData) {\n\t\treturn !!this._listener.fire(\"_keydown:\" + getCode(keyEvtData), keyEvtData);\n\t}\n\t/**\n\t* Stops listening to `keydown` events from the given emitter.\n\t*/\n\tstopListening(emitter) {\n\t\tthis._listener.stopListening(emitter);\n\t}\n\t/**\n\t* Destroys the keystroke handler.\n\t*/\n\tdestroy() {\n\t\tthis.stopListening();\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/objecttomap\n*/\n/**\n* Transforms object to map.\n*\n* ```ts\n* const map = objectToMap( { 'foo': 1, 'bar': 2 } );\n* map.get( 'foo' ); // 1\n* ```\n*\n* **Note**: For mixed data (`Object` or `Iterable`) there's a dedicated {@link module:utils/tomap~toMap} function.\n*\n* @param obj Object to transform.\n* @returns Map created from object.\n*/\nfunction objectToMap(obj) {\n\tconst map = /* @__PURE__ */ new Map();\n\tfor (const key in obj) map.set(key, obj[key]);\n\treturn map;\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/tomap\n*/\n/**\n* Transforms object or iterable to map. Iterable needs to be in the format acceptable by the `Map` constructor.\n*\n* ```ts\n* map = toMap( { 'foo': 1, 'bar': 2 } );\n* map = toMap( [ [ 'foo', 1 ], [ 'bar', 2 ] ] );\n* map = toMap( anotherMap );\n* ```\n*\n* @param data Object or iterable to transform.\n* @returns Map created from data.\n*/\nfunction toMap(data) {\n\tif (isIterable(data)) return new Map(data);\n\telse return objectToMap(data);\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/mapsequal\n*/\n/**\n* Checks whether given `Map`s are equal, that is has same size and same key-value pairs.\n*\n* @param mapA The first map to compare.\n* @param mapB The second map to compare.\n* @returns `true` if given maps are equal, `false` otherwise.\n*/\nfunction mapsEqual(mapA, mapB) {\n\tif (mapA.size != mapB.size) return false;\n\tfor (const attr of mapA.entries()) if (JSON.stringify(attr[1]) !== JSON.stringify(mapB.get(attr[0]))) return false;\n\treturn true;\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/wait\n*/\n/**\n* Returns a promise that is resolved after the specified time.\n*\n* @param timeout The time in milliseconds to wait.\n* @param options.signal A signal to abort the waiting.\n*/\nfunction wait(timeout, options = {}) {\n\treturn new Promise((resolve, reject) => {\n\t\tconst signal = options.signal || new AbortController().signal;\n\t\tsignal.throwIfAborted();\n\t\tconst timer = setTimeout(timeoutHandler, timeout);\n\t\tsignal.addEventListener(\"abort\", abortHandler, { once: true });\n\t\tfunction timeoutHandler() {\n\t\t\tsignal.removeEventListener(\"abort\", abortHandler);\n\t\t\tresolve();\n\t\t}\n\t\tfunction abortHandler() {\n\t\t\tclearTimeout(timer);\n\t\t\treject(signal.reason);\n\t\t}\n\t});\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/retry\n*/\n/**\n* Tries calling the given callback until it sucessfully resolves.\n*\n* If the callback fails `maxAttempts` times, the returned promise is rejected with the last error.\n*\n* @typeParam TResult The result of a successful callback invocation.\n* @param callback The function to call until it succeeds.\n* @param options Configuration options.\n* @param options.maxAttempts Maximum number of attempts.\n* @param options.retryDelay The time in milliseconds between attempts. By default it implements exponential back-off policy.\n* @param options.signal The signal to abort further retries. The callback itself is not aborted automatically.\n*/\nasync function retry(callback, options = {}) {\n\tconst { maxAttempts = 4, retryDelay = exponentialDelay(), signal = new AbortController().signal } = options;\n\tsignal.throwIfAborted();\n\tfor (let attempt = 0;; attempt++) {\n\t\ttry {\n\t\t\treturn await callback();\n\t\t} catch (err) {\n\t\t\tif (attempt + 1 >= maxAttempts) throw err;\n\t\t}\n\t\tawait wait(retryDelay(attempt), { signal });\n\t}\n}\n/**\n* Creates a function that calculates exponential back-off delay. Pass it as `options.retryDelay` to {@link ~retry}.\n*\n* @param options.delay Base delay between invocations. Defaults to 1s.\n* @param options.factor How much to increase the delay. Defaults to 2x.\n* @param options.maxDelay Maximum timeout. Even if higher timeout is calculated, it cannot get higher than this value. Default to 10s.\n* @returns The function calculating the delay.\n*/\nfunction exponentialDelay(options = {}) {\n\tconst { delay = 1e3, factor = 2, maxDelay = 1e4 } = options;\n\treturn (attempt) => Math.min(factor ** attempt * delay, maxDelay);\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/splicearray\n*/\n/**\n* Splices one array into another. To be used instead of `Array.prototype.splice` for better\n* performance and because the latter may throw \"Maximum call stack size exceeded\" error when\n* passing huge number of items to insert.\n*\n* ```ts\n* spliceArray( [ 1, 2 ], [ 3, 4 ], 0 );\t// [ 3, 4, 1, 2 ]\n* spliceArray( [ 1, 2 ], [ 3, 4 ], 1 );\t// [ 1, 3, 4, 2 ]\n* spliceArray( [ 1, 2 ], [ 3, 4 ], 2 );\t// [ 1, 2, 3, 4 ]\n* spliceArray( [ 1, 2 ], [], 0 );\t// [ 1, 2 ]\n* ```\n*\n* @param targetArray Array to be spliced.\n* @param insertArray Array of elements to be inserted to target.\n* @param index Index at which nodes should be inserted.\n*\n* @returns New spliced array.\n*/\nfunction spliceArray(targetArray, insertArray, index) {\n\tconst originalLength = targetArray.length;\n\tconst insertLength = insertArray.length;\n\tfor (let i = originalLength - 1; i >= index; i--) targetArray[i + insertLength] = targetArray[i];\n\tfor (let i = 0; i < insertLength; i++) targetArray[index + i] = insertArray[i];\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/delay\n*/\n/**\n* Returns a function wrapper that will trigger a function after a specified wait time.\n* The timeout can be canceled by calling the cancel function on the returned wrapped function.\n*\n* @param func The function to wrap.\n* @param wait The timeout in ms.\n*/\nfunction delay(func, wait) {\n\tlet timer;\n\tfunction delayed(...args) {\n\t\tdelayed.cancel();\n\t\ttimer = setTimeout(() => func(...args), wait);\n\t}\n\tdelayed.cancel = () => {\n\t\tclearTimeout(timer);\n\t};\n\treturn delayed;\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/parsebase64encodedobject\n*/\n/**\n* Parses a base64-encoded object and returns the decoded object, or null if the decoding was unsuccessful.\n*/\nfunction parseBase64EncodedObject(encoded) {\n\ttry {\n\t\tif (!encoded.startsWith(\"ey\")) return null;\n\t\tconst decoded = atob(encoded.replace(/-/g, \"+\").replace(/_/g, \"/\"));\n\t\treturn JSON.parse(decoded);\n\t} catch {\n\t\treturn null;\n\t}\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/crc32\n*/\n/**\n* Generates a CRC lookup table.\n* This function creates and returns a 256-element array of pre-computed CRC values for quick CRC calculation.\n* It uses the polynomial 0xEDB88320 to compute each value in the loop, optimizing future CRC calculations.\n*/\nfunction makeCrcTable() {\n\tconst crcTable = [];\n\tfor (let n = 0; n < 256; n++) {\n\t\tlet c = n;\n\t\tfor (let k = 0; k < 8; k++) if (c & 1) c = 3988292384 ^ c >>> 1;\n\t\telse c = c >>> 1;\n\t\tcrcTable[n] = c;\n\t}\n\treturn crcTable;\n}\n/**\n* Calculates CRC-32 checksum for a given inputData to verify the integrity of data.\n*\n* @param inputData Accepts a single value (string, number, boolean), an array of strings, or an array of all of the above types.\n* Non-string values are converted to strings before calculating the checksum.\n* The checksum calculation is based on the concatenated string representation of the input values:\n* * `crc32('foo')` is equivalent to `crc32(['foo'])`\n* * `crc32(123)` is equivalent to `crc32(['123'])`\n* * `crc32(true)` is equivalent to `crc32(['true'])`\n* * `crc32(['foo', 123, true])` produces the same result as `crc32('foo123true')`\n* * Nested arrays of strings are flattened, so `crc32([['foo', 'bar'], 'baz'])` is equivalent to `crc32(['foobar', 'baz'])`\n*\n* @returns The CRC-32 checksum, returned as a hexadecimal string.\n*/\nfunction crc32(inputData) {\n\tconst dataArray = Array.isArray(inputData) ? inputData : [inputData];\n\tconst crcTable = makeCrcTable();\n\tlet crc = -1;\n\tconst dataString = dataArray.map((item) => {\n\t\tif (Array.isArray(item)) return item.join(\"\");\n\t\treturn String(item);\n\t}).join(\"\");\n\tfor (let i = 0; i < dataString.length; i++) {\n\t\tconst byte = dataString.charCodeAt(i);\n\t\tcrc = crc >>> 8 ^ crcTable[(crc ^ byte) & 255];\n\t}\n\tcrc = (crc ^ -1) >>> 0;\n\treturn crc.toString(16).padStart(8, \"0\");\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/collectstylesheets\n*/\n/**\n* A helper function for getting concatenated CSS rules from external stylesheets.\n*\n* @param stylesheets An array of stylesheet paths delivered by the user through the plugin configuration.\n*/\nasync function collectStylesheets(stylesheets) {\n\tif (!stylesheets) return \"\";\n\treturn (await Promise.all(stylesheets.map(async (stylesheet) => {\n\t\tif (stylesheet === \"EDITOR_STYLES\") return getEditorStyles();\n\t\treturn (await window.fetch(stylesheet)).text();\n\t}))).join(\" \").trim();\n}\n/**\n* A helper function for getting the basic editor content styles for the `.ck-content` class\n* and all CSS variables defined in the document.\n*/\nfunction getEditorStyles() {\n\tconst editorStyles = [];\n\tconst editorCSSVariables = [];\n\tfor (const styleSheet of Array.from(document.styleSheets)) if (styleSheet.ownerNode.hasAttribute(\"data-cke\")) {\n\t\tfor (const rule of Array.from(styleSheet.cssRules)) if (rule.cssText.indexOf(\".ck-content\") !== -1) editorStyles.push(rule.cssText);\n\t\telse if (rule.cssText.indexOf(\":root\") !== -1) editorCSSVariables.push(rule.cssText);\n\t}\n\tif (!editorStyles.length) console.warn(\"The editor stylesheet could not be found in the document. Check your webpack config - style-loader should use data-cke=true attribute for the editor stylesheet.\");\n\treturn [...editorCSSVariables, ...editorStyles].join(\" \").trim();\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/formathtml\n*/\n/**\n* A simple (and naive) HTML code formatter that returns a formatted HTML markup that can be easily\n* parsed by human eyes. It beautifies the HTML code by adding new lines between elements that behave like block elements\n* (https://developer.mozilla.org/en-US/docs/Web/HTML/Block-level_elements\n* and a few more like `tr`, `td`, and similar ones) and inserting indents for nested content.\n*\n* WARNING: This function works only on a text that does not contain any indentations or new lines.\n* Calling this function on the already formatted text will damage the formatting.\n*\n* @param input An HTML string to format.\n*/\nfunction formatHtml(input) {\n\tconst elementsToFormat = [\n\t\t{\n\t\t\tname: \"address\",\n\t\t\tisVoid: false\n\t\t},\n\t\t{\n\t\t\tname: \"article\",\n\t\t\tisVoid: false\n\t\t},\n\t\t{\n\t\t\tname: \"aside\",\n\t\t\tisVoid: false\n\t\t},\n\t\t{\n\t\t\tname: \"blockquote\",\n\t\t\tisVoid: false\n\t\t},\n\t\t{\n\t\t\tname: \"details\",\n\t\t\tisVoid: false\n\t\t},\n\t\t{\n\t\t\tname: \"dialog\",\n\t\t\tisVoid: false\n\t\t},\n\t\t{\n\t\t\tname: \"dd\",\n\t\t\tisVoid: false\n\t\t},\n\t\t{\n\t\t\tname: \"div\",\n\t\t\tisVoid: false\n\t\t},\n\t\t{\n\t\t\tname: \"dl\",\n\t\t\tisVoid: false\n\t\t},\n\t\t{\n\t\t\tname: \"dt\",\n\t\t\tisVoid: false\n\t\t},\n\t\t{\n\t\t\tname: \"fieldset\",\n\t\t\tisVoid: false\n\t\t},\n\t\t{\n\t\t\tname: \"figcaption\",\n\t\t\tisVoid: false\n\t\t},\n\t\t{\n\t\t\tname: \"figure\",\n\t\t\tisVoid: false\n\t\t},\n\t\t{\n\t\t\tname: \"footer\",\n\t\t\tisVoid: false\n\t\t},\n\t\t{\n\t\t\tname: \"form\",\n\t\t\tisVoid: false\n\t\t},\n\t\t{\n\t\t\tname: \"h1\",\n\t\t\tisVoid: false\n\t\t},\n\t\t{\n\t\t\tname: \"h2\",\n\t\t\tisVoid: false\n\t\t},\n\t\t{\n\t\t\tname: \"h3\",\n\t\t\tisVoid: false\n\t\t},\n\t\t{\n\t\t\tname: \"h4\",\n\t\t\tisVoid: false\n\t\t},\n\t\t{\n\t\t\tname: \"h5\",\n\t\t\tisVoid: false\n\t\t},\n\t\t{\n\t\t\tname: \"h6\",\n\t\t\tisVoid: false\n\t\t},\n\t\t{\n\t\t\tname: \"header\",\n\t\t\tisVoid: false\n\t\t},\n\t\t{\n\t\t\tname: \"hgroup\",\n\t\t\tisVoid: false\n\t\t},\n\t\t{\n\t\t\tname: \"hr\",\n\t\t\tisVoid: true\n\t\t},\n\t\t{\n\t\t\tname: \"li\",\n\t\t\tisVoid: false\n\t\t},\n\t\t{\n\t\t\tname: \"main\",\n\t\t\tisVoid: false\n\t\t},\n\t\t{\n\t\t\tname: \"nav\",\n\t\t\tisVoid: false\n\t\t},\n\t\t{\n\t\t\tname: \"ol\",\n\t\t\tisVoid: false\n\t\t},\n\t\t{\n\t\t\tname: \"p\",\n\t\t\tisVoid: false\n\t\t},\n\t\t{\n\t\t\tname: \"section\",\n\t\t\tisVoid: false\n\t\t},\n\t\t{\n\t\t\tname: \"table\",\n\t\t\tisVoid: false\n\t\t},\n\t\t{\n\t\t\tname: \"tbody\",\n\t\t\tisVoid: false\n\t\t},\n\t\t{\n\t\t\tname: \"td\",\n\t\t\tisVoid: false\n\t\t},\n\t\t{\n\t\t\tname: \"th\",\n\t\t\tisVoid: false\n\t\t},\n\t\t{\n\t\t\tname: \"thead\",\n\t\t\tisVoid: false\n\t\t},\n\t\t{\n\t\t\tname: \"tfoot\",\n\t\t\tisVoid: false\n\t\t},\n\t\t{\n\t\t\tname: \"tr\",\n\t\t\tisVoid: false\n\t\t},\n\t\t{\n\t\t\tname: \"ul\",\n\t\t\tisVoid: false\n\t\t}\n\t];\n\tconst elementNamesToFormat = elementsToFormat.map((element) => element.name).join(\"|\");\n\tconst lines = input.replace(new RegExp(`</?(${elementNamesToFormat})( .*?)?>`, \"g\"), \"\\n$&\\n\").replace(/<br[^>]*>/g, \"$&\\n\").split(\"\\n\");\n\tlet indentCount = 0;\n\tlet isPreformattedLine = false;\n\treturn lines.map((line) => {\n\t\tisPreformattedLine = isPreformattedBlockLine(line, isPreformattedLine);\n\t\tif (!line.length && !isPreformattedLine) return \"\";\n\t\tif (isNonVoidOpeningTag(line, elementsToFormat)) return indentLine(line, indentCount++);\n\t\tif (isClosingTag(line, elementsToFormat)) return indentLine(line, --indentCount);\n\t\tif (isPreformattedLine === \"middle\" || isPreformattedLine === \"last\") return indentLine(line, 0);\n\t\treturn indentLine(line, indentCount);\n\t}).join(\"\").trimEnd();\n}\n/**\n* Checks, if an argument is an opening tag of a non-void element to be formatted.\n*\n* @param line String to check.\n* @param elementsToFormat Elements to be formatted.\n*/\nfunction isNonVoidOpeningTag(line, elementsToFormat) {\n\treturn elementsToFormat.some((element) => {\n\t\tif (element.isVoid) return false;\n\t\tif (!new RegExp(`<${element.name}( .*?)?>`).test(line)) return false;\n\t\treturn true;\n\t});\n}\n/**\n* Checks, if an argument is a closing tag.\n*\n* @param line String to check.\n* @param elementsToFormat Elements to be formatted.\n*/\nfunction isClosingTag(line, elementsToFormat) {\n\treturn elementsToFormat.some((element) => {\n\t\treturn new RegExp(`</${element.name}>`).test(line);\n\t});\n}\n/**\n* Indents a line by a specified number of characters.\n*\n* @param line Line to indent.\n* @param indentCount Number of characters to use for indentation.\n* @param indentChar Indentation character(s). 4 spaces by default.\n*/\nfunction indentLine(line, indentCount, indentChar = \" \") {\n\treturn `${indentChar.repeat(Math.max(0, indentCount))}${line}\\n`;\n}\n/**\n* Checks whether a line belongs to a preformatted (`<pre>`) block.\n*\n* @param line Line to check.\n* @param isPreviousLinePreFormatted Information on whether the previous line was preformatted (and how).\n*/\nfunction isPreformattedBlockLine(line, isPreviousLinePreFormatted) {\n\tconst isPreOpen = /<pre( .*?)?>/.test(line);\n\tconst isPreClose = /<\\/pre>/.test(line);\n\tif (isPreOpen && isPreClose) return false;\n\telse if (isPreOpen) return \"first\";\n\telse if (isPreClose) return \"last\";\n\telse if (isPreviousLinePreFormatted === \"first\" || isPreviousLinePreFormatted === \"middle\") return \"middle\";\n\telse return false;\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* Set of utils to handle unicode characters.\n*\n* @module utils/unicode\n*/\n/**\n* Checks whether given `character` is a combining mark.\n*\n* @param character Character to check.\n*/\nfunction isCombiningMark(character) {\n\treturn !!character && character.length == 1 && /[\\u0300-\\u036f\\u1ab0-\\u1aff\\u1dc0-\\u1dff\\u20d0-\\u20ff\\ufe20-\\ufe2f]/.test(character);\n}\n/**\n* Checks whether given `character` is a high half of surrogate pair.\n*\n* Using UTF-16 terminology, a surrogate pair denotes UTF-16 character using two UTF-8 characters. The surrogate pair\n* consist of high surrogate pair character followed by low surrogate pair character.\n*\n* @param character Character to check.\n*/\nfunction isHighSurrogateHalf(character) {\n\treturn !!character && character.length == 1 && /[\\ud800-\\udbff]/.test(character);\n}\n/**\n* Checks whether given `character` is a low half of surrogate pair.\n*\n* Using UTF-16 terminology, a surrogate pair denotes UTF-16 character using two UTF-8 characters. The surrogate pair\n* consist of high surrogate pair character followed by low surrogate pair character.\n*\n* @param character Character to check.\n*/\nfunction isLowSurrogateHalf(character) {\n\treturn !!character && character.length == 1 && /[\\udc00-\\udfff]/.test(character);\n}\n/**\n* Checks whether given offset in a string is inside a surrogate pair (between two surrogate halves).\n*\n* @param string String to check.\n* @param offset Offset to check.\n*/\nfunction isInsideSurrogatePair(string, offset) {\n\treturn isHighSurrogateHalf(string.charAt(offset - 1)) && isLowSurrogateHalf(string.charAt(offset));\n}\n/**\n* Checks whether given offset in a string is between base character and combining mark or between two combining marks.\n*\n* @param string String to check.\n* @param offset Offset to check.\n*/\nfunction isInsideCombinedSymbol(string, offset) {\n\treturn isCombiningMark(string.charAt(offset));\n}\nconst EMOJI_PATTERN = /* #__PURE__ */ buildEmojiRegexp();\n/**\n* Checks whether given offset in a string is inside multi-character emoji sequence.\n*\n* @param string String to check.\n* @param offset Offset to check.\n*/\nfunction isInsideEmojiSequence(string, offset) {\n\tconst matches = String(string).matchAll(EMOJI_PATTERN);\n\treturn Array.from(matches).some((match) => match.index < offset && offset < match.index + match[0].length);\n}\nfunction buildEmojiRegexp() {\n\tconst parts = [\n\t\t/\\p{Emoji}[\\u{E0020}-\\u{E007E}]+\\u{E007F}/u,\n\t\t/\\p{Emoji}\\u{FE0F}?\\u{20E3}/u,\n\t\t/\\p{Emoji}\\u{FE0F}/u,\n\t\t/(?=\\p{General_Category=Other_Symbol})\\p{Emoji}\\p{Emoji_Modifier}*/u\n\t];\n\tconst flagSequence = /\\p{Regional_Indicator}{2}/u.source;\n\tconst emoji = \"(?:\" + parts.map((part) => part.source).join(\"|\") + \")\";\n\tconst sequence = `${flagSequence}|${emoji}(?:\\u{200D}${emoji})*`;\n\treturn new RegExp(sequence, \"ug\");\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/decodelicensekey\n*/\n/**\n* Parses the provided license key and returns the decoded object, or null if the decoding was unsuccessful.\n*\n* @param licenseKey The license key to decode.\n*/\nfunction decodeLicenseKey(licenseKey) {\n\tif (!licenseKey) return null;\n\tconst encodedPayload = getLicenseKeyPayload(licenseKey);\n\tif (!encodedPayload) return null;\n\treturn parseBase64EncodedObject(encodedPayload);\n}\nfunction getLicenseKeyPayload(licenseKey) {\n\tconst parts = licenseKey.split(\".\");\n\tif (parts.length != 3) return null;\n\treturn parts[1];\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/isfeatureblockedbylicensekey\n*/\n/**\n* Checks whether a feature (represented by an unique id) is blocked by the provided license key.\n*\n* @param licensePayload Decoded license key.\n* @param licenseFeatureCode An unique feature id to check.\n*/\nfunction isFeatureBlockedByLicenseKey(licensePayload, licenseFeatureCode) {\n\treturn (licensePayload.removeFeatures || []).includes(licenseFeatureCode);\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n/**\n* @module utils/parsedimensionwithunit\n*/\n/**\n* Parses provided string with dimension value and returns extracted numeric value and unit.\n*\n* \t* If non-string dimension is passed then `null` value is returned.\n* \t* If unit is missing then `null` is returned.\n* \t* If numeric value part of string is not a number then `null` is returned.\n*\n* Example:\n* \t`\"222px\"` => `{ value: 222, unit: \"px\" }`\n*\t`\"99%\"` => `{ value: 99, unit: \"%\" }`\n\n* @param dimension Unsafe string with dimension.\n* @returns Parsed dimension with extracted numeric value and units.\n* @internal\n*/\nfunction tryParseDimensionWithUnit(dimension) {\n\tif (!dimension) return null;\n\tconst [, rawValue, unit] = dimension.trim().match(/([.,\\d]+)(%|px)$/) || [];\n\tconst parsedValue = Number.parseFloat(rawValue);\n\tif (Number.isNaN(parsedValue)) return null;\n\treturn {\n\t\tvalue: parsedValue,\n\t\tunit\n\t};\n}\n/**\n* Converts dimension between `px` -> `%` and `%` -> `px`.\n*\n* @param parentDimensionPx\tDimension of parent element that contains measured element.\n* @param dimension Measured element dimension.\n* @param targetUnit Target unit for conversion.\n* @returns Casted dimension.\n* @internal\n*/\nfunction tryCastDimensionsToUnit(parentDimensionPx, dimension, targetUnit) {\n\tif (targetUnit === \"px\") return {\n\t\tvalue: dimension.value,\n\t\tunit: \"px\"\n\t};\n\treturn {\n\t\tvalue: dimension.value / parentDimensionPx * 100,\n\t\tunit: \"%\"\n\t};\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\n\nexport { CKEditorError, Collection, Config, DOCUMENTATION_URL, DomEmitterMixin, ElementReplacer, EmitterMixin, EventInfo, FocusTracker, KeystrokeHandler, Locale, ObservableMixin, Rect, ResizeObserver, _clear as _clearTranslations, _getEmitterId, _getEmitterListenedTo, getUserAgent as _getUserAgent, isAndroid as _isAndroid, isBlink as _isBlink, isGecko as _isGecko, isMac as _isMac, isMediaForcedColors as _isMediaForcedColors, isMotionReduced as _isMotionReduced, isRegExpUnicodePropertySupported as _isRegExpUnicodePropertySupported, isSafari as _isSafari, isWindows as _isWindows, isiOS as _isiOS, _setEmitterId, _translate, tryCastDimensionsToUnit as _tryCastDimensionsToUnit, tryParseDimensionWithUnit as _tryParseDimensionWithUnit, _unifyTranslations, abortableDebounce, add, areConnectedThroughProperties, collectStylesheets, compareArrays, count, crc32, createElement, decodeLicenseKey, delay, diff, diffToChanges, env, exponentialDelay, fastDiff, findClosestScrollableAncestor, first, formatHtml, getAncestors, getBorderWidths, getCode, getCommonAncestor, getConstrainedViewportRect, getDataFromElement, getEnvKeystrokeText, getLanguageDirection, getLocalizedArrowKeyCodeDirection, getOptimalPosition, getPositionedAncestor, getRangeFromMouseEvent, getVisualViewportOffset, globalVar as global, indexOf, insertAt, insertToPriorityArray, isArrowKeyCode, isCombiningMark, isComment, isFeatureBlockedByLicenseKey, isForwardArrowKeyCode, isHighSurrogateHalf, isInsideCombinedSymbol, isInsideEmojiSequence, isInsideSurrogatePair, isIterable, isLowSurrogateHalf, isNode, isRange, isText, isValidAttributeName, isViewWithFocusTracker, isVisible, isWindow, keyCodes, logError, logWarning, mapsEqual, nth, objectToMap, parseBase64EncodedObject, parseKeystroke, priorities, releaseDate, remove, retry, scrollAncestorsToShowTarget, scrollViewportToShowTarget, setDataInElement, spliceArray, spy, toArray, toMap, toUnit, uid, version, wait };\n//# sourceMappingURL=index.js.map"],"names":["globalVar","getUserAgent","userAgent","env","isMac","isWindows","isGecko","isSafari","isiOS","isAndroid","isBlink","fastDiff","a","b","cmp","atomicChanges","arrayA","arrayB","changeIndexes","findChangeBoundaryIndexes","changeIndexesToAtomicChanges","changeIndexesToChanges","arr1","arr2","firstIndex","findFirstDifferenceIndex","lastIndex","cutAndReverse","arr","howMany","newArray","result","lastIndexOld","lastIndexNew","newLength","diff","aLength","bLength","_insert","_delete","tmp","m","n","delta","es","fp","snake","k","y1","y2","dir","y","x","p","spy","EventInfo","source","name","__publicField","HEX_NUMBERS","_","index","uid","r1","r2","r3","r4","priorities","priority","insertToPriorityArray","objects","objectToInsert","left","right","mid","DOCUMENTATION_URL","CKEditorError","errorName","context","data","originalError","getErrorMessage","type","error","logWarning","formatConsoleArguments","logError","getLinkToDocumentationMessage","processedObjects","stringifiedData","key","value","documentationLink","originalErrorMessage","documentationMessage","version","releaseDate","_listeningTo","_emitterId","_delegations","defaultEmitterClass$1","EmitterMixin","base","Mixin","event","callback","options","wasFired","onceCallback","args","emitter","emitterInfo","eventCallbacks","emitters","_getEmitterId","_setEmitterId","emitterId","addEventListener","removeEventListener","eventOrInfo","eventInfo","callbacks","getCallbacksForEvent","i","fn","delegations","destinations","passAllDestinations","fireDelegatedEvents","err","events","nameOrFunction","eventName","createEventNamespace","lists","getCallbacksListsForNamespace","callbackDefinition","_getEmitterListenedTo","listeningEmitter","listenedToEmitterId","listeningTo","id","getEvents","makeEventNode","childEventName","newEventNodes","node","eventNode","callbacksLists","childCallbacksLists","currentEventName","colonIndex","fireArgs","delegatedInfo","listener","observablePropertiesSymbol","boundObservablesSymbol","boundPropertiesSymbol","decoratedMethods","decoratedOriginal","defaultObservableClass","ObservableMixin","_e","_d","_c","_b","_a","isObject","property","initObservable","properties","oldValue","newValue","bindProperties","isStringArray","boundProperties","propertyName","bindings","binding","bindTo","bindToMany","unbindProperties","boundObservables","toObservable","toProperty","toProperties","toPropertyBindings","boundObservable","methodName","originalMethod","evt","observable","parsedArgs","parseBindToArgs","bindingsKeys","numberOfBindings","to","attachBindToListeners","updateBindToBound","updateBoundObservableProperty","observables","attribute","getBindingTargets","observableAndAttributePairs","parsed","lastObservable","updateBoundObservables","toPropertyName","bindingsToObservable","chain","propertyValue","toBindings","ElementReplacer","element","newElement","count","iterable","compareArrays","minLen","isIterable","createElement","doc","attributes","children","namespace","isString","child","Config","configurations","defaultConfigurations","cloneConfig","target","isDefine","isPlainObject","parts","part","configuration","cloneDeepWith","leaveItemReferences","isElement","isNode","obj","isWindow","stringifiedObject","defaultEmitterClass","DomEmitterMixin","ProxyEmitterBase","proxyOptions","proxyEmitter","ProxyEmitter","proxyEmitters","proxy","getProxyEmitterId","domListener","domEvt","getNodeUID","option","getAncestors","nodes","currentNode","getDataFromElement","el","getBorderWidths","style","getRangeFromMouseEvent","domEvent","domDoc","domRange","getPositionedAncestor","isText","isRange","RECT_PROPERTIES","POSITIONING_VALUES","Rect","isSourceRange","isDomElement","rangeRects","copyRectProperties","innerWidth","innerHeight","anotherRect","rect","newRect","visibleRect","isBody","parent","lastPositionedChildElement","isNonClippingParent","getElementOverflow","isPositioned","getElementPosition","parentRect","intersectionRect","prop","intersectRect","scrollX","scrollY","absoluteRect","positionedAncestor","shiftRectToCompensatePositionedAncestor","scrollBarWidth","scrollBarHeight","direction","borderWidths","range","rects","clientRects","r","startContainer","clientRect","boundingRectData","rectangleCount","positionedElementAncestor","ancestorPosition","ancestorBorderWidths","moveX","moveY","ResizeObserver","entries","entry","setDataInElement","toUnit","unit","indexOf","insertAt","parentElement","nodeToInsert","isComment","isValidAttributeName","isVisible","getOptimalPosition","positions","limiter","fitInViewport","viewportOffsetConfig","isFunction","constrainedViewportRect","getConstrainedViewportRect","elementRect","visibleTargetRect","getVisibleViewportIntersectionRect","bestPosition","positionOptions","PositionObject","visibleLimiterRect","getBestPosition","viewportRect","visibleSourceRect","elementRectArea","positionInstances","positioningFunction","position","maxFitFactor","limiterIntersectionArea","viewportIntersectionArea","fitFactor","positioningFunctionOutput","top","config","limiterRect","remove","getVisualViewportOffset","visualViewport","scrollViewportToShowTarget","viewportOffset","ancestorOffset","alignToTop","forceScroll","targetWindow","getWindow","currentWindow","currentFrame","normalizeViewportOffset","firstAncestorToScroll","getParentElement","scrollAncestorsToShowRect","getRectRelativeToWindow","targetRect","ancestorWindowRelativeRect","ancestorTargetIntersection","scrollWindowToShowRect","window","targetShiftedDownRect","targetShiftedUpRect","forceScrollToTop","allRectsFitInViewport","initialScrollX","initialScrollY","isAbove","isBelow","isLeftOf","isRightOf","getRect","limiterElement","parentWindow","targetFitsInTarget","firstRect","secondRect","elementOrRange","relativeWindow","frame","frameRect","modifiersToGlyphsMac","modifiersToGlyphsNonMac","keyCodesToGlyphs","keyCodes","generateKnownKeyCodes","keyCodeNames","code","prettyKeyName","getCode","keyCode","parseKeystroke","keystroke","splitKeystrokeText","getEnvKeyCode","sum","getEnvKeystrokeText","forcedEnv","keystrokeCode","modifiers","glyph","isArrowKeyCode","getLocalizedArrowKeyCodeDirection","contentLanguageDirection","isLtrContent","isForwardArrowKeyCode","localizedKeyCodeDirection","letter","RTL_LANGUAGE_CODES","getLanguageDirection","languageCode","toArray","_translate","language","message","quantity","translations","normalizedTranslations","numberOfLanguages","getNumberOfLanguages","messageId","hasTranslation","dictionary","getPluralForm","translation","_unifyTranslations","acc","merge","Locale","uiLanguage","contentLanguage","values","interpolateString","string","match","CollectionBase","Collection","initialItemsOrOptions","hasInitialItems","item","items","offset","itemId","currentItemIndex","idOrIndex","itemOrId","subject","ctx","removedItems","externalCollection","Class","callbackOrProperty","factory","addItem","externalItem","isExternalBoundToThis","externalItemBound","finalIndex","skipped","idProperty","itemDoesNotExist","first","iterator","iteratorItem","FocusTrackerBase","FocusTracker","elementOrView","isElement$1","isViewWithFocusTracker","externalFocusedViewInSubtree","view","isExternalViewSubtreeFocused","subTreeRoot","isFocusedView","KeystrokeHandler","keyEvtData","objectToMap","map","toMap","spliceArray","targetArray","insertArray","originalLength","insertLength","delay","func","wait","timer","delayed","parseBase64EncodedObject","encoded","decoded","makeCrcTable","crcTable","c","crc32","inputData","dataArray","crc","dataString","byte","isCombiningMark","character","isHighSurrogateHalf","isLowSurrogateHalf","isInsideSurrogatePair","isInsideCombinedSymbol","EMOJI_PATTERN","buildEmojiRegexp","isInsideEmojiSequence","matches","flagSequence","emoji","sequence","decodeLicenseKey","licenseKey","encodedPayload","getLicenseKeyPayload","isFeatureBlockedByLicenseKey","licensePayload","licenseFeatureCode"],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAMA;AAAA;AAAA;AAAA;AAoBG,IAACA;AACJ,IAAI;AACH,EAAAA,IAAY;AAAA,IACX;AAAA,IACA;AAAA,EACF;AACA,QAAQ;AAAA,EACR;AACC,EAAAA,IAAY;AAAA,IACX,QAAQ,CAAA;AAAA,IACR,UAAU,CAAA;AAAA,EACZ;AACA;AAEA;AAAA;AAAA;AAAA;AAaA,SAASC,KAAe;AACvB,MAAI;AACH,WAAO,UAAU,UAAU,YAAW;AAAA,EACvC,QAAQ;AACP,WAAO;AAAA,EACR;AACD;AACA,MAAMC,IAA4B,gBAAA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